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

public partial class Dashboard : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            //loadReconSummary(2, lblMeezaDate, lblMeezaMatch, lblMeezaNonMatch, lblMeezaMatchAMount, lblMeezaNonMatchAmount, lblMeezaUnsettledAmount, lblMeezaUnsettledAmount);
            //loadReconSummary(4, lblMDSLDate, lblMDSLMatch, lblMDSLNonMatch, lblMDSLMatchAMount, lblMDSLNonMatchAmount, lblMDSLUnsettled, lblMDSLUnsettledAmount);
            //loadReconSummary(5, lblSMDate, lblSMMatch, lblSMNonMatch, lblSMMatchAMount, lblSMNonMatchAmount, lblSMUnsettled, lblSMUnsettledAmount);
            //loadSettlement();
        }

    }

    //private void loadReconSummary(int channel, Label l1, Label l2, Label l3, Label l4, Label l5, Label l6, Label l7)
    //{
    //    string DBConnection = Helper.dbConnection();

    //    OracleConnection oracon = new OracleConnection(DBConnection);
    //    oracon.Open();

    //    OracleCommand oracom = new OracleCommand();
    //    oracom.Connection = oracon;

    //    oracom.CommandType = CommandType.StoredProcedure;
    //    oracom.CommandText = "TRANSACTIONS_SEARCHER.Get_recon_summ";

    //    oracom.Parameters.Add("p_rc_code", OracleType.Number).Direction = ParameterDirection.Input;
    //    oracom.Parameters.Add("p_output", OracleType.Cursor).Direction = ParameterDirection.Output;

    //    oracom.Parameters["p_rc_code"].Value = channel;

    //    OracleDataAdapter da = new OracleDataAdapter(oracom);
    //    DataSet ds = new DataSet();
    //    da.Fill(ds);

    //    oracon.Close();

    //    //set the data in the controls
    //    if (ds.Tables[0].Rows.Count > 0)
    //    {
    //        l1.Text = ds.Tables[0].Rows[0]["record_date"].ToString();
    //        l2.Text = ds.Tables[0].Rows[0]["n_match"].ToString();
    //        l3.Text = ds.Tables[0].Rows[0]["n_missmatch"].ToString();
    //        l4.Text = ds.Tables[0].Rows[0]["amount_match"].ToString();
    //        l5.Text = ds.Tables[0].Rows[0]["amount_missmatch"].ToString();
    //        l6.Text = ds.Tables[0].Rows[0]["n_unsettled"].ToString();
    //        l7.Text = ds.Tables[0].Rows[0]["Amountn_unsettled"].ToString();
    //    }
    //    //GridView2.DataSource = ds.Tables[1];
    //    //GridView2.DataBind();

    //    //loadResultChannels(ds.Tables[0].Rows[0]["card_number"].ToString(), ds.Tables[0].Rows[0]["term_id"].ToString(), ds.Tables[0].Rows[0]["tran_date"].ToString(), ds.Tables[0].Rows[0]["rrn"].ToString());

    //}

    //private void loadSettlement()
    //{
    //    string DBConnection = Helper.dbConnection();

    //    OracleConnection oracon = new OracleConnection(DBConnection);
    //    oracon.Open();

    //    OracleCommand oracom = new OracleCommand();
    //    oracom.Connection = oracon;

    //    oracom.CommandType = CommandType.StoredProcedure;
    //    oracom.CommandText = "TRANSACTIONS_SEARCHER.Get_Settl_Summary";

    //    oracom.Parameters.Add("p_Settl_Summary_Output", OracleType.Cursor).Direction = ParameterDirection.Output;

    //    OracleDataAdapter da = new OracleDataAdapter(oracom);
    //    DataSet ds = new DataSet();
    //    da.Fill(ds);

    //    oracon.Close();

    //    //set the data in the controls
    //    if (ds.Tables[0].Rows.Count > 0)
    //    {
    //        lblSettlementDate.Text = ds.Tables[0].Rows[0]["SettlDate"].ToString();
    //        lblSettlementFileName.Text = ds.Tables[0].Rows[0]["File_Name"].ToString();
            
    //        lblSettlAmount.Text = ds.Tables[0].Rows[0]["NetAmt"].ToString();
    //        lblSDB.Text = ds.Tables[0].Rows[0]["DrCrFlag"].ToString();

    //        lblSettlAmount2.Text = ds.Tables[0].Rows[1]["NetAmt"].ToString();
    //        lblSDB2.Text = ds.Tables[0].Rows[1]["DrCrFlag"].ToString();

    //        link1.HRef = "../business/GenerateSGL.aspx?sid=" + lblSettlementDate.Text;
    //    }
    //    //GridView2.DataSource = ds.Tables[1];
    //    //GridView2.DataBind();

    //    //loadResultChannels(ds.Tables[0].Rows[0]["card_number"].ToString(), ds.Tables[0].Rows[0]["term_id"].ToString(), ds.Tables[0].Rows[0]["tran_date"].ToString(), ds.Tables[0].Rows[0]["rrn"].ToString());

    //}

   
}