Ejemplo n.º 1
0
        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
        }
Ejemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();
                string userCode = this.tbUserCode.Text;
                string password = Utility.Md5(this.tbPassword.Text);

                User user = TheClientMgr.LoadUser(userCode);
                if (user != null && user.Password.ToUpper() == password.ToUpper() && user.IsActive)
                {
                    this.lblMessage.Text    = "登录成功!";
                    this.lblMessage.Visible = true;
                    this.LoginEvent(user, null);
                }
                else
                {
                    this.lblMessage.Text    = "登录失败!";
                    this.tbPassword.Text    = string.Empty;
                    this.lblMessage.Visible = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "未知错误!请与管理员联系!" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                InitialLogin();
            }
        }
Ejemplo n.º 3
0
        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
        }
Ejemplo n.º 4
0
 public UCShipReturn(User user)
 {
     InitializeComponent();
     this.gvList.AutoGenerateColumns   = false;
     this.gvHuList.AutoGenerateColumns = false;
     this.TheClientMgr = new ClientMgrWSSoapClient();
     this.user         = user;
     this.InitialAll();
 }
Ejemplo n.º 5
0
 public UCShipReturn(User user)
 {
     InitializeComponent();
     this.gvList.AutoGenerateColumns = false;
     this.gvHuList.AutoGenerateColumns = false;
     this.TheClientMgr = new ClientMgrWSSoapClient();
     this.user = user;
     this.InitialAll();
 }
Ejemplo n.º 6
0
 public UCDevanning(User user, string moduleType)
 {
     InitializeComponent();
     this.dgInList.AutoGenerateColumns  = false;
     this.dgOutList.AutoGenerateColumns = false;
     TheClientMgr         = new ClientMgrWSSoapClient();
     this.user            = user;
     this.timerCtrl       = new Timer();
     this.timerCtrl.Tick += new System.EventHandler(this.TimerCtrl_Tick);
     this.InitialAll();
 }
Ejemplo n.º 7
0
 public UCRepack(User user, string moduleType)
 {
     InitializeComponent();
     this.dgInList.AutoGenerateColumns = false;
     this.dgOutList.AutoGenerateColumns = false;
     TheClientMgr = new ClientMgrWSSoapClient();
     this.user = user;
     this.timerCtrl = new Timer();
     this.timerCtrl.Tick += new System.EventHandler(this.TimerCtrl_Tick);
     this.InitialAll();
 }
Ejemplo n.º 8
0
        public UCBatchDevanning(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>();
        }
Ejemplo n.º 9
0
        public UCBatchDevanning(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>();
        }
Ejemplo n.º 10
0
 public UCOrderReturn(User user, string moduleType)
 {
     InitializeComponent();
     this.gvList.AutoGenerateColumns = false;
     this.gvHuList.AutoGenerateColumns = false;
     this.TheClientMgr = new ClientMgrWSSoapClient();
     this.user = user;
     this.moduleType = moduleType;
     if (this.moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVERETURN)
     {
         this.btnOrderReturn.Text = "要货退货";
     }
     else if (this.moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPRETURN)
     {
         this.btnOrderReturn.Text = "发货退货";
     }
     this.InitialAll();
 }
Ejemplo n.º 11
0
 public UCOrderReturn(User user, string moduleType)
 {
     InitializeComponent();
     this.gvList.AutoGenerateColumns   = false;
     this.gvHuList.AutoGenerateColumns = false;
     this.TheClientMgr = new ClientMgrWSSoapClient();
     this.user         = user;
     this.moduleType   = moduleType;
     if (this.moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVERETURN)
     {
         this.btnOrderReturn.Text = "要货退货";
     }
     else if (this.moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPRETURN)
     {
         this.btnOrderReturn.Text = "发货退货";
     }
     this.InitialAll();
 }
Ejemplo n.º 12
0
 public UCBase(User user, string moduleType)
 {
     InitializeComponent();
     this.resolver = new Resolver();
     this.resolver.UserCode = user.Code;
     this.resolver.ModuleType = moduleType;
     this.gvHuList.AutoGenerateColumns = false;
     this.gvList.AutoGenerateColumns = false;
     this.TheClientMgr = new ClientMgrWSSoapClient();
     this.lblMessage.Text = string.Empty;
     this.enableCache = moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLIST
                     || moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE
                     //|| moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_STOCKTAKING
                     ;
     if (this.enableCache)
     {
         this.originalResolver = new Resolver();
     }
     this.timerCtrl = new Timer();
     this.timerCtrl.Tick += new System.EventHandler(this.TimerCtrl_Tick);
     this.InitialAll();
 }
