コード例 #1
0
 public void UpdateLabel(LabelSettingModel model)
 {
     try
     {
         LabelSetting obj = _labelSettingRepository.GetLabelData(model.ItemId);
         if (obj != null)
         {
             obj.Id = model.Id;
         }
         else
         {
             obj = new LabelSetting();
         }
         obj.ItemId           = model.ItemId;
         obj.PrintItemCode    = model.PrintItemCode;
         obj.PrintItemDetail  = model.PrintItemDetail;
         obj.PrintUnitMeasure = model.PrintUnitMeasure;
         obj.PrintItemPrice   = model.PrintItemPrice;
         obj.PrintBarCode     = model.PrintBarCode;
         obj.BarCodeHeight    = model.BarCodeHeight;
         obj.LabelSheet       = model.LabelSheet;
         obj.TotalNoOfPrints  = model.TotalNoOfPrints;
         obj.StartRow         = model.StartRow;
         obj.StartColumn      = model.StartColumn;
         _labelSettingRepository.UpdateLabel(obj);
     }
     catch (Exception ex)
     {
         fault.Result       = false;
         fault.ErrorMessage = "Error in UpdateLabel method";
         fault.ErrorDetails = ex.ToString();
         throw new FaultException <FaultData>(fault);
     }
 }
コード例 #2
0
        public void UpdateLabel(LabelSettingModel model)
        {
            LabelSetting labelData = new LabelSetting(model.Id, model.LabelSettingCode, model.ItemId, model.PrintItemCode, model.PrintItemDetail, model.PrintUnitMeasure, model.PrintItemPrice, model.PrintBarCode, model.BarCodeHeight);

            _labelSettingRepository.UpdateLabel(labelData);
        }