public void CheckMachine(string machineNo)
 {
     try
     {
         ResponseResult res = new ResponseResult();
         using (ReplenishBLL repBll = new ReplenishBLL())
         {
             res = repBll.CheckMachine(machineNo);
             if (res.Message == "OK")
             {
                 this.SetActiveColor("txtNoOfLabel");
                 this.SetTextFocusControl(this.txtNoOfLabel, false);
             }
             else
             {
                 base.ShowWarningBox(string.Format("'{0}' {1}", machineNo, ResourceManager.Instance.GetString(res.Message)), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));
                 this.SetActiveColor("txtMCNo");
                 this.SetTextFocusControl(this.txtMCNo, true);
             }
         }
     }
     catch (WebException wex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(wex.Message, "WebException");
     }
     catch (Exception ex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(ex.Message, "Exception");
     }
 }
Exemple #2
0
        public ResponseResult ScanRepLabel(string serialno, string repno, string jobno, string mcno, string userid)
        {
            response = new ResponseResult();

            using (ReplenishBLL repBll = new ReplenishBLL())
            {
                response = repBll.ScanRepLabel(serialno, repno, jobno, mcno, userid);
            }

            return response;
        }
Exemple #3
0
        public ResponseResult StartReplenish(string jobno, string mcno, int noOfBag, string userid)
        {
            response = new ResponseResult();

            using (ReplenishBLL repBll = new ReplenishBLL())
            {
                response = repBll.StartReplenish(jobno, mcno, noOfBag, userid);
            }

            return response;
        }
Exemple #4
0
        public ResponseResult CheckMachine(string mcno)
        {
            response = new ResponseResult();

            using (ReplenishBLL repBll = new ReplenishBLL())
            {
                response = repBll.CheckMachine(mcno);
            }

            return response;
        }
