コード例 #1
0
    protected void bindResult()
    {
        DataSet ds   = new DataSet();
        string  yrmo = ddlYrmo.SelectedItem.Text;

        ds = ReconDAL.GetIntlReconData(yrmo);
        grdvResult.DataSource = ds;
        grdvResult.DataBind();
    }
コード例 #2
0
    private void SortGridView(string sortExpression, string direction, string source)
    {
        //  You can cache the DataTable for improving performance
        string yrmo = ddlYrmo.SelectedItem.Text;

        switch (source)
        {
        case "INTL":
            DataTable dt = ReconDAL.GetIntlReconData(yrmo).Tables[0];
            DataView  dv = new DataView(dt);
            dv.Sort = sortExpression + direction;
            grdvResult.DataSource = dv;
            grdvResult.DataBind();
            break;

        case "INTL_HTH":
            DataSet ds1 = new DataSet();
            ds1 = ReconDAL.getUnmatch(yrmo);
            if (ds1.Tables["HTHDATA"].Rows.Count > 0)
            {
                DataTable dt1 = ds1.Tables["HTHDATA"];
                DataView  dv1 = new DataView(dt1);
                dv1.Sort           = sortExpression + direction;
                grdvHTH.DataSource = dv1;
                grdvHTH.DataBind();
            }
            break;

        case "INTL_ANTH":
            DataSet ds2 = new DataSet();
            ds2 = ReconDAL.getUnmatch(yrmo);
            if (ds2.Tables["ANTHDATA"].Rows.Count > 0)
            {
                DataTable dt2 = ds2.Tables["ANTHDATA"];
                DataView  dv2 = new DataView(dt2);
                dv2.Sort            = sortExpression + direction;
                grdvAnth.DataSource = dv2;
                grdvAnth.DataBind();
            }
            break;
        }
    }
コード例 #3
0
    protected void btn_genRpt_Click(object sender, EventArgs e)
    {
        string  yrmo = ddlYrmo.SelectedItem.Text;
        DataSet ds   = new DataSet();

        ds.Clear();
        string[][] cols       = { new string[] { "YRMO", "Anthem Group Suffix", "Anthem Covg. Code", "EBA Count", "EBA Amount", "Anthem Count", "Anthem Amount", "EBA Count Variance", "EBA vs Anthem % Count Variance", "Threshold", "Threshold Level" } };
        string[][] colsFormat = { new string[] { "string", "string", "string", "number", "decimal", "number", "decimal", "number", "decimal", "decimal", "string" } };
        string[]   sheetnames = { "Intl_Bill_Recon" };
        string[]   titles     = { "International Billing Reconciliation for YRMO - " + yrmo };

        try
        {
            ds = ReconDAL.GetIntlReconData(yrmo);
            ExcelReport.ExcelXMLRpt(ds, "InternationalRecon_" + yrmo, sheetnames, titles, cols, colsFormat);
        }
        catch (Exception ex)
        {
            MultiView1.SetActiveView(view_main);
            lbl_error.Text = "Error in generating excel report" + ex.Message;
        }
    }