コード例 #1
0
        public bool Update(XMemberUpgrade model)
        {
            string sql = string.Format(@"update XMemberUpgrade set SID=@SID,Grade1=@Grade1,Grade2=@Grade2,CID=@CID,IsReply=@IsReply,
SortIndex=@SortIndex,IsDeleted=@IsDeleted,CreateTime=@CreateTime,UpdateTime=@UpdateTime where MUID=@MUID");

            DbParameter[] parms =
            {
                new SqlParameter("@MUID",       SqlDbType.VarChar, 50)
                {
                    Value = model.MUID
                },
                new SqlParameter("@SID",        SqlDbType.VarChar, 50)
                {
                    Value = model.SID
                },
                new SqlParameter("@Grade1",     SqlDbType.Int)
                {
                    Value = model.Grade1
                },
                new SqlParameter("@Grade2",     SqlDbType.Int)
                {
                    Value = model.Grade2
                },
                new SqlParameter("@CID",        SqlDbType.VarChar, 50)
                {
                    Value = model.CID
                },
                new SqlParameter("@IsReply",    SqlDbType.Int)
                {
                    Value = model.IsReply
                },
                new SqlParameter("@SortIndex",  SqlDbType.Int)
                {
                    Value = model.SortIndex
                },
                new SqlParameter("@IsDeleted",  SqlDbType.Int)
                {
                    Value = model.IsDeleted
                },
                new SqlParameter("@CreateTime", SqlDbType.DateTime)
                {
                    Value = model.CreateTime
                },
                new SqlParameter("@UpdateTime", SqlDbType.DateTime)
                {
                    Value = model.UpdateTime
                }
            };
            return(dbHelper.ExecuteNonQuery(sql, parms));
        }
コード例 #2
0
        public bool Add(XMemberUpgrade model)
        {
            string sql = string.Format(@"insert into XMemberUpgrade(MUID,SID,Grade1,Grade2,CID,IsReply,SortIndex,IsDeleted,CreateTime,UpdateTime) 
       values(@MUID,@SID,@Grade1,@Grade2,@CID,@IsReply,@SortIndex,@IsDeleted,@CreateTime,@UpdateTime)");

            DbParameter[] parms =
            {
                new SqlParameter("@MUID",       SqlDbType.VarChar, 50)
                {
                    Value = model.MUID
                },
                new SqlParameter("@SID",        SqlDbType.VarChar, 50)
                {
                    Value = model.SID
                },
                new SqlParameter("@Grade1",     SqlDbType.Int)
                {
                    Value = model.Grade1
                },
                new SqlParameter("@Grade2",     SqlDbType.Int)
                {
                    Value = model.Grade2
                },
                new SqlParameter("@CID",        SqlDbType.VarChar, 50)
                {
                    Value = model.CID
                },
                new SqlParameter("@IsReply",    SqlDbType.Int)
                {
                    Value = model.IsReply
                },
                new SqlParameter("@SortIndex",  SqlDbType.Int)
                {
                    Value = model.SortIndex
                },
                new SqlParameter("@IsDeleted",  SqlDbType.Int)
                {
                    Value = model.IsDeleted
                },
                new SqlParameter("@CreateTime", SqlDbType.DateTime)
                {
                    Value = model.CreateTime
                },
                new SqlParameter("@UpdateTime", SqlDbType.DateTime)
                {
                    Value = model.UpdateTime
                }
            };
            return(dbHelper.ExecuteNonQuery(sql, parms));
        }
コード例 #3
0
        public bool Delete(XMemberUpgrade model)
        {
            string sql = string.Format(@"delete XMemberUpgrade set IsDeleted=@IsDeleted,UpdateTime=@UpdateTime where MUID=@MUID");

            DbParameter[] parms =
            {
                new SqlParameter("@MUID",       SqlDbType.VarChar, 50)
                {
                    Value = model.MUID
                },

                new SqlParameter("@IsDeleted",  SqlDbType.Int)
                {
                    Value = model.IsDeleted
                },

                new SqlParameter("@UpdateTime", SqlDbType.DateTime)
                {
                    Value = model.UpdateTime
                }
            };
            return(dbHelper.ExecuteNonQuery(sql, parms));
        }
コード例 #4
0
ファイル: XMemberUpgradeBLL.cs プロジェクト: dadaxian/Hamstc
 public bool Delete(XMemberUpgrade model)
 {
     return(dalXMemberUpgrade.Delete(model));
 }
コード例 #5
0
ファイル: XMemberUpgradeBLL.cs プロジェクト: dadaxian/Hamstc
 public bool Update(XMemberUpgrade model)
 {
     return(dalXMemberUpgrade.Update(model));
 }
コード例 #6
0
ファイル: XMemberUpgradeBLL.cs プロジェクト: dadaxian/Hamstc
 public bool Add(XMemberUpgrade model)
 {
     return(dalXMemberUpgrade.Add(model));
 }