protected void btnCreateAudit_Click(object sender, EventArgs e) { Btn_ShowAuditNo1.Enabled = false; lblValidation.Visible = false; try { btnPrint.Disabled = false; Btn_Excel.Enabled = true; string ShowName = ddl_Play.SelectedValue; string ShowLocation = ddl_Location.SelectedValue; string ShowDate = dateofshow.Text.Length > 0 ? dateofshow.Text : "0"; string ShowTime = ddl_ShowTimes.SelectedValue; string ShowTime1 = ddl_ShowTimes.SelectedItem.Text; string ShowDate1 = Convert.ToDateTime(dateofshow.Text.ToString()).ToString("dd/MM/yyyy"); DataTable dtauditno1report = TransactionBOL.AuditNumber1Report(ShowTime1, ShowDate1, ShowName, ShowLocation); if (dtauditno1report != null && dtauditno1report.Rows.Count > 0) { gv_Report.DataSource = dtauditno1report; gv_Report.DataBind(); } else { btnPrint.Disabled = true; Btn_Excel.Enabled = false; lblMess.Text = "No Records Found!"; } } catch (Exception ex) { Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(ex.Message); } }