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); } }
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); }