Ejemplo n.º 1
0
    protected void Btn_Report_Click(object sender, EventArgs e)
    {
        try
        {
            EDT = DateSet();
            string RptName = "", RecFor = "";

            string BKCD = RS.FnBl_GetBANKCode(RS);
            if (BKCD == "1009")
            {
                RptName = "RptRecoveryStatement_1009.rdlc";
            }
            else if (BKCD == "1010")
            {
                RptName = "RptRecoveryStatement_1010.rdlc";
            }
            else
            {
                RptName = "RptRecoveryStatement.rdlc";
            }

            RecFor = DdlRecDiv.SelectedItem.Text + " ( " + DdlRecDept.SelectedItem.Text + " ) ";

            string redirectURL = "FrmRecRView.aspx?FL=" + Rdb_ReportType.SelectedValue.ToString() + "&BRCD=" + ddlBrCode.SelectedValue.ToString() + "&ASONDATE=" + EDT.ToString() + "&RECDIV=" + DdlRecDiv.SelectedValue.ToString() + "&RECCODE=" + DdlRecDept.SelectedValue.ToString() + "&UID=" + Session["UserName"].ToString() + "&MM=" + TxtMM.Text + "&YY=" + TxtYYYY.Text + "&RECFOR=" + RecFor + "&rptname=" + RptName + "";
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + redirectURL + "','_blank')", true);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TxtMM.Focus();
            string BKCD = RS.FnBl_GetBANKCode(RS);

            if (BKCD != null)
            {
                ViewState["BANKCODE"] = BKCD;
            }
            else
            {
                ViewState["BANKCODE"] = "0";
            }
        }
    }