Exemplo n.º 1
0
        private void vehicleCategoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmVehicleCategory vehicleCategory = new frmVehicleCategory();

            vehicleCategory.Show();
        }
Exemplo n.º 2
0
        private void GenerateContentForClickItems(string formName, bool clickForSearch)
        {
            if (formName == VehicleReports)
            {
                frmVehiclesReport frm = new frmVehiclesReport();
                frm.MdiParent   = this;
                frm.WindowState = FormWindowState.Maximized;
                frm.Show();
            }

            if (formName == Branches)
            {
                if (clickForSearch)
                {
                    frmBranch frm = new frmBranch();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateBranch frm = new frmAddUpdateBranch();
                    frm.Show();
                }
            }

            if (formName == Clients)
            {
                if (clickForSearch)
                {
                    frmClient frm = new frmClient();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateClient frm = new frmAddUpdateClient();
                    frm.Show();
                }
            }

            if (formName == Countries)
            {
                if (clickForSearch)
                {
                    frmCountries frm = new frmCountries();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddCountry frm = new frmAddCountry();
                    frm.Show();
                }
            }

            if (formName == Employees)
            {
                if (clickForSearch)
                {
                    frmEmployees frm = new frmEmployees();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateEmployee frm = new frmAddUpdateEmployee();
                    frm.Show();
                }
            }

            if (formName == EmployeeRoles)
            {
                if (clickForSearch)
                {
                    frmEmployeeRoles frm = new frmEmployeeRoles();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateEmployeeRoles frm = new frmAddUpdateEmployeeRoles();
                    frm.Show();
                }
            }

            if (formName == Insurance)
            {
                if (clickForSearch)
                {
                    frmInsurance frm = new frmInsurance();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateInsurance frm = new frmAddUpdateInsurance();
                    frm.Show();
                }
            }

            if (formName == Ratings)
            {
                if (clickForSearch)
                {
                    frmRating frm = new frmRating();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
            }

            if (formName == Reservations)
            {
                if (clickForSearch)
                {
                    frmReservation frm = new frmReservation();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
            }

            if (formName == VehicleCategories)
            {
                if (clickForSearch)
                {
                    frmVehicleCategory frm = new frmVehicleCategory();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicleCategory frm = new frmAddUpdateVehicleCategory();
                    frm.Show();
                }
            }

            if (formName == Vehicles)
            {
                if (clickForSearch)
                {
                    frmVehicle frm = new frmVehicle();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicle frm = new frmAddUpdateVehicle();
                    frm.Show();
                }
            }

            if (formName == VehicleFuelTypes)
            {
                if (clickForSearch)
                {
                    frmVehicleFuelType frm = new frmVehicleFuelType();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVFuelType frm = new frmAddUpdateVFuelType();
                    frm.Show();
                }
            }

            if (formName == VehicleManufacturers)
            {
                if (clickForSearch)
                {
                    frmVehicleManufacturer frm = new frmVehicleManufacturer();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicleManufacturer frm = new frmAddUpdateVehicleManufacturer();
                    frm.Show();
                }
            }

            if (formName == VehicleModels)
            {
                if (clickForSearch)
                {
                    frmVehicleModel frm = new frmVehicleModel();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicleModel frm = new frmAddUpdateVehicleModel();
                    frm.Show();
                }
            }

            if (formName == VehicleTransmissionTypes)
            {
                if (clickForSearch)
                {
                    frmVehicleTransmissionType frm = new frmVehicleTransmissionType();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicleTransmissionType frm = new frmAddUpdateVehicleTransmissionType();
                    frm.Show();
                }
            }

            if (formName == VehicleTypes)
            {
                if (clickForSearch)
                {
                    frmVehicleType frm = new frmVehicleType();

                    frm.MdiParent   = this;
                    frm.WindowState = FormWindowState.Maximized;
                    frm.Show();
                }
                else
                {
                    frmAddUpdateVehicleType frm = new frmAddUpdateVehicleType();
                    frm.Show();
                }
            }
        }