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)); }
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)); }
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)); }
public bool Delete(XMemberUpgrade model) { return(dalXMemberUpgrade.Delete(model)); }
public bool Update(XMemberUpgrade model) { return(dalXMemberUpgrade.Update(model)); }
public bool Add(XMemberUpgrade model) { return(dalXMemberUpgrade.Add(model)); }