private void Item_Click(object sender, MenuEventArgs args) { switch (args.formID) { case "FRM001": BudgetControlForm frm1 = new BudgetControlForm(true); frm1.Show(); break; case "FRM008": BudgetControlForm frm9 = new BudgetControlForm(false); frm9.Show(); break; case "FRM004": POEntryForm frm2 = new POEntryForm(null); frm2.Show(); break; case "FRM005": POReceiptForm frm3 = new POReceiptForm(); frm3.Show(); break; case "FRM006": MaterialIssueForm frm4 = new MaterialIssueForm(); frm4.Show(); break; case "butPOBalance": POBalanceInquiry frm5 = new POBalanceInquiry(); frm5.Show(); break; case "FRM002": RequisitionEntryForm frm6 = new RequisitionEntryForm(); frm6.Show(); break; case "FRM003": RequisitionFinalForm frm7 = new RequisitionFinalForm(); frm7.Show(); break; case "FRM007": MaterialReturnForm frm8 = new MaterialReturnForm(); frm8.Show(); break; case "FRM009": RequisitionConfirmForm frm10 = new RequisitionConfirmForm(); frm10.Show(); break; default: break; } }
private void Menu_Click(object sender, EventArgs e) { Button but = sender as Button; switch (but.Name) { case "butBudgetCtrl": BudgetControlForm frm1 = new BudgetControlForm(true); frm1.Show(); break; case "butPurchaseOrder1": POEntryForm frm2 = new POEntryForm(null); frm2.Show(); break; case "butPOReceiving": POReceiptForm frm3 = new POReceiptForm(); frm3.Show(); break; case "butMaterialIssue": MaterialIssueForm frm4 = new MaterialIssueForm(); frm4.Show(); break; case "butPOBalance": POBalanceInquiry frm5 = new POBalanceInquiry(); frm5.Show(); break; case "butRequisition": RequisitionEntryForm frm6 = new RequisitionEntryForm(); frm6.Show(); break; case "butRequisitionFinaly": RequisitionFinalForm frm7 = new RequisitionFinalForm(); frm7.Show(); break; case "butMaterialReturn": MaterialReturnForm frm8 = new MaterialReturnForm(); frm8.Show(); break; default: break; } }