protected void gvData_RowCommand(object sender, GridViewCommandEventArgs e) { if (!e.CommandName.Equals("Page")) { GridViewRow gvRow = (GridViewRow)((Button)e.CommandSource).NamingContainer; //#region Issue //else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE).PadLeft(5, '0'))) //{ //Config oConfig = (Config)Session[Constants.SES_USER_CONFIG]; //if (oConfig.GroupID != "1" && oConfig.GroupID != "12") //{ // if (gvRow.Cells[8].Text.Contains("MANAGER")) // { // ucMessage.OpenMessage("This registration required Manager Approval. Please check.", Constants.MSG_TYPE_ERROR); // ScriptManager.RegisterStartupScript(this.upGv, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true); // return; // } //} // Response.Redirect(Constants.PAGE_TRAN_ISSUE + "?sTransID=" + oCrypManager.GetEncryptedString(gvRow.Cells[1].Text) + "&sPageID=" + oCrypManager.GetEncryptedString(sType), false); //} //else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE_UPDATE).PadLeft(5, '0'))) //{ // Response.Redirect(Constants.PAGE_TRAN_ISSUE_UPDATE + "?sIsUpdate=" + oCrypManager.GetEncryptedString("0") + "&sRegID=" + oCrypManager.GetEncryptedString(gvRow.Cells[2].Text) + "&sPageID=" + oCrypManager.GetEncryptedString(sType), false); //} //else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE_OLD).PadLeft(5, '0'))) //{ // Response.Redirect(Constants.PAGE_TRAN_ISSUE_OLD_CUSTOMER + "?sRegID=" + oCrypManager.GetEncryptedString(gvRow.Cells[1].Text) + "&sPageID=" + oCrypManager.GetEncryptedString(sType), false); //} //#endregion Issue if (gvRow.Cells[1].Text != "") { IssueDAL oIssueDAL = new IssueDAL(); Result oResult = oIssueDAL.LoadBBDocument_PDF(gvRow.Cells[1].Text); if (oResult.Status) { if (((DataTable)oResult.Return).Rows.Count > 0) { Session[Constants.SES_PDF_DATA] = (byte[])(((DataTable)oResult.Return).Rows[0]["LetterImage"]); Page.RegisterStartupScript(Constants.PDF_WINDOW, Util.OpenPDFView()); } } } } }