using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Business_Slip : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            txtClaimID.Text = Request.QueryString["clID"];
        }
    }

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            if(txtMerchantName.Text !="")
            {
                if(txtAccountNo.Text !="")
                {
                    string p1 = txtMerchantName.Text;
                    string p2 = System.DateTime.Now.ToString("yyMMdd");
                    string p3 = txtClaimID.Text;
                    string p4 = txtATTN.Text;
                    string p5 = txtAccountNo.Text;
                    ScriptManager.RegisterClientScriptBlock(this, typeof(string), "new window",
                    "window.open('../Reports/Default.aspx?rpt=102&p1=" + p1 + "&p2=" + p2 + "&p3=" + p3 + "&p4=" + p4 + "&p5=" + p5 + "','Report')", true);
                    //ScriptManager.RegisterClientScriptBlock(this, typeof(string), "closewindow", "window.close();", true);
                }
                else
                {
                    Notifications.showMessage("Please Enter Account Number", this, Notifications.errorMessage, true);
                }
            }
            else
            {
                Notifications.showMessage("Please Enter Merchant Name", this, Notifications.errorMessage, true);
            }
        }
    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {

    }
}