Exemple #5
0
        public ResponseResult CheckJobOrder(string jobno)
        {
            response = new ResponseResult();

            using (ReplenishBLL repBll = new ReplenishBLL())
            {
                response = repBll.CheckJobOrder(jobno);
            }

            return response;
        }
 public void CheckJobOrder(string jobNo)
 {
     try
     {
         ResponseResult res = new ResponseResult();
         using (ReplenishBLL repBll = new ReplenishBLL())
         {
             res = repBll.CheckJobOrder(jobNo);
             if (res.Message == "OK")
             {
                 this.SetActiveColor("txtMCNo");
                 this.lblProductNo.Text = res.Data.ToString();
                 this.SetTextFocusControl(this.txtMCNo, true);
             }
             else
             {
                 base.ShowWarningBox(string.Format("'{0}' {1}", jobNo, ResourceManager.Instance.GetString(res.Message)), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));
                 this.SetActiveColor("txtJobNo");
                 this.SetTextFocusControl(this.txtJobNo, true);
             }
         }
         this.txtMCNo.Text      = string.Empty;
         this.txtNoOfLabel.Text = string.Empty;
         //this.lblProductNo.Text = string.Empty;
         this.txtSerialNo.Text  = String.Empty;
         this.lblLabelScan.Text = String.Empty;
         this.lblMtlCode.Text   = String.Empty;
         this.lblMtlName.Text   = String.Empty;
         this.lblGrade.Text     = String.Empty;
         this.lblColor.Text     = String.Empty;
         this.lblQty.Text       = String.Empty;
         this._SCAN_COUNTER     = 0;
         this.lblTotalQty.Text  = "0   /   0";
     }
     catch (WebException wex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(wex.Message, "WebException");
     }
     catch (Exception ex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(ex.Message, "Exception");
     }
 }
        public void StartReplenish()
        {
            try
            {
                ResponseResult res = new ResponseResult();
                using (ReplenishBLL repBll = new ReplenishBLL())
                {
                    res = repBll.StartReplenish(this.txtJobNo.Text, this.txtMCNo.Text, Int32.Parse(this.txtNoOfLabel.Text), this.USER_ID);
                }

                if (res.Status)
                {
                    if (res.Message == "OK")
                    {
                        this.lblTotalQty.Text = String.Format("{0}   /   {1}", this.SCAN_COUNTER, this.txtNoOfLabel.Text);
                        this.REP_NO           = res.Data.ToString();
                        this.SetActiveColor("txtSerialNo");
                        this.SetTextFocusControl(this.txtSerialNo, true);
                    }
                }
            }
            catch (WebException wex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(wex.Message, "WebException");
                this.SetActiveColor("txtJobNo");
                this.SetTextFocusControl(this.txtJobNo, true);
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(ex.Message, "Exception");
                this.SetActiveColor("txtJobNo");
                this.SetTextFocusControl(this.txtJobNo, true);
            }
        }
        public void ScanLabel(string serialNo)
        {
            try
            {
                ResponseResult res = new ResponseResult();
                using (ReplenishBLL repBll = new ReplenishBLL())
                {
                    res = repBll.ScanRepLabel(serialNo, this.REP_NO, txtJobNo.Text, txtMCNo.Text, this.USER_ID);
                }

                if (res.Status)
                {
                    if (res.Data != null)
                    {
                        MaterialCard matInfo = new MaterialCard();
                        matInfo = JsonConvert.DeserializeObject <MaterialCard>(res.Data.ToString());

                        this.lblLabelScan.Text = serialNo;
                        this.lblMtlCode.Text   = matInfo.MTL_CODE;
                        this.lblMtlName.Text   = matInfo.MTL_NAME;
                        this.lblGrade.Text     = matInfo.MTL_GRADE;
                        this.lblColor.Text     = matInfo.MTL_COLOR;
                        this.lblQty.Text       = matInfo.QTY.ToString() + "  " + matInfo.UNIT_ID;


                        if (res.Message == "OK")
                        {
                            this.SERIAL_NO     = serialNo;
                            this.MATERIAL_CODE = matInfo.MTL_CODE;
                            this.SCAN_COUNTER++;
                            this.lblTotalQty.Text = String.Format("{0}   /   {1}", this.SCAN_COUNTER, this.txtNoOfLabel.Text);
                            this.SetActiveColor("txtSerialNo");
                            this.SetTextFocusControl(this.txtSerialNo, true);

                            if (this.SCAN_COUNTER == Convert.ToInt32(this.txtNoOfLabel.Text, NumberFormatInfo.CurrentInfo))
                            {
                                base.ShowCompletelyBox(string.Format("'{0}' {1}", this.lblProductNo.Text, ResourceManager.Instance.GetString("REPLENISH_COMPLETE")), ResourceManager.Instance.GetString("TITLE_INFORMATION"));

                                this.txtJobNo.Text     = String.Empty;
                                this.txtMCNo.Text      = String.Empty;
                                this.txtNoOfLabel.Text = String.Empty;
                                this.txtSerialNo.Text  = string.Empty;
                                this.SetActiveColor("txtJobNo");
                                this.SetTextFocusControl(this.txtJobNo, true);
                            }
                        }
                        else
                        {
                            base.ShowWarningBox(string.Format("'{0}' {1}", serialNo, ResourceManager.Instance.GetString(res.Message)), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));
                            this.SetActiveColor("txtSerialNo");
                            this.SetTextFocusControl(this.txtSerialNo, true);
                        }
                    }
                    else
                    {
                        base.ShowWarningBox(string.Format("'{0}' {1}", serialNo, ResourceManager.Instance.GetString(res.Message)), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));
                        this.SetActiveColor("txtSerialNo");
                        this.SetTextFocusControl(this.txtSerialNo, true);
                    }
                }
            }
            catch (WebException wex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(wex.Message, "WebException");
                this.SetActiveColor("txtSerialNo");
                this.SetTextFocusControl(this.txtSerialNo, true);
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(ex.Message, "Exception");
                this.SetActiveColor("txtSerialNo");
                this.SetTextFocusControl(this.txtSerialNo, true);
            }
        }