コード例 #1
0
        private void GetUpdateProductCardDetail(string serialNo)
        {
            string outMsg = string.Empty;

            ServiceRef.ProductCard prdInfo = null;
            try
            {
                base.ShowWaitProcess();

                prdInfo = ServiceProvider.Instance.Proxy.GetUpdatePC_MTST_Out(serialNo, this.USER_ID, out outMsg);

                base.HideWaitProcess();

                if (prdInfo != null)
                {
                    this.lblSERIAL_NO.Text    = serialNo;
                    this.lblPRODUCT_NO.Text   = prdInfo.PRODUCT_NO;
                    this.lblPRODUCT_NAME.Text = prdInfo.PRODUCT_NAME;
                    this.lblMTL_TYPE.Text     = prdInfo.MTL_TYPE;
                    this.lblJOB_NO.Text       = prdInfo.JOB_NO;
                    this.lblSHIFT.Text        = prdInfo.JOB_LOT;
                    this.lblQty.Text          = string.Format("{0:#,##0}", prdInfo.QTY);
                    this.lblUNIT_ID.Text      = prdInfo.UNIT_ID;

                    this.txtSERIAL_NO.Text = string.Empty;
                    this.txtSERIAL_NO.Focus();

                    this._Box_Scann++;

                    this.lblNo_Box_Scaned.Text = string.Format("{0}/{1}", this._Box_Scann, this._Box_Total);

                    if (this._Box_Scann == this._Box_Total)
                    {
                        base.StartPlayTon_Complete();

                        this._Box_Scann = 0;
                        this._Box_Total = 0;

                        this.txtNoOfBox.Text = string.Empty;
                        this.txtNoOfBox.Focus();
                    }
                }
                else
                {
                    base.ShowWarningBox(ResourceManager.Instance.GetString(outMsg), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));

                    this.txtSERIAL_NO.Text = string.Empty;
                    this.txtSERIAL_NO.Focus();
                }
            }
            catch (WebException wex)
            {
                base.HideWaitProcess();
                this.ClearDataOnScreen();

                base.ShowErrorBox(wex.Message, "WebException");

                this.txtSERIAL_NO.Text = string.Empty;
                this.txtSERIAL_NO.Focus();
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                this.ClearDataOnScreen();

                base.ShowErrorBox(ex.Message, "Exception");

                this.txtSERIAL_NO.Text = string.Empty;
                this.txtSERIAL_NO.Focus();
            }
        }
コード例 #2
0
        private void GetUpdateProductCardDetail(string doNo, string serialNo)
        {
            string outMsg = string.Empty;

            ServiceRef.ProductCard prdInfo = null;
            try
            {
                base.ShowWaitProcess();

                prdInfo = ServiceProvider.Instance.Proxy.GetUpdatePC_MTST_In(doNo, serialNo, this.USER_ID, out outMsg);

                base.HideWaitProcess();

                if (prdInfo != null)
                {
                    this.lblSERIAL_NO.Text    = serialNo;
                    this.lblPRODUCT_NO.Text   = prdInfo.PRODUCT_NO;
                    this.lblPRODUCT_NAME.Text = prdInfo.PRODUCT_NAME;
                    this.lblMTL_TYPE.Text     = prdInfo.MTL_TYPE;
                    this.lblJOB_NO.Text       = prdInfo.JOB_NO;
                    this.lblSHIFT.Text        = prdInfo.JOB_LOT;
                    this.lblQty.Text          = string.Format("{0:#,##0}", prdInfo.QTY);
                    this.lblUNIT_ID.Text      = prdInfo.UNIT_ID;
                    //** Remark : ASG_NG = Scan Qty , BOX_QTY for Total DO Qty
                    this.lblTotalPCS.Text = string.Format("{0:#,##0} / {1:#,##0}", prdInfo.ASG_NG, prdInfo.BOX_QTY);
                    //** Remark : NG_QTY = Scan Box , BOX_SCANNED for Total DO Box
                    this.lblTotalBox.Text = string.Format("{0:#,##0} / {1:#,##0}", prdInfo.NG_QTY, prdInfo.BOX_SCANNED);


                    if (prdInfo.ASG_NG == prdInfo.BOX_QTY)
                    {
                        base.ShowCompletelyBox(ResourceManager.Instance.GetString(outMsg), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));

                        this.txtSERIAL_NO.Text = string.Empty;
                        this.txtSERIAL_NO.Focus();

                        this.txtDO_NO.ReadOnly = false;
                        this.txtDO_NO.Text     = string.Empty;
                        this.txtDO_NO.Focus();
                    }
                    else
                    {
                        this.txtSERIAL_NO.Text = string.Empty;
                        this.txtSERIAL_NO.Focus();
                    }
                }
                else
                {
                    base.ShowWarningBox(ResourceManager.Instance.GetString(outMsg), ResourceManager.Instance.GetString("TITLE_PLEASE_CHECK"));

                    this.txtSERIAL_NO.Text = string.Empty;
                    this.txtSERIAL_NO.Focus();
                }
            }
            catch (WebException wex)
            {
                base.HideWaitProcess();
                this.ClearDataOnScreen();

                base.ShowErrorBox(wex.Message, "WebException");

                this.txtSERIAL_NO.Text = string.Empty;
                this.txtSERIAL_NO.Focus();
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                this.ClearDataOnScreen();

                base.ShowErrorBox(ex.Message, "Exception");

                this.txtSERIAL_NO.Text = string.Empty;
                this.txtSERIAL_NO.Focus();
            }
        }