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 override void OnSettingsLoaded() { LabelSetting description = new LabelSetting { Name = "A webbrowser will open to localhost:2198 when you start this mod.", }; SettingManager.AddDefault("Description", description); }
public void UpdateLabel(LabelSetting labelData) { if (labelData.Id > 0 && labelData.Id != null) { _labelSettingProvider.Update(labelData); } else { _labelSettingProvider.Insert(labelData); } }
private LabelListSetting GenerateDefaultLabelSetting() { var settings = new LabelListSetting(); //Name var setting = new LabelSetting { TextExpression = $"[{HydrologicAttributes.Name}]", Name = HydrologicAttributes.NameCn, IsVisible = false, Placement = LabelPlacement.PointAboveLeft //Position = LabelPosition.FixedPositionOrRemove }; settings.LabelSettings.Add(setting); //L setting = new LabelSetting { TextExpression = $"[{HydrologicAttributes.L}]", Name = HydrologicAttributes.LCn, IsVisible = false, Placement = LabelPlacement.PointBelowLeft //Position = LabelPosition.FixedPositionOrRemove }; settings.LabelSettings.Add(setting); //Wl1 setting = new LabelSetting { TextExpression = $"[{HydrologicAttributes.Wl1}]", Name = HydrologicAttributes.Wl1Cn, IsVisible = false, Placement = LabelPlacement.PointBelowRight, LabelColor = Colors.Brown //Position = LabelPosition.FixedPositionOrRemove }; settings.LabelSettings.Add(setting); //Type setting = new LabelSetting { TextExpression = $"[{HydrologicAttributes.Type}]", Name = HydrologicAttributes.TypeCn, IsVisible = false, Placement = LabelPlacement.PointAboveRight, LabelColor = Colors.Brown //Position = LabelPosition.FixedPositionOrRemove }; settings.LabelSettings.Add(setting); return(settings); }
private LabelListSetting GenerateDefaultLabelSetting() { var settings = new LabelListSetting(); //Name var setting = new LabelSetting { TextExpression = $"[Name]", IsVisible = true, Placement = LabelPlacement.PointAboveLeft, LabelColor = Colors.Black, Position = LabelPosition.RepositionOrRemove }; settings.LabelSettings.Add(setting); return(settings); }
public LabelSettingModel GetLabelData(int ItemId) { try { LabelSetting labelData = _labelSettingRepository.GetLabelData(ItemId); if (labelData != null) { return(new LabelSettingModel(labelData.Id, labelData.LabelSettingCode, labelData.ItemId, labelData.PrintItemCode, labelData.PrintItemDetail, labelData.PrintUnitMeasure, labelData.PrintItemPrice, labelData.PrintBarCode, labelData.BarCodeHeight, labelData.LabelSheet, labelData.TotalNoOfPrints, labelData.StartRow, labelData.StartColumn)); } LabelSettingModel newLabelData = new LabelSettingModel(); newLabelData.ItemId = ItemId; return(newLabelData); } catch (Exception ex) { fault.Result = false; fault.ErrorMessage = "Error in GetLabelData method"; fault.ErrorDetails = ex.ToString(); throw new FaultException <FaultData>(fault); } }
public LabelSettingVm(LabelListSetting listSetting, LabelSetting setting) { this.listSetting = listSetting; this.labelSetting = setting; }
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); }
public LabelSettingModel GetLabelData(int ItemId) { LabelSetting labelData = _labelSettingRepository.GetLabelData(ItemId); return(new LabelSettingModel(labelData.Id, labelData.LabelSettingCode, labelData.ItemId, labelData.PrintItemCode, labelData.PrintItemDetail, labelData.PrintUnitMeasure, labelData.PrintItemPrice, labelData.PrintBarCode, labelData.BarCodeHeight)); }