示例#1
0
        private void AmmendDriver(int driverNumber)
        {
            DriverDetails DForm = new DriverDetails(driverNumber, true);

            DForm.StartPosition = FormStartPosition.Manual;
            DForm.Show(this);
            Hide();
        }//opens another driverdetails class
        private void button1_Click_1(object sender, EventArgs e)
        {
            if (startDateCheck())
            {
                Policy.PolicyStart = startPolicy_dateP.Value;
                if (CheckNumberofDrivers())
                {
                    Policy.NumberOfDrivers = (int)startPolicy_Drivernumber.Value;
                }
                else
                {
                    driversDelete();
                }

                DriverDetails DForm = new DriverDetails(0, false);
                DForm.StartPosition = FormStartPosition.Manual;
                DForm.Show(this);
                Hide();
            }
            else
            {
                MessageBox.Show("Declined: Start Date of Policy");
            }
        }