예제 #1
0
 private void metroLink3_Click(object sender, EventArgs e)
 {
     if (RowView != null)
     {
         EditCar form = new EditCar();
         form.Car.Id     = int.Parse(RowView["idCar"].ToString());
         form.Car.Board  = RowView["Board"].ToString();
         form.Car.Branch = RowView["Branch"].ToString();
         form.Car.Color  = RowView["Color"].ToString();
         form.Car.Doors  = int.Parse(RowView["Doors"].ToString());
         form.Car.Fuel   = RowView["Fuel"].ToString();
         form.Car.Model  = RowView["Model"].ToString();
         form.Car.Year   = int.Parse(RowView["Year"].ToString());
         form.ShowDialog();
     }
     else
     {
         MetroMessageBox.Show(this, "Selecione a linha que deseja editar", "", MessageBoxButtons.OK, MessageBoxIcon.Warning, 100);
     }
 }
예제 #2
0
 private void metroLink3_Click(object sender, EventArgs e)
 {
     if (RowView != null)
     {
         EditCar form = new EditCar(this.StyleManager);
         form.Car.Id     = int.Parse(RowView["Código"].ToString());
         form.Car.Board  = RowView["Placa"].ToString();
         form.Car.Branch = RowView["Marca"].ToString();
         form.Car.Color  = RowView["Cor"].ToString();
         form.Car.Doors  = int.Parse(RowView["Portas"].ToString());
         form.Car.Fuel   = RowView["Combustivel"].ToString();
         form.Car.Model  = RowView["Modelo"].ToString();
         form.Car.Year   = int.Parse(RowView["Ano"].ToString());
         form.ShowDialog();
     }
     else
     {
         MetroMessageBox.Show(this, "Selecione a linha que deseja editar", "", MessageBoxButtons.OK, MessageBoxIcon.Warning, 100);
     }
 }