Exemplo n.º 1
0
        public bool GetUpdate(M_GiftCard_shop model)
        {
            string sqlStr = "UPDATE [dbo].[ZL_GiftCard_shop] SET [Period] = @Period,[Cardinfo] = @Cardinfo,[remark] = @remark,[Points] = @Points,[rebateVal] = @rebateVal,[Days] = @Days,[Num] = @Num,[ShopId]=@ShopId,[PicUrl]=@PicUrl WHERE [id] = @id";

            SqlParameter[] cmdParams = model.GetParameters();
            return(SqlHelper.ExecuteSql(sqlStr, cmdParams));
        }
Exemplo n.º 2
0
        public int GetInsert(M_GiftCard_shop model)
        {
            string sqlStr = "INSERT INTO [dbo].[ZL_GiftCard_shop] ([Period],[Cardinfo],[remark],[Points],[rebateVal],[Days],[Num],[ShopId],[PicUrl]) VALUES (@Period,@Cardinfo,@remark,@Points,@rebateVal,@Days,@Num,@ShopId,@PicUrl);SELECT @@IDENTITY;";

            SqlParameter[] cmdParams = model.GetParameters();
            return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams)));
        }
Exemplo n.º 3
0
 public int insert(M_GiftCard_shop model)
 {
     return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
Exemplo n.º 4
0
 public bool UpdateByID(M_GiftCard_shop model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }