示例#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
        private void btn_lebelSetting_Click(object sender, RoutedEventArgs e)
        {
            dynamic row = lvProducts.SelectedItem;

            _labelSettings = controller.GetLebelDate(row.Id);
            LabelSettings page = new LabelSettings(_labelSettings);

            NavigationService.Navigate(page);
        }
示例#3
0
        private void update_label_data(object sender, RoutedEventArgs e)
        {
            ProductController controller = new ProductController();
            LabelSettingModel model      = new LabelSettingModel(Id, lebelSettingCode, ItemId, print_item_code.IsChecked.Value, chk_item_detail.IsChecked.Value, "0", print_item_price.IsChecked.Value, chk_print_barcode.IsChecked.Value, bar_code_height.Text, label_sheet_dd.SelectedValue.ToString(), tb_no_of_prints.Text, nud_start_row.Value.ToString(), nud_start_column.Value.ToString());

            controller.SaveUpdateLabel(model);
            inventory product = new inventory();

            NavigationService.Navigate(product);
        }
示例#4
0
 public void SaveUpdateLabel(LabelSettingModel model)
 {
     try
     {
         objProductService.ProductServiceInstance().UpdateLabel(model);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         objProductService.ProductServiceInstanceClosed();
     }
 }
示例#5
0
 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);
     }
 }
示例#6
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);
        }