protected void btnSearch_Click(object sender, EventArgs e) { try { objBAL = new ClsBAL(); if (txtDOJ.Text == "") { objBAL.dateOFJourney = null; } else { objBAL.dateOFJourney = Convert.ToDateTime(txtDOJ.Text); } if (ddlSources.SelectedItem.Text != "ALL") { objBAL.sourceName = ddlSources.SelectedItem.Text; } if (ddlDestinations.SelectedItem.Text != "ALL") { objBAL.destinationName = ddlDestinations.SelectedItem.Text; } if (ddlStatus.SelectedItem.Text != "ALL") { objBAL.status = ddlStatus.SelectedItem.Text; } if (txtName.Text != "") { objBAL.fullName = txtName.Text; } if (txtEmailID.Text != "") { objBAL.emailId = txtEmailID.Text; } if (ddloperator.SelectedItem.Text != "ALL") { objBAL.travelName = ddloperator.SelectedItem.Text; } if (txtContact.Text != "") { objBAL.mobileNo = txtContact.Text; } ObjDataset = (DataSet)objBAL.GetTentativeBookingsBySearch(); if (ObjDataset != null) { if (ObjDataset.Tables.Count > 0) { if (ObjDataset.Tables[0].Rows.Count > 0) { lbtnXport2Xcel.Enabled = true; } else { lbtnXport2Xcel.Enabled = false; } ViewState["TentativeBookings"] = ObjDataset.Tables[0]; GvtentativeBooking.DataSource = ObjDataset.Tables[0]; GvtentativeBooking.DataBind(); } } } catch (Exception ex) { throw ex; } }