Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString.AllKeys.Contains("ReportType"))
            {
                DataTable ExportDT = CRBusinessLogicLayer.NPA_DETAILS_REPORT(Convert.ToInt32(Request.QueryString["EXID"]), Request.QueryString["BankID"], Request.QueryString["Branch"], Convert.ToInt32(Request.QueryString["CityID"]), Request.QueryString["FDATE"], Request.QueryString["TDATE"]);
                if (ExportDT.Rows.Count > 0)
                {
                    CRBusinessLogicLayer.GENERATEREPORT(ExportDT, "NPA DETAILS", Convert.ToInt32(Request.QueryString["ReportType"]));
                }
                else
                {
                    Response.Redirect("~/DailyTransactions/NPADetails1.aspx?Error='No data to display'", false);
                }
            }
            if (Request.QueryString.AllKeys.Contains("NPAID"))
            {
                CRBusinessLogicLayer.NPA_DETAILS_RECOVERY_REPORT(Request.QueryString["NPAID"]);
            }
            if (Request.QueryString.AllKeys.Contains("docurl"))
            {
                string name = Request.QueryString["docurl"];

                var dt = (DataTable)Session["DtDocbytes"];

                DataTable dtssss = (from m in dt.AsEnumerable() where m.Field <Int32>("ID") == Convert.ToInt32(name) select m).CopyToDataTable();

                DownloadDOCFile(((byte[])dtssss.Rows[0]["UFILE_BYTES"]), dtssss.Rows[0]["UFILE_NAME"].ToString(), dtssss.Rows[0]["UFILE_TYPE"].ToString());

                Response.End();
            }
            LoginRequired = true;
        }