private void btnSaleOrder_Click(object sender, EventArgs e) { try { frmSalesOrder frm = new frmSalesOrder(); frm.ShowDialog(); } catch (Exception ae) { MessageBox.Show(ae.ToString()); } }
private void frmNewIndex_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Escape) { try { this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F1) { try { frmCustomerDetails frmc = new frmCustomerDetails(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F2) { try { frmDealerMaster frmc = new frmDealerMaster(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F3) { try { frmItemDetails frmc = new frmItemDetails(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F4) { try { frmCompany frmc = new frmCompany(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F5) { try { btnPurchaseOrder_Click(sender, e); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F6) { try { frmPurchaseInvoice frmc = new frmPurchaseInvoice(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F7) { try { btnPurchaseChalan_Click(sender, e); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F8) { try { frmPurchaseReturn frmc = new frmPurchaseReturn(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F8 && e.Alt) { try { frmVoucherPayment frmc = new frmVoucherPayment(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F9 && e.Alt) { try { frmVoucherRecipt frmc = new frmVoucherRecipt(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F9) { try { frmSaleInvoive frmc = new frmSaleInvoive(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F10) { try { FrmSaleReturn frmc = new FrmSaleReturn(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F11) { try { frmSaleChallan frmc = new frmSaleChallan(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F11 && e.Alt) { try { frmSalesOrder frmc = new frmSalesOrder(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F12) { try { frmStockRegister frmc = new frmStockRegister(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.E && e.Control) { try { frmExpenses frmc = new frmExpenses(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.B && e.Control) { try { frmBankDeposit frmc = new frmBankDeposit(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.C && e.Alt) { try { frmCreditNote frmc = new frmCreditNote(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.D && e.Alt) { try { debitNotecs frmc = new debitNotecs(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F10 && e.Alt) { try { frmExpenses frmc = new frmExpenses(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.KeyCode == Keys.F12 && e.Alt) { try { frmBankDeposit frmc = new frmBankDeposit(); frmc.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void rSalesOrder_ItemClick(object sender, ItemClickEventArgs e) { frmSalesOrder _frmSalesOrder = new frmSalesOrder(); _frmSalesOrder.ShowDialog(); }
public void navBar_LinkClicked(object sender, NavBarLinkEventArgs e) { if (this.ValidateRight("View", AppConstant.UserID, e.Link.Caption)) { switch (e.Link.Caption) { case "Quotations Review": frmPOaward _frmPOaward = new frmPOaward(); _frmPOaward.ShowDialog(); break; case "Purchase Order": frmPO _frmPO = new frmPO(); _frmPO.ShowDialog(); break; case "Purchase Requisition": frmRequisition _frmRequisition = new frmRequisition(); _frmRequisition.ShowDialog(); break; case "Requisition Approval": frmRequisitionReview _frmRequisitionReview = new frmRequisitionReview(); _frmRequisitionReview.ShowDialog(); break; case "Supplier Quotations": frmSupplierQuotations _frmSupplierQuotations = new frmSupplierQuotations(); _frmSupplierQuotations.ShowDialog(); break; case "Requisitions": requisitionslauncher _requisitionslauncher = new requisitionslauncher(); _requisitionslauncher.ShowDialog(); break; case "Department Access": frmDepartmentAccess _frmDepartmentAccess = new frmDepartmentAccess(); _frmDepartmentAccess.ShowDialog(); break; case "Customers": frmCustomers _frmCustomers = new frmCustomers(); _frmCustomers.ShowDialog(); break; case "Return OutWards": frmReturnOutwards _frmReturnOutwards = new frmReturnOutwards(); _frmReturnOutwards.ShowDialog(); break; case "Sales Summary": frmSalesSummary _frmSalesSummary = new frmSalesSummary(); _frmSalesSummary.ShowDialog(); break; case "Stock Sheet Inquiry": frmstockshettinquiry _frmstockshettinquiry = new frmstockshettinquiry(); _frmstockshettinquiry.ShowDialog(); break; case "COA": frmCOA _frmCOA = new frmCOA(); _frmCOA.ShowDialog(); break; case "PO Reprint": frmPoReprint _frmPoReprint = new frmPoReprint(); _frmPoReprint.ShowDialog(); break; case "Customer Invoices": frmCustomerInvoiceReprint _frmCustomerInvoiceReprint = new frmCustomerInvoiceReprint(); _frmCustomerInvoiceReprint.ShowDialog(); break; case "Supplier Balances": frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances(); _frmSupplierBalances.ShowDialog(); break; case "Supplier Balance": frmrptSupplierBalance _frmrptSupplierBalance = new frmrptSupplierBalance(); _frmrptSupplierBalance.ShowDialog(); break; case "Customer Balances": frmCustomerBalanceLauncher _frmCustomerBalanceLauncher = new frmCustomerBalanceLauncher(); _frmCustomerBalanceLauncher.ShowDialog(); break; case "Credit Notes": frmcustomercreditnoteLauncher _frmcustomercreditnoteLauncher = new frmcustomercreditnoteLauncher(); _frmcustomercreditnoteLauncher.ShowDialog(); break; case "Customer Refunds": frmCustomerRefund _frmCustomerRefund = new frmCustomerRefund(); _frmCustomerRefund.ShowDialog(); break; case "Payouts": frmPayOuts _frmPayOuts = new frmPayOuts(); _frmPayOuts.ShowDialog(); break; case "Return Inwards": frmReturnInwards _frmReturnInwards = new frmReturnInwards(); _frmReturnInwards.ShowDialog(); break; case "Supplier Payments": frmSupplierPayment _frmSupplierPayment = new frmSupplierPayment(); _frmSupplierPayment.ShowDialog(); break; case "Bank Accounts": frmBankAccounts _frmBankAccounts = new frmBankAccounts(); _frmBankAccounts.ShowDialog(); break; //case "Supplier Balance": // frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances(); // _frmSupplierBalances.ShowDialog(); // break; case "Direct Invoices": frmDirectSupplierInvoice _frmDirectSupplierInvoice = new frmDirectSupplierInvoice(); _frmDirectSupplierInvoice.ShowDialog(); break; case "Invoice Matching": frmInvoiceMatching _frmInvoiceMatching = new frmInvoiceMatching(); _frmInvoiceMatching.ShowDialog(); break; case "Recruitment Parameters": frmHRRecruitmentParam _frmHRRecruitmentParam = new frmHRRecruitmentParam(); _frmHRRecruitmentParam.ShowDialog(); break; case "Job Applications": frmJobApplications _frmJobApplications = new frmJobApplications(); _frmJobApplications.ShowDialog(); break; case "Job Description": frmJobDescription _frmJobDescription = new frmJobDescription(); _frmJobDescription.ShowDialog(); break; case "Job Requisition": frmJobRequisition _frmJobRequisition = new frmJobRequisition(); _frmJobRequisition.ShowDialog(); break; case "Job Appraisals": frmJobAppraisals _frmJobAppraisals = new frmJobAppraisals(); _frmJobAppraisals.ShowDialog(); break; case "Employeee information": frmEmployeeMaster _frmEmployeeMaster = new frmEmployeeMaster(); _frmEmployeeMaster.ShowDialog(); break; case "Distribution Orders": frmDistributionOders _frmDistributionOders = new frmDistributionOders(); _frmDistributionOders.ShowDialog(); break; case "Inventory Adjustment": frmInventoryAdjustment _frmInventoryAdjustment = new frmInventoryAdjustment(); _frmInventoryAdjustment.ShowDialog(); break; case "Inventory Transfers": frmInventoryTransfer _frmInventoryTransfer = new frmInventoryTransfer(); _frmInventoryTransfer.ShowDialog(); break; case "Inventory Issues": frmInventoryIssues _frmInventoryIssues = new frmInventoryIssues(); _frmInventoryIssues.ShowDialog(); break; case "Inventory Receipts": frmInventoryReceipt _frmInventoryReceipt = new frmInventoryReceipt(); _frmInventoryReceipt.ShowDialog(); break; case "Purchase Orders": frmPurchaseOrder _frmPurchaseOrder = new frmPurchaseOrder(); _frmPurchaseOrder.ShowDialog(); break; case "Ware houses": frmWareHouses _frmWareHouses = new frmWareHouses(); _frmWareHouses.ShowDialog(); break; case "Sales Order": frmSalesOrder _frmSalesOrder = new frmSalesOrder(); _frmSalesOrder.ShowDialog(); break; case "PO Receipts": frmPOReceipt _frmPOReceipt = new frmPOReceipt(); _frmPOReceipt.ShowDialog(); break; case "Opening Stock": frmOpeningStock _frmOpeningStock = new frmOpeningStock(); _frmOpeningStock.ShowDialog(); break; case "Exchange Rates": frmExchangeRates _frmExchangeRates = new frmExchangeRates(); _frmExchangeRates.ShowDialog(); break; case "Payroll Review": frmPayrollReview _frmPayrollReview = new frmPayrollReview(); _frmPayrollReview.ShowDialog(); break; case "Bank Branches": frmBankBranches _frmBankBranches = new frmBankBranches(); _frmBankBranches.ShowDialog(); break; case "Banks": frmbanks _frmbanks = new frmbanks(); _frmbanks.ShowDialog(); break; case "Payroll Processing": frmPayroll _frmPayroll = new frmPayroll(); _frmPayroll.ShowDialog(); break; case "Posting Periods": frmPostingPeriods _frmPostingPeriods = new frmPostingPeriods(); _frmPostingPeriods.ShowDialog(); break; case "Tax Rates": frmTaxRates _frmTaxRates = new frmTaxRates(); _frmTaxRates.ShowDialog(); break; case "Benefits & Deductions": frmDBAs _frmDBAs = new frmDBAs(); _frmDBAs.ShowDialog(); break; case "Approvers": frmApprovers _frmApprovers = new frmApprovers(); _frmApprovers.ShowDialog(); break; case "Commission Entry": frmCommisionEntry _frmCommisionEntry = new frmCommisionEntry(); _frmCommisionEntry.ShowDialog(); break; case "Commission Tax Rates": frmCommisionRates _frmCommisionRates = new frmCommisionRates(); _frmCommisionRates.ShowDialog(); break; case "Leave Management": frmLeaveManagent _frmLeaveManagent = new frmLeaveManagent(); _frmLeaveManagent.ShowDialog(); break; case "Leave Types": frmLeaveTypes _frmLeaveTypes = new frmLeaveTypes(); _frmLeaveTypes.ShowDialog(); break; case "NHIF Rates": frmNHIFRates _frmNHIFRates = new frmNHIFRates(); _frmNHIFRates.ShowDialog(); break; case "NSSF Rates": frmNSSFRates _frmNSSFRates = new frmNSSFRates(); _frmNSSFRates.ShowDialog(); break; case "Over Time": frmOverTime _frmOverTime = new frmOverTime(); _frmOverTime.ShowDialog(); break; case "Over Time Rates": frmOverTimeRates _frmOverTimeRates = new frmOverTimeRates(); _frmOverTimeRates.ShowDialog(); break; case "Salary Advance": frmSalaryAdvance _frmSalaryAdvance = new frmSalaryAdvance(); _frmSalaryAdvance.ShowDialog(); break; case "Tax Tables": frmTaxTables _frmTaxTables = new frmTaxTables(); _frmTaxTables.ShowDialog(); break; case "User Codes": frmUserCodes _frmUserCodes = new frmUserCodes(); _frmUserCodes.ShowDialog(); break; case "Companies": frmCompanies _frmCompanies = new frmCompanies(); _frmCompanies.ShowDialog(); break; case "User Code Categories": frmUserCodeCategories _frmUserCodeCategories = new frmUserCodeCategories(); _frmUserCodeCategories.ShowDialog(); break; case "CostCenters": frmCostCenter _frmCostCenter = new frmCostCenter(); _frmCostCenter.ShowDialog(); break; case "CostCenter Access": frmCompanyCostCenterAccess _frmCompanyCostCenterAccess = new frmCompanyCostCenterAccess(); _frmCompanyCostCenterAccess.ShowDialog(); break; case "Security Groups": frmSecurityGroups _frmSecurityGroups = new frmSecurityGroups(); _frmSecurityGroups.ShowDialog(); break; case "Roles": frmRoles _frmRoles = new frmRoles(); _frmRoles.ShowDialog(); break; case "User Roles": frmUserRoles _frmUserRoles = new frmUserRoles(); _frmUserRoles.ShowDialog(); break; case "Users": frmUsers _frmUsers = new frmUsers(); _frmUsers.ShowDialog(); break; case "User Groups": frmUserGroups _frmUserGroups = new frmUserGroups(); _frmUserGroups.ShowDialog(); break; case "Currencies": frmCurrencies _frmCurrencies = new frmCurrencies(); _frmCurrencies.ShowDialog(); break; case "Countries": frmCountry _frmCountry = new frmCountry(); _frmCountry.ShowDialog(); break; case "UOM Convertions": frmUOMConversions _frmUOMConversions = new frmUOMConversions(); _frmUOMConversions.ShowDialog(); break; case "Counties": frmCounties _frmCounties = new frmCounties(); _frmCounties.ShowDialog(); break; case "Beneficiaries": frmBeneficiaries _frmBeneficiaries = new frmBeneficiaries(); _frmBeneficiaries.ShowDialog(); break; case "Payroll Reversal": frmPayrollReverse _frmPayrollReverse = new frmPayrollReverse(); _frmPayrollReverse.ShowDialog(); break; case "KPIs": frmKPIs _frmKPIs = new frmKPIs(); _frmKPIs.ShowDialog(); break; case "KPIs Entry": frmKPIEntry _frmKPIEntry = new frmKPIEntry(); _frmKPIEntry.ShowDialog(); break; case "Absence Registration": frmAbsenceRegistration _frmAbsenceRegistration = new frmAbsenceRegistration(); _frmAbsenceRegistration.ShowDialog(); break; case "UOM": frmUOM _frmUOM = new frmUOM(); _frmUOM.ShowDialog(); break; case "Categories": frmItemCategories _frmItemCategories = new frmItemCategories(); _frmItemCategories.ShowDialog(); break; case "Suppliers": Suppliers _Suppliers = new Suppliers(); _Suppliers.ShowDialog(); break; case "Journal Entry": frmJournalEntry _frmJournalEntry = new frmJournalEntry(); _frmJournalEntry.ShowDialog(); break; case "Ledgers": frmLedger1 _frmLedger1 = new frmLedger1(); _frmLedger1.ShowDialog(); break; case "Item Master": frmItems _frmItems = new frmItems(); _frmItems.ShowDialog(); break; case "Petty Cash": frmPettyCash _frmPettyCash = new frmPettyCash(); _frmPettyCash.ShowDialog(); break; case "Cheque Books": frmChequeBooks _frmChequeBooks = new frmChequeBooks(); _frmChequeBooks.ShowDialog(); break; case "Cashier Checkin": frmCashierCheckin _frmCashierCheckin = new frmCashierCheckin(); _frmCashierCheckin.ShowDialog(); break; case "Price Bands": frmPriceBands _frmPriceBands = new frmPriceBands(); _frmPriceBands.ShowDialog(); break; case "Cost/Price Revision": frmCostPriceRevisions _frmCostPriceRevisions = new frmCostPriceRevisions(); _frmCostPriceRevisions.ShowDialog(); break; default: break; } } else { e.Link.Item.Dispose(); MessageBox.Show("You have insufficient rights to access this page", "Privilege Violation", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void DetailClick(object sender, EventArgs e) { String Seqtx = "SELECT DFormName FROM Menu_Detail WHERE DMenuDescription='" + sender.ToString() + "'"; SqlDataAdapter datransaction = new SqlDataAdapter(Seqtx, con); DataTable dtransaction = new DataTable(); datransaction.Fill(dtransaction); Assembly frmAssembly = Assembly.LoadFile(Application.ExecutablePath); foreach (Type type in frmAssembly.GetTypes()) { if (type.BaseType == typeof(Form)) { if (type.Name == dtransaction.Rows[0][0].ToString()) { if (dtransaction.Rows[0][0].ToString() == "frmPO") { frmPO PO = new frmPO(); PO.EID = tsslEID.Text.ToString(); PO.CompID = tsslCompID.Text.ToString(); PO.ShowDialog(); PO.EID = tsslEID.Text.ToString(); PO.CompID = tsslCompID.Text.ToString(); } else if (dtransaction.Rows[0][0].ToString() == "frmSalesOrder") { frmSalesOrder SO = new frmSalesOrder(); SO.EID = tsslEID.Text.ToString(); SO.CompID = tsslCompID.Text.ToString(); SO.ShowDialog(); SO.EID = tsslEID.Text.ToString(); SO.CompID = tsslCompID.Text.ToString(); } else if (dtransaction.Rows[0][0].ToString() == "frmPOS") { frmPOS pos = new frmPOS(); pos.EID = tsslEID.Text.ToString(); //pos.CompID = tsslCompID.Text.ToString(); pos.ShowDialog(); pos.EID = tsslEID.Text.ToString(); //pos.CompID = tsslCompID.Text.ToString(); } else if (dtransaction.Rows[0][0].ToString() == "frmUOM") { frmUOM uom = new frmUOM(); uom.EID = tsslEID.Text.ToString(); uom.CompID = tsslCompID.Text.ToString(); uom.ShowDialog(); uom.EID = tsslEID.Text.ToString(); uom.CompID = tsslCompID.Text.ToString(); } else { Form frmShow = (Form)frmAssembly.CreateInstance(type.ToString()); // then we close all of the child Forms with simple below code foreach (Form form in this.MdiChildren) { form.Close(); } frmShow.ShowDialog(); } } } } }