protected void BtnUpdate_Click(object sender, EventArgs e) { TransactionInfo t1 = new TransactionInfo(); BusInfo binfo = new BusInfo(); if (t1.AlreadyBooked(DropDownBusId.SelectedItem.Text) == false) { binfo.UpdateBus(DropDownBusId.SelectedItem.Text, TxtSource.Text, TxtDestination.Text, Convert.ToDateTime(TxtDate.Text).Date, Convert.ToDateTime(TxtTime.Text), Convert.ToInt32(TxtSeat.Text), Convert.ToInt32(TxtFare.Text), TxtType.Text); Response.Redirect("Admin.aspx"); } else { TxtSource.Text = "Cannot Update"; TxtDestination.Text = ""; TxtDate.Text = ""; TxtTime.Text = ""; TxtFare.Text = ""; TxtSeat.Text = ""; TxtType.Text = ""; } }