public void OpenPOForm(string strIDContract, string strKHMS) { PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); purchaseOderInfor.UpdateCatalogPanel = new PurchaseOderInfor.UpdateCatalogDelegate(GetCatalogvalue); /*Receipt Request Open Nghiệm Thu Kỹ Thuật Form*/ purchaseOderInfor.requestDashBoardOpenNTKTForm = new PurchaseOderInfor.RequestDashBoardOpenNTKTForm(OpenNTKTForm); /*Receipt Request Open Xác Nhận Đơn Hàng Form*/ purchaseOderInfor.requestDashBoardOpenConfirmPOForm = new PurchaseOderInfor.RequestDashBoardOpenConfirmForm(OpenConfirmPOForm); /**/ purchaseOderInfor.requestDaskboardOpenDP = new PurchaseOderInfor.RequestDaskboardOpenDP(OpenDpForm); purchaseOderInfor.requestDasckboardOpenExcel = new PurchaseOderInfor.RequestDasckboardOpenExcel(OpenExcel); ContractInfoChildForm contractInfoChildForm = new ContractInfoChildForm(); contractInfoChildForm.requestDashBoardOpendescriptionForm = new ContractInfoChildForm.RequestDashBoardOpenDescriptionForm(OpenDescription); strIDContract = strIDContract.Replace("Contract_", ""); purchaseOderInfor.SetTxbIDContract(strIDContract); purchaseOderInfor.SetTxbKHMS(strKHMS); OpenChidForm(purchaseOderInfor); return; }
public void OpenSequenceChildForm(string strParentInfo) { if (strParentInfo.Contains(ConstantVar.ContractType)) { PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); purchaseOderInfor.UpdateCatalogPanel = new PurchaseOderInfor.UpdateCatalogDelegate(GetCatalogvalue); /*Set Properties For Purchase Order Form*/ string strTemp = strParentInfo.Replace("Contract_", ""); purchaseOderInfor.SetTxbIDContract(strTemp); //contractInfoChildForm.SetValueItemForm(); OpenChidForm(purchaseOderInfor); } }
private void btnBack_Click(object sender, EventArgs e) { if (txbPOID.Text != null) { //ContractInfoChildForm contractInfoChildForm = new ContractInfoChildForm(); //contractInfoChildForm.RequestDashBoardOpenPOForm = new ContractInfoChildForm.RequestDashBoardOpenChildForm(OP) requestDashBoardPurchaseOderForm(txbPOID.Text, txbKHMS.Text); PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); //purchaseOderInfor.SetValueItemForPO(); } else { //tra ve form rong } return; }
private void contextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem.Name == "toolStripMenuRefresh") { /*DashBoard Call Contract Child Form*/ ContractInfoChildForm contractInfoChildForm = new ContractInfoChildForm(); contractInfoChildForm.UpdateCatalogPanel = new ContractInfoChildForm.UpdateCatalogDelegate(GetCatalogvalue); /*DASHBOAD GET REQEST FROM CONTRACT GUI*/ contractInfoChildForm.RequestDashBoardOpenPOForm = new ContractInfoChildForm.RequestDashBoardOpenChildForm(OpenPOForm); /*end of DashBoard Call Contract Child Form*/ //Vừa thêm vào xem có chạy hay không đây PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); purchaseOderInfor.UpdateCatalogPanel = new PurchaseOderInfor.UpdateCatalogDelegate(GetCatalogvalue); /*Open NTKT Form*/ purchaseOderInfor.requestDashBoardOpenNTKTForm = new PurchaseOderInfor.RequestDashBoardOpenNTKTForm(OpenNTKTForm); contractInfoChildForm.requestDashBoardOpendescriptionForm = new ContractInfoChildForm.RequestDashBoardOpenDescriptionForm(OpenDescription); OpenChidForm(contractInfoChildForm); } else if (e.ClickedItem.Name == "toolStripMenuNew") { //Do Something PurchaseOderInfor purchaseOderInfor = new PurchaseOderInfor(); purchaseOderInfor.UpdateCatalogPanel = new PurchaseOderInfor.UpdateCatalogDelegate(GetCatalogvalue); OpenChidForm(purchaseOderInfor); } else if (e.ClickedItem.Name == "toolStripMenuEdit") { //Do Something TreeNode a = treeView1.Nodes[0]; List <string> MyList4 = new List <string>(); MyList4.Add("Free"); MyList4.Add("Education"); AddChildTreeNode(ref a, MyList4); } else { //Do Something MessageBox.Show("Wanna Delete this Node?"); } }
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; } }