protected void ddlistVehicleNumber_SelectedIndexChanged(object sender, EventArgs e) { switch (ddlistVehicleNumber.SelectedIndex) { case 0: txtAgeofVehicle.Text = ""; txtKilometerRun.Text = ""; txtPilotName.Text = ""; txtEmtName.Text = ""; break; default: var dtManufacturer = _fmsg.GetManufactureDate(Convert.ToInt32(ddlistVehicleNumber.SelectedItem.Value)); txtAgeofVehicle.Text = dtManufacturer.Tables[0].Rows[0]["differenc"].ToString(); txtKilometerRun.Text = dtManufacturer.Tables[1].Rows[0]["ODO"].ToString(); var dtNames = _fmsg.GetNames(ddlistVehicleNumber.SelectedItem.Text); txtPilotName.Text = dtNames.Tables[0].Rows[0]["PilotName"].ToString(); txtEmtName.Text = dtNames.Tables[0].Rows[0]["EMTName"].ToString(); break; } }