Exemple #1
0
 public void UpdateMixedQty(decimal mixQty)
 {
     try
     {
         ResponseResult res = new ResponseResult();
         using (MixingBLL mixingBll = new MixingBLL())
         {
             string test = this.txtSerialNo.Text;
             res = mixingBll.UpdateMixedQty(this.SERIAL_NO, lblMixingNo.Text, mixQty);
         }
     }
     catch (WebException wex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(wex.Message, "WebException");
     }
     catch (Exception ex)
     {
         base.HideWaitProcess();
         base.ShowErrorBox(ex.Message, "Exception");
     }
 }
Exemple #2
0
        public void StartMixing(decimal tresVal)
        {
            try
            {
                this.lblTRES.Text = tresVal.ToString("F2");
                ResponseResult res = new ResponseResult();
                using (MixingBLL mixingBll = new MixingBLL())
                {
                    res = mixingBll.StartMixing(tresVal, Int32.Parse(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.lblMixingNo.Text = res.Data.ToString();
                        this.SetActiveColor("txtSerialNo");
                        this.SetTextFocusControl(this.txtSerialNo, false);
                    }
                }
            }
            catch (WebException wex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(wex.Message, "WebException");
                this.SetActiveColor("txtNoOfLabel");
                this.SetTextFocusControl(this.txtNoOfLabel, false);
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                base.ShowErrorBox(ex.Message, "Exception");
                this.SetActiveColor("txtNoOfLabel");
                this.SetTextFocusControl(this.txtNoOfLabel, false);
            }
        }
Exemple #3
0
        public void ScanMixingLabel(string serialNo)
        {
            try
            {
                ResponseResult res = new ResponseResult();
                using (MixingBLL mixingBll = new MixingBLL())
                {
                    res = mixingBll.ScanMixingLabel(serialNo, lblMixingNo.Text, this.MATERIAL_CODE, 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 (matInfo.MTL_GRADE.Contains("M/B"))
                            {
                                using (frmInputMB frmMb = new frmInputMB(this))
                                {
                                    frmMb.ShowDialog();
                                }
                            }

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

                                this.txtSerialNo.Text  = String.Empty;
                                this.lblTRES.Text      = String.Empty;
                                this.lblMixingNo.Text  = string.Empty;
                                this.txtNoOfLabel.Text = String.Empty;
                                this.SetActiveColor("txtNoOfLabel");
                            }
                        }
                        else
                        {
                            base.ShowWarningBox(string.Format("'{0}' {1}", serialNo, ResourceManager.Instance.GetString(res.Message)), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));
                            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.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);
            }
        }