public frmCashierDashboard()
        {
            InitializeComponent();
            this.pnlRed.Height = this.btnHome.Height;
            cashierTicketControl1 firstControl = new cashierTicketControl1();

            MainControl.showControl(firstControl, this);
        }
        private void btnRoute_Click(object sender, EventArgs e)
        {
            this.pnlRed.Height = this.btnRoute.Height;
            this.pnlRed.Top    = this.btnRoute.Top;

            controlRoute route = new controlRoute();

            MainControl.showControl(route, frmAdminDashboard.ActiveForm);
        }
        private void btnBus_Click(object sender, EventArgs e)
        {
            this.pnlRed.Height = this.btnBus.Height;
            this.pnlRed.Top    = this.btnBus.Top;

            controlBus bus = new controlBus();

            MainControl.showControl(bus, frmAdminDashboard.ActiveForm);
        }
Example #4
0
        private void btnCost_Click(object sender, EventArgs e)
        {
            this.pnlRed.Height = this.btnCost.Height;
            this.pnlRed.Top    = this.btnCost.Top;

            controlAccount1 account = new controlAccount1();

            MainControl.showControl(account, frmAccountDashboard.ActiveForm);
        }
        private void btnProfile_Click(object sender, EventArgs e)
        {
            this.pnlRed.Height = this.btnUsers.Height;
            this.pnlRed.Top    = this.btnUsers.Top;


            controlUser user = new controlUser();

            MainControl.showControl(user, frmAdminDashboard.ActiveForm);
        }
        public frmAdminDashboard()
        {
            InitializeComponent();
            this.pnlRed.Height = this.btnUsers.Height;


            controlUser user = new controlUser();

            MainControl.showControl(user, this);
        }
Example #7
0
        public frmAccountDashboard()
        {
            InitializeComponent();
            this.pnlRed.Height = this.btnCost.Height;


            controlAccount1 account = new controlAccount1();

            MainControl.showControl(account, this);
        }
        private void btnHome_Click(object sender, EventArgs e)
        {
            this.pnlRed.Height = this.btnHome.Height;
            this.pnlRed.Top    = this.btnHome.Top;


            cashierTicketControl1 firstControl = new cashierTicketControl1();

            MainControl.showControl(firstControl, this);
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            cashierTicketControl3 third = new cashierTicketControl3();

            frmSeatVIew  seat   = new frmSeatVIew();
            DialogResult result = seat.ShowDialog();

            if (result == DialogResult.OK)
            {
                MainControl.showControl(third, frmCashierDashboard.ActiveForm);
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (!this.Validation())
            {
                return;
            }

            /*  string id=TicketRepo.getRouteId(this.Route.DeptLocation, this.Route.Destination, this.Route.BusType);
             * MessageBox.Show(id);*/
            cashierTicketControl2 second = new cashierTicketControl2();

            MainControl.showControl(second, frmCashierDashboard.ActiveForm);
        }
        private void dgvCashierSchedule_DoubleClick(object sender, EventArgs e)
        {
            MainControl.scheduleId = this.dgvCashierSchedule.CurrentRow.Cells["schedule_id"].Value.ToString();

            cashierTicketControl3 third = new cashierTicketControl3();

            frmSeatVIew  seat   = new frmSeatVIew();
            DialogResult result = seat.ShowDialog();

            if (result == DialogResult.OK)
            {
                MainControl.showControl(third, frmCashierDashboard.ActiveForm);
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("fdsf");
            //First we have to insert data into route table and then into the schedule table
            this.RouteFill();

            Entity.Schedule schedule = new Entity.Schedule();
            try
            {
                schedule.ScheduleId = ScheduleRepo.GetId();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }

            schedule.DeptTime    = this.dtpDeparture.Text;
            schedule.ArrivalTime = this.dtpArrival.Text;
            schedule.RouteId     = this.Route.RouteId; //In Schedule table route_id is a foreign key.

            try
            {
                RouteRepo.Insert(this.Route);  //inserting into the route table
                ScheduleRepo.Insert(schedule); //inserting into schedule table

                MessageBox.Show("Created Successfully");

                //After inserting data the route home page will be redirected
                controlRoute route = new controlRoute();
                MainControl.showControl(route, frmAdminDashboard.ActiveForm);
            }
            catch (Exception exception)
            {
                MessageBox.Show("Please Select A Bus No", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void btnBack_Click(object sender, EventArgs e)
        {
            controlRoute route = new controlRoute();

            MainControl.showControl(route, frmAdminDashboard.ActiveForm);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            cashierTicketControl1 firstControl = new cashierTicketControl1();

            MainControl.showControl(firstControl, frmCashierDashboard.ActiveForm);
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            cashierTicketControl2 second = new cashierTicketControl2();

            MainControl.showControl(second, frmCashierDashboard.ActiveForm);
        }