예제 #1
0
        public VendorStoreInfo Update(VendorStoreInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateVendorStore");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();

            return(Load(entity.SysNo.Value));
        }
예제 #2
0
        public VendorStoreInfo Create(VendorStoreInfo entity)
        {
            PreCheck(entity);

            if (entity.VendorSysNo == null)
            {
                throw new BizException("供应商编号不能为空!");
            }

            return(da.Create(entity));
        }
예제 #3
0
        public VendorStoreInfo Create(VendorStoreInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CreateVendorStore");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();

            entity.SysNo = Convert.ToInt32(command.GetParameterValue("@SysNo"));
            return(entity);
        }
예제 #4
0
 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));
     }
 }
예제 #5
0
 public VendorStoreInfo Update(VendorStoreInfo entity)
 {
     return(ObjectFactory <VendorStoreProcessor> .Instance.Update(entity));
 }
예제 #6
0
        public VendorStoreInfo Update(VendorStoreInfo entity)
        {
            PreCheck(entity);

            return(da.Update(entity));
        }
예제 #7
0
 public VendorStoreInfo UpdateVendorStore(VendorStoreInfo entity)
 {
     return(ObjectFactory <VendorStoreAppService> .Instance.Update(entity));
 }