Ejemplo n.º 13
0
 public UCBase(User user, string moduleType)
 {
     InitializeComponent();
     this.resolver                     = new Resolver();
     this.resolver.UserCode            = user.Code;
     this.resolver.ModuleType          = moduleType;
     this.gvHuList.AutoGenerateColumns = false;
     this.gvList.AutoGenerateColumns   = false;
     this.TheClientMgr                 = new ClientMgrWSSoapClient();
     this.lblMessage.Text              = string.Empty;
     this.enableCache                  = moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLIST ||
                                         moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE
                                         //|| moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_STOCKTAKING
     ;
     if (this.enableCache)
     {
         this.originalResolver = new Resolver();
     }
     this.timerCtrl       = new Timer();
     this.timerCtrl.Tick += new System.EventHandler(this.TimerCtrl_Tick);
     this.InitialAll();
 }
Ejemplo n.º 14
0
        private void CodeScan()
        {
            try
            {
                this.tbWO.Text = this.tbWO.Text.Trim().ToUpper();
                string woNo = this.tbWO.Text;
                this.resolver.Input = woNo;
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();

                if (this.resolver.Input == string.Empty || this.resolver.Input == null)
                {
                    this.lblmessage.Text = "请扫描工单";
                    this.tbWO.Focus();
                    return;
                }
                string onlineDate = TheClientMgr.ScanBarcode(resolver).Result;
                this.lblmessage.Text = "工单:" + woNo + "上线成功!";
                if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE)
                {
                    this.lblmessage.Text = "拣货单:" + woNo + "上线成功!";
                }
                this.lblmessage.ForeColor = Color.Green;
                this.ShowOrders(woNo, onlineDate);
                this.tbWO.ForeColor = Color.Black;
                this.tbWO.Text = string.Empty;
                this.tbWO.Focus();
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
                this.tbWO.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.tbWO.Text = string.Empty;
            }
        }
Ejemplo n.º 15
0
        private void CodeScan()
        {
            try
            {
                this.tbWO.Text = this.tbWO.Text.Trim().ToUpper();
                string woNo = this.tbWO.Text;
                this.resolver.Input = woNo;
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();

                if (this.resolver.Input == string.Empty || this.resolver.Input == null)
                {
                    this.lblmessage.Text = "请扫描工单";
                    this.tbWO.Focus();
                    return;
                }
                string onlineDate = TheClientMgr.ScanBarcode(resolver).Result;
                this.lblmessage.Text = "工单:" + woNo + "上线成功!";
                if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE)
                {
                    this.lblmessage.Text = "拣货单:" + woNo + "上线成功!";
                }
                this.lblmessage.ForeColor = Color.Green;
                this.ShowOrders(woNo, onlineDate);
                this.tbWO.ForeColor = Color.Black;
                this.tbWO.Text      = string.Empty;
                this.tbWO.Focus();
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
                this.tbWO.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.tbWO.Text = string.Empty;
            }
        }
Ejemplo n.º 16
0
 private void UCWOScanOffline_Load(object sender, EventArgs e)
 {
     this.InitialAll();
     this.TheClientMgr = new ClientMgrWSSoapClient();
 }
Ejemplo n.º 17
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();
                string userCode = this.tbUserCode.Text;
                string password = Utility.Md5(this.tbPassword.Text);

                User user = TheClientMgr.LoadUser(userCode);
                if (user != null && user.Password.ToUpper() == password.ToUpper() && user.IsActive)
                {
                    this.lblMessage.Text = "登录成功!";
                    this.lblMessage.Visible = true;
                    this.LoginEvent(user, null);
                }
                else
                {
                    this.lblMessage.Text = "登录失败!";
                    this.tbPassword.Text = string.Empty;
                    this.lblMessage.Visible = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "未知错误!请与管理员联系!" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                InitialLogin();
            }
        }
Ejemplo n.º 18
0
 private void UCWOScanOffline_Load(object sender, EventArgs e)
 {
     this.InitialAll();
     this.TheClientMgr = new ClientMgrWSSoapClient();
 }