protected void ViewButton_Click(object sender, EventArgs e) { try { if (ddlStatus.SelectedValue == "P") { GridViewWithdrawRequest.Columns[7].Visible = false; GridViewWithdrawRequest.Columns[8].Visible = false; } else if (ddlStatus.SelectedValue == "R") { // GridViewWithdrawRequest.Columns[6].Visible = false; GridViewWithdrawRequest.Columns[8].Visible = false; } else if (ddlStatus.SelectedValue == "A") { // GridViewWithdrawRequest.Columns[6].Visible = false; GridViewWithdrawRequest.Columns[7].Visible = false; } if (ddlTransFlow.SelectedValue == "1") { GridViewWithdrawRequest.Columns[1].Visible = false; GridViewWithdrawRequest.Columns[2].Visible = true; } else if (ddlTransFlow.SelectedValue == "2") { GridViewWithdrawRequest.Columns[1].Visible = true; GridViewWithdrawRequest.Columns[2].Visible = false; } UserAccountBLL userAccount = new UserAccountBLL(); DataTable dt = new DataTable(); if (ddlTransFlow.SelectedValue == "1") { dt = userAccount.getWithdrawRequestListForUser((string)LumexSessionManager.Get("ActiveUserId"), LumexLibraryManager.ParseAppDate(fromDateTextBox.Text), LumexLibraryManager.ParseAppDate(toDateTextBox.Text), ddlStatus.SelectedValue); } else if (ddlTransFlow.SelectedValue == "2") { dt = userAccount.getWithdrawRequestListToUser((string)LumexSessionManager.Get("ActiveUserId"), LumexLibraryManager.ParseAppDate(fromDateTextBox.Text), LumexLibraryManager.ParseAppDate(toDateTextBox.Text), ddlStatus.SelectedValue); } GridViewWithdrawRequest.DataSource = dt; GridViewWithdrawRequest.DataBind(); if (GridViewWithdrawRequest.Rows.Count > 0) { // generateButton.Visible = true; GridViewWithdrawRequest.UseAccessibleHeader = true; GridViewWithdrawRequest.HeaderRow.TableSection = TableRowSection.TableHeader; } } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { // MyAlertBox("MyOverlayStop();"); } }