public VendorStoreInfo Update(VendorStoreInfo entity) { DataCommand command = DataCommandManager.GetDataCommand("UpdateVendorStore"); command.SetParameterValue(entity); command.ExecuteNonQuery(); return(Load(entity.SysNo.Value)); }
public VendorStoreInfo Create(VendorStoreInfo entity) { PreCheck(entity); if (entity.VendorSysNo == null) { throw new BizException("供应商编号不能为空!"); } return(da.Create(entity)); }
public VendorStoreInfo Create(VendorStoreInfo entity) { DataCommand command = DataCommandManager.GetDataCommand("CreateVendorStore"); command.SetParameterValue(entity); command.ExecuteNonQuery(); entity.SysNo = Convert.ToInt32(command.GetParameterValue("@SysNo")); return(entity); }
private void PreCheck(VendorStoreInfo entity) { if (entity.AreaSysNo == null) { throw new BizException("地区不能为空!"); } if (string.IsNullOrEmpty(entity.Name)) { throw new BizException("门店名称不能为空!"); } if (da.CheckVendorStoreNameExists(entity.SysNo ?? 0, entity.Name, entity.VendorSysNo.Value)) { throw new BizException(string.Format("该供应商下的门店名称[{0}]已经存在!", entity.Name)); } }
public VendorStoreInfo Update(VendorStoreInfo entity) { return(ObjectFactory <VendorStoreProcessor> .Instance.Update(entity)); }
public VendorStoreInfo Update(VendorStoreInfo entity) { PreCheck(entity); return(da.Update(entity)); }
public VendorStoreInfo UpdateVendorStore(VendorStoreInfo entity) { return(ObjectFactory <VendorStoreAppService> .Instance.Update(entity)); }