public void OpenNTKTForm(string strKHMS, string strContractID, string strPOID, string strPONumber) { NTKTInfor nTKTInfor = new NTKTInfor(); //nTKTInfor.UpdateCatalogPanel = new NTKTInfor.UpdateCatalogDelegate(GetCatalogvalue); nTKTInfor.SetKHMS(strKHMS); nTKTInfor.requestDashBoardPurchaseOderForm = new NTKTInfor.RequestDashBoardPurchaseOderForm(OpenPOForm); strContractID = strContractID.Replace("Contract_", ""); nTKTInfor.SetContractID(strContractID); nTKTInfor.SetPOID(strPOID); nTKTInfor.SetPONumber(strPONumber); OpenChidForm(nTKTInfor); return; }
public void treeView1_DoubleClick(object sender, EventArgs e) { /*OK Important for Communication*/ /*Check What Label Checked and it's parent Checked*/ MessageBox.Show(treeView1.SelectedNode.Name.ToString()); string strNodeID = treeView1.SelectedNode.Name.ToString(); if (null != treeView1.SelectedNode.Parent) { string strParentNodeID = treeView1.SelectedNode.Parent.Name.ToString(); MessageBox.Show(treeView1.SelectedNode.Parent.Text); } else { MessageBox.Show("No Parent Node"); } string[] temp = strNodeID.Split('_'); temp[0] += "_"; /*Get Detail Infor On Database*/ switch (temp[0]) { case ConstantVar.ContractType: /*DASHBOARD Display Gui Contract*/ ContractInfoChildForm contractInfoChildForm = new ContractInfoChildForm(); contractInfoChildForm.UpdateCatalogPanel = new ContractInfoChildForm.UpdateCatalogDelegate(GetCatalogvalue); /*DASHBOAD GET REQEST FROM CONTRACT GUI*/ contractInfoChildForm.RequestDashBoardOpenPOForm = new ContractInfoChildForm.RequestDashBoardOpenChildForm(OpenPOForm); contractInfoChildForm.SetValueItemForm(temp[1]); //PurchaseOderInfor purchaseOderInfor1 = new PurchaseOderInfor(); //purchaseOderInfor1.requestDashBoardOpenNTKTForm = new PurchaseOderInfor.RequestDashBoardOpenNTKTForm(OpenNTKTForm); OpenChidForm(contractInfoChildForm); contractInfoChildForm.requestDashBoardOpendescriptionForm = new ContractInfoChildForm.RequestDashBoardOpenDescriptionForm(OpenDescription); break; case ConstantVar.POType: /*Display PO */ PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); purchaseOderInfor.UpdateCatalogPanel = new PurchaseOderInfor.UpdateCatalogDelegate(GetCatalogvalue); MessageBox.Show(temp[1]); purchaseOderInfor.requestDashBoardOpenNTKTForm = new PurchaseOderInfor.RequestDashBoardOpenNTKTForm(OpenNTKTForm); purchaseOderInfor.SetValueItemForPO(temp[1]); purchaseOderInfor.requestDaskboardOpenDP = new PurchaseOderInfor.RequestDaskboardOpenDP(OpenDpForm); OpenChidForm(purchaseOderInfor); break; case ConstantVar.DPType: /*Display DP */ DeliverPartInforDetail deliverPartInforDetail = new DeliverPartInforDetail(); deliverPartInforDetail.UpdateCatalogPanel = new DeliverPartInforDetail.UpdateCatalogDelegate(GetCatalogvalue); OpenChidForm(deliverPartInforDetail); break; case ConstantVar.NTKTType: /*Display NTKT */ NTKTInfor nTKTInfor = new NTKTInfor(); nTKTInfor.UpdateCatalogPanel = new NTKTInfor.UpdateCatalogDelegate(GetCatalogvalue); nTKTInfor.requestDashBoardPurchaseOderForm = new NTKTInfor.RequestDashBoardPurchaseOderForm(OpenPOForm); nTKTInfor.setValueItemForNTKT(temp[1]); OpenChidForm(nTKTInfor); break; case ConstantVar.PLType: /*Display PL */ PackageListInfor packageListInfor = new PackageListInfor(); packageListInfor.UpdateCatalogPanel = new PackageListInfor.UpdateCatalogDelegate(GetCatalogvalue); OpenChidForm(packageListInfor); break; default: Console.WriteLine("Invalid grade"); break; } }