예제 #1
0
        private void Remove_Click(object sender, EventArgs e)
        {
            Car c = new PAIN_Forms.Car(
                int.Parse(listView1.SelectedItems[0].Name),
                String.Empty,
                0,
                0,
                CarType.Personal
                );

            parent.DeleteCar(c);
        }
예제 #2
0
        private void Remove_Click(object sender, EventArgs e)
        {
            Car c = new PAIN_Forms.Car(
                int.Parse(IdTextBox.Text),
                BrandTextBox.Text,
                int.Parse(MaxVelocityTextBox.Text),
                int.Parse(ProdYearTextBox.Text),
                chooser.choosedType
                );

            parent.DeleteCar(c);
            this.Close();
        }
예제 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     BrandTextBox_Validated(null, null);
     ProdYearTextBox_Validated(null, null);
     MaxVelocityTextBox_Validated(null, null);
     if (
         errorProvider1.GetError(BrandTextBox) == String.Empty &&
         errorProvider1.GetError(ProdYearTextBox) == String.Empty &&
         errorProvider1.GetError(MaxVelocityTextBox) == String.Empty
         )
     {
         Car c = new PAIN_Forms.Car(
             0,
             BrandTextBox.Text,
             int.Parse(MaxVelocityTextBox.Text),
             int.Parse(ProdYearTextBox.Text),
             chooser.choosedType
             );
         parent.AddCar(c);
         this.Close();
     }
 }