Exemplo n.º 1
0
 public bool UpdateWechatHomeList(WechatHomeList model)
 {
     using (var conn = ProcessConnection.OpenConfiguration)
     {
         return(dal.UpdateWechatHomeList(conn, model));
     }
 }
Exemplo n.º 2
0
 public int AddWechatHomeListToInt(WechatHomeList model)
 {
     using (var connection = ProcessConnection.OpenConfiguration)
     {
         return(dal.AddWechatHomeListToInt(connection, model));
     }
 }
Exemplo n.º 3
0
        public bool UpdateWechatHomeList(SqlConnection conn, WechatHomeList model)
        {
            string sql = @"     UPDATE  Configuration.dbo.WechatHomeList
                                SET     Title = @Title ,
                                        IsEnabled = @IsEnabled ,
                                        UDateTime =  GETDATE(),
                                        OrderBy=@OrderBy,IsNewUser=@IsNewUser,TypeName=@TypeName,IsShownButtom=@IsShownButtom,HomePageConfigID=@HomePageConfigID,Headings=@Headings,Subtitle=@Subtitle,ImageUrl=@ImageUrl,Uri=@Uri
                                WHERE   ID = @ID;";

            return(conn.Execute(sql, model) > 0);
        }
Exemplo n.º 4
0
        public int AddWechatHomeListToInt(SqlConnection conn, WechatHomeList model)
        {
            string sql = @"INSERT INTO Configuration.dbo.WechatHomeList
                        ( Title ,
                          IsEnabled ,
                          CDateTime ,
                          UDateTime,OrderBy,IsNewUser,TypeName,IsShownButtom,HomePageConfigID,Headings,Subtitle,ImageUrl,Uri
                        )
                VALUES  ( @Title , -- Title - varchar(30)
                          @IsEnabled , -- IsEnabled - int
                          GETDATE() , -- CDateTime - datetime
                          GETDATE(),  -- UDateTime - datetime
                          @OrderBy,@IsNewUser,@TypeName,@IsShownButtom,@HomePageConfigID,@Headings,@Subtitle,@ImageUrl,@Uri
                        );  SELECT @@IDENTITY AS ID";

            return(Convert.ToInt32(conn.ExecuteScalar(sql, model)));
        }
Exemplo n.º 5
0
        public bool AddWechatHomeList(SqlConnection conn, WechatHomeList model)
        {
            string sql = @"INSERT INTO Configuration.dbo.WechatHomeList
                        ( Title ,
                          IsEnabled ,
                          CDateTime ,
                          UDateTime,OrderBy,IsNewUser,TypeName,IsShownButtom,HomePageConfigID,Headings,Subtitle,ImageUrl,Uri
                        )
                VALUES  ( @Title , -- Title - varchar(30)
                          @IsEnabled , -- IsEnabled - int
                          GETDATE() , -- CDateTime - datetime
                          GETDATE(),  -- UDateTime - datetime
                          @OrderBy,@IsNewUser,@TypeName,@IsShownButtom,@HomePageConfigID,@Headings,@Subtitle,@ImageUrl,@Uri
                        )";

            return conn.Execute(sql, model) > 0;
        }