小编Mar*_*ark的帖子

数据层抽象工厂

我是开发抽象工厂模式的新手,并希望在数据层中创建一个抽象工厂,它将帮助我将该层链接到任何其他数据库,例如sql和oracle.你能帮我完成这项任务吗?请注意,数据库的连接字符串将在此层中找到,而不是在演示文稿中.

谢谢

EDITED

public abstract class Database
{
    public string connectionString;

    #region Abstract Functions

    public abstract IDbConnection CreateConnection();
    public abstract IDbCommand CreateCommand();
    public abstract IDbConnection CreateOpenConnection();
    public abstract IDbCommand CreateCommand(string commandText, IDbConnection connection);
    public abstract IDbCommand CreateStoredProcCommand(string procName, IDbConnection connection);
    public abstract IDataParameter CreateParameter(string parameterName, object parameterValue);

    #endregion
}
Run Code Online (Sandbox Code Playgroud)
public class SQLDatabase : Database
{
    public override IDbConnection CreateConnection()
    {
        return new SqlConnection(connectionString);
    }

    public override IDbCommand CreateCommand()
    {
        return new SqlCommand();
    }

    public override IDbConnection CreateOpenConnection()
    {
        SqlConnection connection …
Run Code Online (Sandbox Code Playgroud)

c# asp.net factory-pattern

5
推荐指数
1
解决办法
1万
查看次数

Jquery Clear Inline css

我有下面的JQuery代码,我需要清除这个动画完成的内联css

$(document).ready(function(){

$("#panel").hide(); //updated line, removing the #panel ID.

 $('#tab2').toggle(function(){ //adding a toggle function to the #tab
    $("#panel").show();

        $('#ToolsTitleSpan').text("CLOSE TOOLS");

        $('#tab2').stop().animate({right: '225'}, 800, 'swing', function() {});

        $("#panel").stop().animate({right: '72', width: '230px', opacity:0.8}, 800, 'swing', function() {

                $('.contentSideBar').fadeIn('slow');        
  });


},

function(){ //when the #tab is next cliked
 $('#ToolsTitleSpan').text("OPEN TOOLS");

 $('#tab2').stop().animate({right: '-=225'}, 800, 'swing', function() {

            $('.contentSideBar').fadeOut(slow, function() {});
 });

 $('#panel').stop().animate({width:"0", position:'absolute', float: 'right', opacity:0.1}, 800, 'swing');

});  
});
Run Code Online (Sandbox Code Playgroud)

如果需要,这是HTML代码:

<div id="panelKS"> <!--the hidden panel -->
    <div class="contentSideBarKS">
    </div>
</div>

<div id="tab2KS">
    <span …
Run Code Online (Sandbox Code Playgroud)

css jquery inline

3
推荐指数
1
解决办法
6526
查看次数

更新视图

我有以下视图,我正在尝试更新视图.显示错误:"此处不允许虚拟列".我怎么安排这个?

谢谢Keith Spiteri

视图:

CREATE OR REPLACE VIEW FilmDetailsView
   (Film_Name, Actor_FullName, Hall_Number, Date_Time)
AS SELECT flm.film_name, actor.actor_name || ' ' || actor.actor_surname, 
   hall.cinemahall_number, schedule.schedule_date
FROM film flm 
JOIN movieschedule schedule
ON (flm.film_id = schedule.schedule_filmid)
JOIN cinemahall hall
ON (schedule.schedule_hallid = hall.cinemahall_id)
JOIN FilmActor filmactor
ON (flm.film_id = filmactor.filmactor_filmid)
JOIN Actor actor
ON (actor.actor_id = filmactor.filmactor_actorid);
Run Code Online (Sandbox Code Playgroud)

更新:

UPDATE FILMDETAILSVIEW
SET ACTOR_FULLNAME = 'a'
WHERE HALL_NUMBER = 1;
Run Code Online (Sandbox Code Playgroud)

错误:

Error starting at line 312 in command:
UPDATE FILMDETAILSVIEW
SET ACTOR_FULLNAME = 'a' …
Run Code Online (Sandbox Code Playgroud)

sql oracle

1
推荐指数
2
解决办法
7008
查看次数

标签 统计

asp.net ×1

c# ×1

css ×1

factory-pattern ×1

inline ×1

jquery ×1

oracle ×1

sql ×1