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; } }
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; } }