private void TvwMain_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; Cursor.Show(); if (lsGdb.Gdb.State == ConnectionState.Closed) { lsGdb.ConnectDatabase(); } switch (e.Node.Name) { case "voucheradd": VoucherAdd frm = new VoucherAdd(); frm.Connnection = lsGdb.Gdb; frm.Show(this); break; case "voucherview": VoucherView frm1 = new VoucherView(); frm1.Connnection = lsGdb.Gdb; frm1.Show(); break; case "memberview": MemberView frm2 = new MemberView(); frm2.Connnection = lsGdb.Gdb; frm2.Show(this); break; case "memberadd": MemberAdd frm3 = new MemberAdd(); frm3.Connnection = lsGdb.Gdb; frm3.Show(this); break; case "importdata": ImportData frm4 = new ImportData(); frm4.Show(this); break; case "membersearch": MemberSearch frm5 = new MemberSearch(); frm5.Show(this); break; case "senddata": ShopSendData frm6 = new ShopSendData(); frm6.Show(this); break; case "preparedata": KingPowerGenData frm7 = new KingPowerGenData(); frm7.Connnection = lsGdb.Gdb; frm7.Show(this); break; case "nationality": InitialAdd frm8 = new InitialAdd(); frm8.TableName = e.Node.Name; frm8.ColumnCode = "nationcode"; frm8.ColumnNameE = "nationname"; frm8.OrderBy = "nationcode"; frm8.Show(this); break; case "salutation": InitialAdd frm9 = new InitialAdd(); frm9.TableName = "salutation"; frm9.ColumnCode = "salcode"; frm9.ColumnNameE = "salnamee"; frm9.OrderBy = "salcode"; frm9.Show(this); break; case "shopview": ShopView frm10 = new ShopView(); frm10.Connnection = lsGdb.Gdb; frm10.Show(this); break; case "rptdailypayinrecord": ReportCriteria frm11 = new ReportCriteria(); frm11.Connnection = lsGdb.Gdb; frm11.lsReportName = e.Node.Name; frm11.Show(this); break; case "rptrecordofdeposit": ReportCriteria frm12 = new ReportCriteria(); frm12.Connnection = lsGdb.Gdb; frm12.lsReportName = e.Node.Name; frm12.Show(this); break; case "rptmonthlysalereport": ReportCriteria frm13 = new ReportCriteria(); frm13.Connnection = lsGdb.Gdb; frm13.lsReportName = e.Node.Name; frm13.Show(this); break; case "rptmonthlysummarydeposit": ReportCriteria frm14 = new ReportCriteria(); frm14.Connnection = lsGdb.Gdb; frm14.lsReportName = e.Node.Name; frm14.Show(this); break; case "webkingpower": KingPowerWeb frm15 = new KingPowerWeb(); //frm15.lsReportName = e.Node.Name; frm15.Show(this); break; case "accrecvoucher": AccRecVoucher frm16 = new AccRecVoucher(); frm16.Connnection = lsGdb.Gdb; frm16.Show(this); break; case "rptrecordofdepositkingpower": ReportCriteria frm17 = new ReportCriteria(); frm17.Connnection = lsGdb.Gdb; frm17.lsReportName = e.Node.Name; frm17.Show(this); break; case "typebis": InitialAdd frm18 = new InitialAdd(); frm18.TableName = "typebis"; frm18.ColumnCode = "tbiscode"; frm18.ColumnNameE = "tbisname"; frm18.OrderBy = "tbiscode"; frm18.Show(this); break; case "typemem": InitialAdd frm19 = new InitialAdd(); frm19.TableName = "typemem"; frm19.ColumnCode = "tmemcode"; frm19.ColumnNameE = "tmemname"; frm19.OrderBy = "tmemcode"; frm19.Show(this); break; case "typeroom": InitialAdd frm20 = new InitialAdd(); frm20.TableName = "typeroom"; frm20.ColumnCode = "plcode"; frm20.ColumnNameE = "plnamee"; frm20.OrderBy = "plcode"; frm20.Show(this); break; case "shift": InitialAdd frm21 = new InitialAdd(); frm21.TableName = "shift"; frm21.ColumnCode = "shiftcode"; frm21.ColumnNameE = "shiftname"; frm21.OrderBy = "shiftcode"; frm21.Show(this); break; case "location": InitialAdd frm22 = new InitialAdd(); frm22.TableName = "location"; frm22.ColumnCode = "locationcode"; frm22.ColumnNameE = "locationnamet"; frm22.OrderBy = "locationcode"; frm22.Show(this); break; case "accinvoice": AccInvoice frm23 = new AccInvoice(); frm23.Connnection = lsGdb.Gdb; frm23.Show(this); break; case "rptsalereport": ReportCriteria frm24 = new ReportCriteria(); frm24.Connnection = lsGdb.Gdb; frm24.lsReportName = e.Node.Name; frm24.Show(this); break; case "rptsalereportcounter": ReportCriteria frm29 = new ReportCriteria(); frm29.Connnection = lsGdb.Gdb; frm29.lsReportName = e.Node.Name; frm29.Show(this); break; case "rptdailypayinrecordmanager": ReportCriteria frm25 = new ReportCriteria(); frm25.Connnection = lsGdb.Gdb; frm25.lsReportName = e.Node.Name; frm25.Show(this); break; case "accmemberyear": AccMemberYear frm26 = new AccMemberYear(); frm26.Connnection = lsGdb.Gdb; frm26.Show(this); break; case "rptsumtypemember": //ReportCriteria frm27 = new ReportCriteria(); rptsumtypememregion //frm27.Connnection = lsGdb.Gdb; //frm27.lsReportName = e.Node.Name; //frm26.Show(this); Report Report = new Report(); Report.SumTypeMember(true); ReportView Rpt = new ReportView(); Rpt.ReportFileName = e.Node.Name; Rpt.Show(this); break; case "rptsumtypememberregion": //ReportCriteria frm27 = new ReportCriteria(); rptsumtypememregion //frm27.Connnection = lsGdb.Gdb; //frm27.lsReportName = e.Node.Name; //frm26.Show(this); Report Report1 = new Report(); Report1.SumTypeMemberRegion(true); ReportView Rpt1 = new ReportView(); Rpt1.HLine2 = "Report Summary Member Group By region"; Rpt1.ReportFileName = e.Node.Name; Rpt1.Show(this); break; case "memberskk9": MemberSKK9 frm27 = new MemberSKK9(); frm27.Connnection = lsGdb.Gdb; frm27.Show(this); break; case "staffview": StaffView frm28 = new StaffView(); frm28.FlagStafF = StaffView.FlagStaff.Staff; frm28.Connnection = lsGdb.Gdb; frm28.Show(this); break; case "committeeview": StaffView frm37 = new StaffView(); frm37.FlagStafF = StaffView.FlagStaff.Committee; frm37.Connnection = lsGdb.Gdb; frm37.Show(this); break; case "prview": StaffView frm38 = new StaffView(); frm38.FlagStafF = StaffView.FlagStaff.PR; frm38.Connnection = lsGdb.Gdb; frm38.Show(this); break; case "guessview": StaffView frm39 = new StaffView(); frm39.FlagStafF = StaffView.FlagStaff.Guess; frm39.Connnection = lsGdb.Gdb; frm39.Show(this); break; case "addressdistrict": AddressDistrict frm30 = new AddressDistrict(); frm30.Connnection = lsGdb.Gdb; frm30.FormName = AddressDistrict.FormName1.FormDistrict; frm30.Show(this); break; case "addresssubdistrict": AddressDistrict frm31 = new AddressDistrict(); frm31.Connnection = lsGdb.Gdb; frm31.FormName = AddressDistrict.FormName1.FormSubDistrict; frm31.Show(this); break; case "serviceip": ServiceIP frm32 = new ServiceIP(); //frm15.lsReportName = e.Node.Name; frm32.Show(this); break; case "rptmemberstatus": { ReportCriteria frm33 = new ReportCriteria(); frm33.Connnection = lsGdb.Gdb; frm33.lsReportName = e.Node.Name; frm33.Show(this); break; } case "rptdailypayinrecordsu": ReportCriteria frm34 = new ReportCriteria(); frm34.Connnection = lsGdb.Gdb; frm34.lsReportName = e.Node.Name; frm34.Show(this); break; case "rptdailypayinrecordpayment": ReportCriteria frm35 = new ReportCriteria(); frm35.Connnection = lsGdb.Gdb; frm35.lsReportName = e.Node.Name; frm35.Show(this); break; case "membermeetingview": MeetingView frm36 = new MeetingView(); frm36.Connnection = lsGdb.Gdb; frm36.Show(this); break; case "membersendemail": MemberSendEmail frm371 = new MemberSendEmail(); //frm37.Connnection = lsGdb.Gdb; frm371.Show(this); break; case "meetingsendmail": //MeetingSendMail frm37 = new MeetingSendMail(); //frm37.Connnection = lsGdb.Gdb; //frm37.Show(this);membersendemail break; } Cursor.Current = System.Windows.Forms.Cursors.Default; Cursor.Show(); }
private void BtnKPS_Click(object sender, EventArgs e) { KingPowerGenData frm7 = new KingPowerGenData(); frm7.ShowDialog(this); }