コード例 #1
0
    protected void lnk_genDtlRptA2_OnClick(object sender, EventArgs e)
    {
        string filename = "Planhier_Rate_Audit";

        string[]   sheetnames = { "rate_audit" };
        string[]   titles     = { "Audit Information for Planhier Rates" };
        string[][] colsFormat = { new string[] { "string", "string", "string", "string", "string", "string", "string", "string", "string" } };
        CAExcelRpt xlobj      = new CAExcelRpt();
        DataSet    dsrptA2    = new DataSet();

        dsrptA2 = BenhierDAL.getRateAuditReport();
        xlobj.ExcelXMLRpt(dsrptA2, filename, sheetnames, titles, colsFormat);
    }
コード例 #2
0
    private void SortGridView(string sortExpression, string direction, string src)
    {
        DataTable dt;
        DataView  dv;

        if (src.Equals("Ben"))
        {
            string _progcd = ddlProgCd.SelectedItem.Text;
            //string _bencd = ddlBencd.SelectedItem.Text;
            string _eyrmo = ddlEffYrmo.SelectedItem.Text;
            dt                 = BenhierDAL.getplanhierA(_progcd, _eyrmo).Tables[0];
            dv                 = new DataView(dt);
            dv.Sort            = sortExpression + direction;
            grdvBen.DataSource = dv;
            grdvBen.DataBind();
        }
        else if (src.Equals("Rate"))
        {
            string _py      = ddlRpy.SelectedItem.Text;
            string _Rprogcd = ddlRProgcd.SelectedItem.Text;
            //string _Rbencd = ddlRBencd.SelectedItem.Text;
            string _Reyrmo = ddlREffYrmo.SelectedItem.Text;

            dt      = BenhierDAL.getplanRatesA(_py, _Reyrmo, _Rprogcd).Tables[0];
            dv      = new DataView(dt);
            dv.Sort = sortExpression + direction;
            grdvRates.DataSource = dv;
            grdvRates.DataBind();
            bindratefooterplan();
        }
        else if (src.Equals("PAudit"))
        {
            dt      = BenhierDAL.getPlanhierAuditReport().Tables[0];
            dv      = new DataView(dt);
            dv.Sort = sortExpression + direction;
            grdv_dtlBenAud.DataSource = dv;
            grdv_dtlBenAud.DataBind();
        }
        else if (src.Equals("RAudit"))
        {
            dt      = BenhierDAL.getRateAuditReport().Tables[0];
            dv      = new DataView(dt);
            dv.Sort = sortExpression + direction;
            grdv_dtlrateAud.DataSource = dv;
            grdv_dtlrateAud.DataBind();
        }
    }
コード例 #3
0
    void bindAuditReport(string _src)
    {
        DataSet bindDs = new DataSet();

        bindDs.Clear();

        switch (_src)
        {
        case "Planhier":
            bindDs = BenhierDAL.getPlanhierAuditReport();
            grdv_dtlBenAud.DataSource = bindDs;
            grdv_dtlBenAud.DataBind();
            break;

        case "Rates":
            bindDs = BenhierDAL.getRateAuditReport();
            grdv_dtlrateAud.DataSource = bindDs;
            grdv_dtlrateAud.DataBind();
            break;
        }
    }