public bool GetUpdate(M_PromoCount model) { string sqlStr = "UPDATE [dbo].[ZL_PromoCount] SET [PromotionUrl] = @PromotionUrl,[sid] = @sid,[linkCount] = @linkCount WHERE [id] = @id"; SqlParameter[] cmdParams = model.GetParameters(); return(SqlHelper.ExecuteSql(sqlStr, cmdParams)); }
public int GetInsert(M_PromoCount model) { string sqlStr = "INSERT INTO [dbo].[ZL_PromoCount] ([PromotionUrl],[sid],[linkCount]) VALUES (@PromotionUrl,@sid,@linkCount);select @@IDENTITY"; SqlParameter[] cmdParams = model.GetParameters(); return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams))); }
public int insert(M_PromoCount model) { return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool UpdateByID(M_PromoCount model) { return(Sql.UpdateByIDs(strTableName, PK, model.id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters())); }