public void UpdateSaleAdvGroup(SaleAdvertisementGroup entity) { DataCommand command = DataCommandManager.GetDataCommand("UpdateSaleAdvGroup"); command.SetParameterValue(entity); command.ExecuteNonQuery(); }
public SaleAdvertisementGroup CreateSaleAdvGroup(SaleAdvertisementGroup entity) { DataCommand command = DataCommandManager.GetDataCommand("CreateSaleAdvGroup"); command.SetParameterValue(entity); command.ExecuteNonQuery(); entity.SysNo = Convert.ToInt32(command.GetParameterValue("@SysNo")); return(entity); }
public virtual SaleAdvertisementGroup UpdateSaleAdvGroup(SaleAdvertisementGroup entity) { if (entity == null) { throw new ArgumentNullException("entity"); } if (entity.SysNo == null) { throw new ArgumentNullException("entity.SysNo"); } var list = da.LoadSaleAdvGroupsBySaleAdvSysNo(entity.SaleAdvSysNo.Value); if (list != null && list.FirstOrDefault(p => p.GroupName == entity.GroupName && p.SysNo != entity.SysNo) != null) { //throw new BizException(string.Format("更新失败!原因:组名{0}已存在!", entity.GroupName)); throw new BizException(ResouceManager.GetMessageString("MKT.SaleAdvertisement", "SaleAdvertisement_UpdateFailed")); } da.UpdateSaleAdvGroup(entity); return(da.LoadSaleAdvGroupBySysNo(entity.SysNo.Value)); }
public virtual SaleAdvertisementGroup UpdateSaleAdvGroup(SaleAdvertisementGroup entity) { return(processor.UpdateSaleAdvGroup(entity)); }
public SaleAdvertisementGroup UpdateSaleAdvGroup(SaleAdvertisementGroup msg) { return(ObjectFactory <SaleAdvAppService> .Instance.UpdateSaleAdvGroup(msg)); }