Пример #1
0
        public bool GetUpdate(M_GiftCard_User model)
        {
            string sqlStr = "UPDATE [dbo].[ZL_GiftCard_User] SET [ShopCardId] = @ShopCardId,[CardNO] = @CardNO,[CardPass] = @CardPass,[password] = @password,[CardType] = @CardType,[UserId] = @UserId,[OrderData] = @OrderData,[confirmData] = @confirmData,[State] = @State,[confirmState] = @confirmState,[remark]=@remark WHERE [id] = @id";

            SqlParameter[] cmdParams = model.GetParameters();
            return(SqlHelper.ExecuteSql(sqlStr, cmdParams));
        }
Пример #2
0
        public int GetInsert(M_GiftCard_User model)
        {
            string sqlStr = "INSERT INTO [dbo].[ZL_GiftCard_User] ([ShopCardId],[CardNO],[CardPass],[password],[CardType],[UserId],[OrderData],[confirmData],[State],[confirmState],[remark]) VALUES (@ShopCardId,@CardNO,@CardPass,@password,@CardType,@UserId,@OrderData,@confirmData,@State,@confirmState,@remark);SELECT @@IDENTITY;";

            SqlParameter[] cmdParams = model.GetParameters();
            return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams)));
        }
Пример #3
0
 public int insert(M_GiftCard_User model)
 {
     return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
Пример #4
0
 public bool UpdateByID(M_GiftCard_User model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }