Ejemplo n.º 1
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "FILTER":
                using (Common.dlgFilter04 dlgFilter = new Common.dlgFilter04())
                {
                    dlgFilter.SetTitle(this.Text, TASKNAME);
                    dlgFilter.ShowDialog();
                    if (dlgFilter.DialogResult == DialogResult.OK)
                    {
                        this.mbllFilterResult = true;

                        //this.txtQnRefType.Text = "เอกสารการปันส่วนงบประมาณ";
                        this.mstrBranchID = dlgFilter.BranchID;
                        this.mstrRefType  = dlgFilter.RefTypeCode;

                        this.txtQcRefType.Text = this.mstrRefType;
                        this.txtQnRefType.Text = dlgFilter.RefTypeName;

                        this.pmRefreshBrowView();
                        this.grdBrowView.Focus();
                    }
                }
                break;

            case "WHOUSE":
                if (this.pofrmGetWHouse == null)
                {
                    this.pofrmGetWHouse          = new DialogForms.dlgGetWHouse();
                    this.pofrmGetWHouse.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetWHouse.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;
            }
        }
Ejemplo n.º 2
0
        private bool pmInitPopUpDialog(string inDialogName)
        {
            string  strErrorMsg = "";
            DataRow dtrGetVal   = null;

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

            case "LOT":
                if (this.podlgGetLot == null)
                {
                    this.podlgGetLot          = new dlgSelLot();
                    this.podlgGetLot.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.podlgGetLot.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;
            }
        }
Ejemplo n.º 4
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "COOR":
                if (this.pofrmGetCoor == null)
                {
                    //this.pofrmGetCoor = new DialogForms.dlgGetCoor();
                    this.pofrmGetCoor          = new DatabaseForms.frmCust(FormActiveMode.PopUp);
                    this.pofrmGetCoor.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetCoor.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

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

            case "SEMPL":
                if (this.pofrmGetSEmpl == null)
                {
                    this.pofrmGetSEmpl          = new DialogForms.dlgGetEmplSM("S");
                    this.pofrmGetSEmpl.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetSEmpl.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "EMPL":
                if (this.pofrmGetEmpl == null)
                {
                    this.pofrmGetEmpl          = new DialogForms.dlgGetEmplSM("X");
                    this.pofrmGetEmpl.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetEmpl.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;
            }
        }
Ejemplo n.º 5
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 "WHOUSE":
                if (this.pofrmGetWareHouse == null)
                {
                    this.pofrmGetWareHouse          = new DialogForms.dlgGetWHouse();
                    this.pofrmGetWareHouse.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetWareHouse.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.º 6
0
        private void pmInitPopUpDialog(string inDialogName)
        {
            switch (inDialogName.TrimEnd().ToUpper())
            {
            case "WHOUSE":
                if (this.pofrmGetWareHouse == null)
                {
                    this.pofrmGetWareHouse          = new DialogForms.dlgGetWHouse();
                    this.pofrmGetWareHouse.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.pofrmGetWareHouse.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "LOT":
                if (this.podlgGetLot == null)
                {
                    this.podlgGetLot          = new dlgSelLot();
                    this.podlgGetLot.Location = new Point(AppUtil.CommonHelper.SysMetric(1) - this.podlgGetLot.Width - 10, AppUtil.CommonHelper.SysMetric(9) + 5);
                }
                break;

            case "PDSER":
                using (Transaction.Common.dlgGetPdSerial dlg = new Transaction.Common.dlgGetPdSerial())
                {
                    dlg.IsQuickInsert = this.mbllIsQInsertPdSer;
                    dlg.SaleOrBuy     = this.mstrSaleOrBuy;
                    dlg.BindData(this.dtsDataEnv, this.mintParentID, this.mstrProdID, this.mstrWHouse, this.mstrWHLoca, this.txtLot.Text.TrimEnd());
                    dlg.ShowDialog();
                    if (dlg.DialogResult == DialogResult.OK)
                    {
                        //this.mstrWHLoca = dlg.WHLocaID;

                        //string strErrorMsg = "";
                        //WS.Data.Agents.cDBMSAgent pobjSQLUtil = new WS.Data.Agents.cDBMSAgent(App.ConnectionString, App.DatabaseReside);
                        //pobjSQLUtil.SetPara(new object[] { this.mstrWHLoca });
                        //if (pobjSQLUtil.SQLExec(ref this.dtsDataEnv, "QWHLoca", "WHLOCA", "select cCode, cName from WHLoca where cRowID = ?", ref strErrorMsg))
                        //{
                        //    this.txtQcWHLoca.RowID = this.mstrWHLoca;
                        //    this.txtQcWHLoca.Text = this.dtsDataEnv.Tables["QWHLoca"].Rows[0]["cCode"].ToString().TrimEnd();
                        //    this.txtQnWHLoca.Text = this.dtsDataEnv.Tables["QWHLoca"].Rows[0]["cName"].ToString().TrimEnd();
                        //}

                        this.pmSetStkBal();
                    }
                }
                break;

                //case "PDSER_SEARCH":
                //    using (TransactionForms.Common.dlgFindPdSer dlg = new TransactionForms.Common.dlgFindPdSer(this.mstrBranchID, this.mstrWHouse, this.mstrProdID))
                //    {

                //        dlg.BindData(this.dtsDataEnv, this.mintParentID);
                //        dlg.ShowDialog();
                //        if (dlg.DialogResult == DialogResult.OK)
                //        {


                //            string strErrorMsg = "";
                //            WS.Data.Agents.cDBMSAgent pobjSQLUtil = new WS.Data.Agents.cDBMSAgent(App.ConnectionString, App.DatabaseReside);

                //            string strLot = dlg.Lot;
                //            string strWHLoca = dlg.WHLocaID;
                //            if (this.txtLot.Text.TrimEnd() != strLot.TrimEnd()
                //                || this.mstrWHLoca != strWHLoca)
                //            {
                //                this.mPdSer.DeleteItemPdSer(this.mintParentID, this.dtsDataEnv, ref strErrorMsg);
                //            }

                //            this.txtLot.Text = strLot;

                //            this.mstrWHLoca = strWHLoca;

                //            pobjSQLUtil.SetPara(new object[] { this.mstrWHLoca });
                //            if (pobjSQLUtil.SQLExec(ref this.dtsDataEnv, "QWHLoca", "WHLOCA", "select cCode, cName from WHLoca where cRowID = ?", ref strErrorMsg))
                //            {
                //                this.txtQcWHLoca.RowID = this.mstrWHLoca;
                //                this.txtQcWHLoca.Text = this.dtsDataEnv.Tables["QWHLoca"].Rows[0]["cCode"].ToString().TrimEnd();
                //                this.txtQnWHLoca.Text = this.dtsDataEnv.Tables["QWHLoca"].Rows[0]["cName"].ToString().TrimEnd();
                //            }

                //            this.pmSetStkBal();

                //            DataRow[] dtrPdSerRow = this.dtsDataEnv.Tables[PdSer.xd_Alias_TemPdSer].Select("cQcPdSer = '" + dlg.PdSerCode + "'");

                //            if (dtrPdSerRow.Length == 0)
                //                this.pmInsertTemPdSer(dlg.PdSerID, dlg.PdSerCode);

                //        }
                //    }
                //    break;
            }
        }