예제 #1
0
        public void UpdateSaleAdvGroup(SaleAdvertisementGroup entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateSaleAdvGroup");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();
        }
예제 #2
0
        public SaleAdvertisementGroup CreateSaleAdvGroup(SaleAdvertisementGroup entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CreateSaleAdvGroup");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();

            entity.SysNo = Convert.ToInt32(command.GetParameterValue("@SysNo"));

            return(entity);
        }
예제 #3
0
        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));
        }
예제 #4
0
 public virtual SaleAdvertisementGroup UpdateSaleAdvGroup(SaleAdvertisementGroup entity)
 {
     return(processor.UpdateSaleAdvGroup(entity));
 }
예제 #5
0
 public SaleAdvertisementGroup UpdateSaleAdvGroup(SaleAdvertisementGroup msg)
 {
     return(ObjectFactory <SaleAdvAppService> .Instance.UpdateSaleAdvGroup(msg));
 }