Ejemplo n.º 1
0
 public vehicle vehicle_update(int ID)
 {
     vehicle                    = vehicle.Select(ID);
     vehicle.vehicle_id         = Convert.ToInt32(Update_vehicle_id_txt.Text);
     vehicle.case_id            = Convert.ToInt32(Update_case_id_txt.Text);
     vehicle.client_id          = Convert.ToInt32(Update_client_id_txt.Text);
     vehicle.vehicle_make       = Update_vehicle_make_txt.Text;
     vehicle.vehicle_model      = Update_vehicle_model_txt.Text;
     vehicle.vehicle_type       = Update_vehicle_type_txt.Text;
     vehicle.vehicle_year       = Convert.ToInt32(Update_vehicle_year_txt.Text);
     vehicle.vehicle_desc       = Update_vehicle_desc_txt.Text;
     vehicle.vin                = Update_vin_txt.Text;
     vehicle.start_mileage      = Convert.ToInt32(Update_start_mileage_txt.Text);
     vehicle.first_service_date = Convert.ToDateTime(Update_first_service_date_txt.Text);
     vehicle.last_service_date  = Convert.ToDateTime(Update_last_service_date_txt.Text);
     vehicle.PLATENUMBER        = Update_PLATENUMBER_txt.Text;
     vehicle.FUELTYPE           = Update_FUELTYPE_txt.Text;
     vehicle.MPH                = Convert.ToInt32(Update_MPH_txt.Text);
     vehicle.INSURED            = Update_INSURED_txt.Text;
     vehicle.Update(vehicle);
     Insert_vehicle_GridView.DataBind();
     Update_vehicle_GridView.DataBind();
     Delete_vehicle_GridView.DataBind();
     return(vehicle);
 }