public UCPrintMonitor(User user, string moduleType) { InitializeComponent(); this.resolver = new Resolver(); this.resolver.UserCode = user.Code; this.resolver.ModuleType = moduleType; this.TheClientMgr = new ClientMgrWSSoapClient(); this.dataGridView1.AutoGenerateColumns = false; this.resolver.Transformers = null; this.resolver.Result = string.Empty; this.resolver.BinCode = string.Empty; this.resolver.Code = string.Empty; this.resolver.CodePrefix = string.Empty; this.cacheReceiptNotes = new List <ReceiptNote>(); //timer1_Tick(this, null); #region Printer foreach (string fPrinterName in LocalPrinter.GetLocalPrinters()) { this.comboBoxPrint1.Items.Add(fPrinterName); this.comboBoxPrint2.Items.Add(fPrinterName); this.comboBoxPrint3.Items.Add(fPrinterName); this.comboBoxPrint4.Items.Add(fPrinterName); this.comboBoxPrint5.Items.Add(fPrinterName); } //this.comboBoxPrint1.SelectedItem = Settings.Default.DefaultPrintName1; #endregion }
public UCModuleSelection(User user) { if (user != null) { this.user = user; this.resolver = new Resolver(); this.resolver.UserCode = user.Code; this.row = 0; this.maxRow = Convert.ToInt32(ConfigurationSettings.AppSettings["ScanOnline_MaxRow"]); InitializeComponent(); this.dgList.AutoGenerateColumns = false; #region Dictionary定义 #region Procurement dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE, new ModuleSelection(btnReceive, tabProcurement, Keys.D1, Keys.NumPad1)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVERETURN, new ModuleSelection(btnReceiveReturn, tabProcurement, Keys.D2, Keys.NumPad2)); #endregion #region Production dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_ONLINE, new ModuleSelection(btnOnline, tabProduction, Keys.D1, Keys.NumPad1)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_OFFLINE, new ModuleSelection(btnOffline, tabProduction, Keys.D2, Keys.NumPad2)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_MATERIALIN, new ModuleSelection(btnMaterialIn, tabProduction, Keys.D3, Keys.NumPad3)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_FLUSHBACK, new ModuleSelection(btnFlushBack, tabProduction, Keys.D4, Keys.NumPad4)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_REPACK, new ModuleSelection(btnRepack, tabProduction, Keys.D5, Keys.NumPad5)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_REUSE, new ModuleSelection(btnReuse, tabProduction, Keys.D6, Keys.NumPad6)); #endregion #region Distribution dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE, new ModuleSelection(btnPickListOnline, tabDistribution, Keys.D1, Keys.NumPad1)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLIST, new ModuleSelection(btnPickList, tabDistribution, Keys.D2, Keys.NumPad2)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIP, new ModuleSelection(btnShip, tabDistribution, Keys.D3, Keys.NumPad3)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPORDER, new ModuleSelection(btnShipOrder, tabDistribution, Keys.D4, Keys.NumPad4)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPRETURN, new ModuleSelection(btnShipReturn, tabDistribution, Keys.D5, Keys.NumPad5)); //dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPCONFIRM, new ModuleSelection(btnShipConfirm, tabDistribution, Keys.D5, Keys.NumPad5)); #endregion #region Inventory dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_TRANSFER, new ModuleSelection(btnInvTransfer, tabInventory, Keys.D1, Keys.NumPad1)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PUTAWAY, new ModuleSelection(btnPutAway, tabInventory, Keys.D2, Keys.NumPad2)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKUP, new ModuleSelection(btnPickUp, tabInventory, Keys.D3, Keys.NumPad3)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_DEVANNING, new ModuleSelection(btnUnboxing, tabInventory, Keys.D4, Keys.NumPad4)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_STOCKTAKING, new ModuleSelection(btnStockTaking, tabInventory, Keys.D5, Keys.NumPad5)); dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_HUSTATUS, new ModuleSelection(btnHuStatus, tabInventory, Keys.D6, Keys.NumPad6)); //dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_INSPECTION, new ModuleSelection(btnInspection, tabInventory, Keys.D0, Keys.NumPad0)); #endregion #region Inspection dicModuleSelection.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_INSPECT, new ModuleSelection(btnInspect, tabInspection, Keys.D1, Keys.NumPad1)); #endregion #endregion dicUser.Clear(); CheckAccessPermission(); this.tabModule.SelectedTab = this.tabProduction; this.ShowdgList(); foreach (string fPrinterName in LocalPrinter.GetLocalPrinters()) { this.comboBoxPrint.Items.Add(fPrinterName); } this.comboBoxPrint.SelectedItem = Settings.Default.DefaultPrintName1; } else { } }