コード例 #1
0
        private void grid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataGridView datagrid = this.dataGridView1;
                Int64        index;
                Int64        colIndex;
                if (datagrid.RowCount > 0)
                {
                    schedule = new BIZ.RaceSchedule();
                    index    = datagrid.CurrentRow.Index;
                    colIndex = datagrid.CurrentCell.ColumnIndex;
                    if (colIndex == 5)
                    {
                        ScheduleID = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[1].Value);
                        if (ScheduleID > 0)
                        {
                            DataTable dtresult = new DataTable();
                            PopulateBussinessLayer(Common.Common.Schedule.Schedule);
                            dtresult = schedule.ScheduleSearchByKey();

                            if (dtresult.Rows.Count > 0)
                            {
                                RecordSearched = dtresult;
                                PopulateControl();
                            }
                            else
                            {
                                MessageBox.Show("No record is found", "Search");
                            }
                        }
                    }
                    else
                    {
                        if (colIndex == 4)
                        {
                            frmScheduleDetails scheduleDetails = new frmScheduleDetails();
                            scheduleDetails.ScheduleID   = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[1].Value);
                            scheduleDetails.ScheduleName = datagrid.Rows[Convert.ToInt32(index)].Cells[2].Value.ToString();
                            scheduleDetails.UserID       = UserID;
                            scheduleDetails.ClubID       = ClubID;
                            scheduleDetails.ShowDialog();
                            ScheduleSelectAll();
                        }
                        else
                        {
                            if (colIndex == 5)
                            {
                                frmScheduleCategory scheduleCategory = new frmScheduleCategory();
                                scheduleCategory.ScheduleID   = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[1].Value);
                                scheduleCategory.ScheduleName = datagrid.Rows[Convert.ToInt32(index)].Cells[2].Value.ToString();
                                scheduleCategory.UserID       = UserID;
                                scheduleCategory.ClubID       = ClubID;
                                scheduleCategory.ShowDialog();
                                ScheduleSelectAll();
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
コード例 #2
0
        private void SelectMenu(Common.Common.MemberMenu selectedMenu)
        {
            switch (selectedMenu)
            {
            case Common.Common.MemberMenu.ReaderRegistration:
                frmGenerateEclockInfo readerRegistration = new frmGenerateEclockInfo();
                readerRegistration.ShowDialog();
                break;

            case Common.Common.MemberMenu.RFIDRegistration:
                frmRFIDRegistration rfidRegistration = new frmRFIDRegistration();
                rfidRegistration.ShowDialog();
                break;

            case Common.Common.MemberMenu.ChangePassword:
                frmChangePassword changePassword = new frmChangePassword();
                changePassword.ClubID = ClubID;
                changePassword.UserID = UserID;
                changePassword.ShowDialog();
                break;

            case Common.Common.MemberMenu.ByReleasePoint:
                frmMemberPerReleasePoint memberDistancePerReleasePoint = new frmMemberPerReleasePoint();
                memberDistancePerReleasePoint.ClubID = ClubID;
                memberDistancePerReleasePoint.UserID = UserID;
                memberDistancePerReleasePoint.ShowDialog();
                break;

            case Common.Common.MemberMenu.ByMemberID:
                frmMemberDistance memberDistancePerMemberID = new frmMemberDistance();
                memberDistancePerMemberID.ClubID = ClubID;
                memberDistancePerMemberID.UserID = UserID;
                memberDistancePerMemberID.ShowDialog();
                break;

            case Common.Common.MemberMenu.MemberDataEntry:
                frmMemberDataEntry memberDataEntry = new frmMemberDataEntry();
                memberDataEntry.ClubID = ClubID;
                memberDataEntry.UserID = UserID;
                memberDataEntry.ShowDialog();
                break;

            case Common.Common.MemberMenu.MemberMasterlist:
                frmMemberMasterlist memberMasterlist = new frmMemberMasterlist();
                memberMasterlist.ClubID = ClubID;
                memberMasterlist.UserID = UserID;
                memberMasterlist.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceEntry:
                frmRaceEntry raceEntry = new frmRaceEntry();
                raceEntry.ClubID = ClubID;
                raceEntry.UserID = UserID;
                raceEntry.ShowDialog();
                break;

            case Common.Common.MemberMenu.TransactionHistory:
                frmTransactionSummary transactionHistory = new frmTransactionSummary();
                transactionHistory.ClubID = ClubID;
                transactionHistory.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceResult:
                frmRaceResult raceResult = new frmRaceResult();
                raceResult.ClubID = ClubID;
                raceResult.UserID = UserID;
                raceResult.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceResults:
                frmRaceResults raceResults = new frmRaceResults();
                raceResults.ClubID = ClubID;
                raceResults.UserID = UserID;
                raceResults.ShowDialog();
                break;

            case Common.Common.MemberMenu.Location:
                frmLocation location = new frmLocation();
                location.ClubID = ClubID;
                location.UserID = UserID;
                location.ShowDialog();
                break;

            case Common.Common.MemberMenu.Club:
                frmClub club = new frmClub();
                club.ClubID = ClubID;
                club.UserID = UserID;
                club.ShowDialog();
                break;

            case Common.Common.MemberMenu.Schedule:
                frmSchedule schedule = new frmSchedule();
                schedule.ClubID = ClubID;
                schedule.UserID = UserID;
                schedule.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceScheduleDetails:
                frmScheduleDetails scheduleDetails = new frmScheduleDetails();
                scheduleDetails.ClubID = ClubID;
                scheduleDetails.UserID = UserID;
                scheduleDetails.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceCategory:
                frmRaceCategory raceCategory = new frmRaceCategory();
                raceCategory.ClubID = ClubID;
                raceCategory.UserID = UserID;
                raceCategory.ShowDialog();
                break;

            case Common.Common.MemberMenu.RaceCategoryGroup:
                frmRaceCategoryGroup raceCategoryGroup = new frmRaceCategoryGroup();
                raceCategoryGroup.ClubID = ClubID;
                raceCategoryGroup.UserID = UserID;
                raceCategoryGroup.ShowDialog();
                break;

            case Common.Common.MemberMenu.User:
                frmUser user = new frmUser();
                //user.ClubID = ClubID;
                //user.UserID = UserID;
                user.ShowDialog();
                break;

            case Common.Common.MemberMenu.RingMangement:
                frmMemberRingManagement ringManagement = new frmMemberRingManagement();
                ringManagement.ClubID = ClubID;
                ringManagement.UserID = UserID;
                ringManagement.ShowDialog();
                break;

            case Common.Common.MemberMenu.Region:
                frmRegion region = new frmRegion();
                region.ClubID = ClubID;
                region.UserID = UserID;
                region.ShowDialog();
                break;

            case Common.Common.MemberMenu.Calculator:
                frmCalculator calculator = new frmCalculator();
                calculator.ClubID = ClubID;
                calculator.UserID = UserID;
                calculator.ShowDialog();
                break;

            case Common.Common.MemberMenu.InboxView:
                Inbox_View inbox = new Inbox_View();
                inbox.ClubID = ClubID;
                inbox.UserID = UserID;
                inbox.ShowDialog();
                break;

            case Common.Common.MemberMenu.StickerGeneration:
                frmStickerGeneration stickerNumber = new frmStickerGeneration();
                stickerNumber.ShowDialog();
                break;

            case Common.Common.MemberMenu.ViewClubRace:
                frmViewClubRace viewClubRace = new frmViewClubRace();
                viewClubRace.ShowDialog();
                break;

            case Common.Common.MemberMenu.Transaction:
                frmTransaction transaction = new frmTransaction();
                transaction.ShowDialog();
                break;

            case Common.Common.MemberMenu.ExportEClockData:
                frmExportEclockData ExportEClockData = new frmExportEclockData();
                ExportEClockData.ClubID = ClubID;
                ExportEClockData.UserID = UserID;
                ExportEClockData.ShowDialog();
                break;

            case Common.Common.MemberMenu.LoadMAVCAccessCard:
                frmLoadCard LoanMavcCard = new frmLoadCard();
                LoanMavcCard.ClubID = ClubID;
                LoanMavcCard.UserID = UserID;
                LoanMavcCard.ShowDialog();
                break;

            case Common.Common.MemberMenu.RegisterMobileNumber:
                frmRegisterMobileNumber RegisterMobileNumber = new frmRegisterMobileNumber();
                RegisterMobileNumber.ClubID = ClubID;
                RegisterMobileNumber.UserID = UserID;
                RegisterMobileNumber.ShowDialog();
                break;

            case Common.Common.MemberMenu.PaymentHistory:
                frmPaymentTransactionSummary PaymentSummary = new frmPaymentTransactionSummary();
                PaymentSummary.ClubID = ClubID;
                PaymentSummary.UserID = UserID;
                PaymentSummary.ShowDialog();
                break;
            }

            Common.Global.IsMainDatabase = false;
        }