Beispiel #1
0
 //保存数据的逻辑方法
 public bool SaveDictlibrary()
 {
     try
     {
         Initlocalsetting initlocalsettint = new Initlocalsetting();
         initlocalsettint.Hostmac = this.tbxMac.Text;
         Initlocalsetting initlocalsettintList = new InitlocalsettingService().GetInitlocalsettingInfo(initlocalsettint);
         if (initlocalsettintList != null)
         {
             initlocalsettintList.Pdfprinter     = this.Drop_PDFPRINTER.SelectedValue;
             initlocalsettintList.A4printer      = this.Drop_A4PRINTER.SelectedValue;
             initlocalsettintList.A5printer      = this.Drop_A5PRINTER.SelectedValue;
             initlocalsettintList.Barcodeprinter = this.Drop_BARCODEPRINTER.SelectedValue;
         }
         else
         {
             initlocalsettintList                = new Initlocalsetting();
             initlocalsettintList.Hostmac        = this.tbxMac.Text.Trim();
             initlocalsettintList.Hostname       = this.tbxName.Text.Trim();
             initlocalsettintList.Pdfprinter     = this.Drop_PDFPRINTER.SelectedValue;
             initlocalsettintList.A4printer      = this.Drop_A4PRINTER.SelectedValue;
             initlocalsettintList.A5printer      = this.Drop_A5PRINTER.SelectedValue;
             initlocalsettintList.Barcodeprinter = this.Drop_BARCODEPRINTER.SelectedValue;
         }
         return(new InitlocalsettingService().SaveDictlab(initlocalsettintList));
     }
     catch (Exception ex)
     {
         errorType = ex.Message;
         return(false);
     }
 }
Beispiel #2
0
 private void BingText()
 {
     try
     {
         Initlocalsetting initlocalsettint = new Initlocalsetting();
         initlocalsettint.Hostmac = this.tbxMac.Text;    //MacHost;
         initlocalsettint         = new InitlocalsettingService().GetInitlocalsettingInfo(initlocalsettint);
         if (initlocalsettint != null)
         {
             this.Drop_A4PRINTER.SelectedValue      = initlocalsettint.A4printer.ToString();
             this.Drop_A5PRINTER.SelectedValue      = initlocalsettint.A5printer.ToString();
             this.Drop_BARCODEPRINTER.SelectedValue = initlocalsettint.Barcodeprinter.ToString();
             this.Drop_PDFPRINTER.SelectedValue     = initlocalsettint.Pdfprinter.ToString();
         }
     }
     catch (Exception ex)
     {
         MessageBoxShow(ex.Message, MessageBoxIcon.Error);
     }
 }