Ejemplo n.º 1
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "BRANCH":
                if (this.pofrmGetBranch == null)
                {
                    this.pofrmGetBranch          = new BeSmartMRP.DialogForms.dlgGetBranch();
                    this.pofrmGetBranch.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetBranch.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "COOR":
                if (this.pofrmGetCoor == null)
                {
                    this.pofrmGetCoor          = new DialogForms.dlgGetCoor(CoorType.Supplier);
                    this.pofrmGetCoor.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetCoor.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "BOOK":
                if (this.pofrmGetBook == null)
                {
                    this.pofrmGetBook          = new DialogForms.dlgGetFMBook(this.mstrRefType);
                    this.pofrmGetBook.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetBook.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;
            }
        }
Ejemplo n.º 2
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "BRANCH":
                if (this.pofrmGetBranch == null)
                {
                    this.pofrmGetBranch          = new BeSmartMRP.DialogForms.dlgGetBranch();
                    this.pofrmGetBranch.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetBranch.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "COOR":
                if (this.pofrmGetCoor == null)
                {
                    this.pofrmGetCoor          = new DialogForms.dlgGetCoor(CoorType.Supplier);
                    this.pofrmGetCoor.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetCoor.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "BOOK":
                if (this.pofrmGetBook == null)
                {
                    this.pofrmGetBook          = new DialogForms.dlgGetFMBook(this.mstrRefType);
                    this.pofrmGetBook.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetBook.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "DOC_MO":
                if (this.pofrmGetDoc == null)
                {
                    this.pofrmGetDoc            = new DialogForms.dlgGetDocMO();
                    this.pofrmGetDoc.Location   = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetDoc.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                    this.pofrmGetDoc.FIlterStep = " and MFWORDERHD.CMSTEP <> 'P' and MFWORDERHD.CSTAT <> 'C' and MFWORDERHD.CPRSTEP = ' ' ";
                }
                break;
            }
        }
Ejemplo n.º 3
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "BOOK":
                if (this.pofrmGetBook == null)
                {
                    this.pofrmGetBook          = new DialogForms.dlgGetFMBook(this.mstrRefType);
                    this.pofrmGetBook.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetBook.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "LOADSO":
                using (Common.dlgQuerySO1 dlg = new Common.dlgQuerySO1(this.mstrRefType, this.mstrBranch, this.txtQcBook.Tag.ToString(), this.mstrCoor, this.mstrProd))
                {
                    dlg.ShowDialog();
                    if (dlg.DialogResult == DialogResult.OK)
                    {
                        //
                        if (this.mstrReferKey != dlg.RefToKey)
                        {
                            //this.pmClearTemRefTo();
                            this.mstrReferKey = dlg.RefToKey;
                        }

                        //this.txtTotMfgQty.Validated = dlg.RefToQty;
                        foreach (DataRow dtrTemSO in dlg.RetVal.Rows)
                        {
                            if (!Convert.ToBoolean(dtrTemSO["CTAGVALUE"]))
                            {
                                continue;
                            }

                            decimal   decSumQty = 0;
                            DataRow[] da        = this.dtsDataEnv.Tables[this.mstrTemPd].Select("cOrderI = '" + dtrTemSO["fcSkid"].ToString() + "'");
                            if (da.Length == 0)
                            {
                                DataRow dtrNewSO = this.dtsDataEnv.Tables[this.mstrTemPd].NewRow();
                                dtrNewSO["cOrderI"]   = dtrTemSO["fcSkid"].ToString();
                                dtrNewSO["cOrderH"]   = dtrTemSO["fcOrderH"].ToString();
                                dtrNewSO["cCoor"]     = dtrTemSO["fcCoor"].ToString();
                                dtrNewSO["cProd"]     = dtrTemSO["fcProd"].ToString();
                                dtrNewSO["fcCode"]    = dtrTemSO["fcCode"].ToString();
                                dtrNewSO["fcRefNo"]   = dtrTemSO["fcRefNo"].ToString();
                                dtrNewSO["fdDate"]    = Convert.ToDateTime(dtrTemSO["fdDate"]);
                                dtrNewSO["fnBackQty"] = Convert.ToDecimal(dtrTemSO["fnBackQty"]);
                                dtrNewSO["fnMOQty"]   = Convert.ToDecimal(dtrTemSO["fnBackQty"]);
                                this.dtsDataEnv.Tables[this.mstrTemPd].Rows.Add(dtrNewSO);

                                decSumQty               = decSumQty + Convert.ToDecimal(dtrTemSO["fnBackQty"]);
                                this.txtQcCoor.Text     = dtrTemSO["QcCoor"].ToString();
                                this.txtQnCoor.Text     = dtrTemSO["QnCoor"].ToString();
                                this.txtQcProd.Text     = dtrTemSO["QcProd"].ToString();
                                this.txtQnProd.Text     = dtrTemSO["QnProd"].ToString();
                                this.txtTotMfgQty.Value = decSumQty;

                                this.mstrCoor = dtrTemSO["fcCoor"].ToString();
                                this.mstrProd = dtrTemSO["fcProd"].ToString();
                            }
                        }
                    }
                }
                break;
            }
        }