protected void btnGetDeatils_Click(object sender, EventArgs e) { DALSchedule obj = new DALSchedule(); DataSet ds = obj.GetAvailableSeatsDetails(Convert.ToInt32(txtSessionId.Text.Trim()), ViewState["action"].ToString()); if (ds != null && ds.Tables.Count > 0) { lblCounter.Text = ds.Tables[0].Rows[0]["CounterName"].ToString(); lblSource.Text = ds.Tables[0].Rows[0]["Source"].ToString(); lblDes.Text = ds.Tables[0].Rows[0]["Destination"].ToString(); lblMode.Text = ds.Tables[0].Rows[0]["Mode"].ToString(); lblDate.Text = ds.Tables[0].Rows[0]["Schd_Date"].ToString(); lblFare.Text = ds.Tables[0].Rows[0]["Fare"].ToString(); if (ds.Tables.Count > 1) { ddlSeats.Items.Clear(); if (ds.Tables[1].Rows.Count > 0) { for (int i = 0; i < ds.Tables[1].Rows.Count; i++) { ddlSeats.Items.Add(ds.Tables[1].Rows[i][0].ToString()); } } } } }
protected void btnTimeChange_Click(object sender, EventArgs e) { DALSchedule obj = new DALSchedule(); DataSet ds = obj.GetAvailableSeatsDetails(Convert.ToInt32(txtTime.Text.Trim()), "C"); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0].Rows[0][0].ToString() == "Success") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Schedule display time is chnaged successfully. ')", true); } } txtTime.Text = ""; }