Пример #1
0
        public DataSet GetHTHAnthemRpt(string yrmo, string plancode)
        {
            IPBA_DAL dobj = new IPBA_DAL();

            string[] programs = { "Active", "Active Pilot", "COBRA", "COBRA Pilot" };
            string[] tiercds  = { "E", "C", "S", "F" };
            DataSet  dsTemp   = new DataSet(); dsTemp.Clear();
            DataSet  dsDet    = new DataSet(); dsDet.Clear();

            DataRow[] rows;


            dsTemp = dobj.GetDetData(yrmo, plancode);
            dsDet  = dsTemp.Clone();

            foreach (string program in programs)
            {
                foreach (string tiercd in tiercds)
                {
                    rows = GetDetRows(program, tiercd, dsTemp); dsDet.Merge(rows);
                }
            }

            dsDet.Tables[0].Columns["Class"].ColumnName  = "progcd";
            dsDet.Tables[0].Columns["Type"].ColumnName   = "ptype";
            dsDet.Tables[0].Columns["SSN"].ColumnName    = "ssno";
            dsDet.Tables[0].Columns["Name"].ColumnName   = "name";
            dsDet.Tables[0].Columns["Tier"].ColumnName   = "tiercd";
            dsDet.Tables[0].Columns["Eff Dt"].ColumnName = "effdt";
            dsDet.Tables[0].Columns["Rate"].ColumnName   = "rate";

            return(dsDet);
        }
Пример #2
0
        public DataSet GetDetailRpt(string yrmo, string plancode)
        {
            IPBA_DAL dobj  = new IPBA_DAL();
            int      count = 0;

            string[]  programs = { "Active", "Active Pilot", "COBRA", "COBRA Pilot" };
            string[]  tiercds  = { "E", "C", "S", "F" };
            DataSet   dsTemp   = new DataSet(); dsTemp.Clear();
            DataSet   dsDet    = new DataSet(); dsDet.Clear();
            DataTable tblDet;
            DataRow   row;

            DataRow[] rows;


            dsTemp = dobj.GetDetData(yrmo, plancode);
            dsDet  = dsTemp.Clone(); tblDet = dsDet.Tables[0];

            foreach (string program in programs)
            {
                foreach (string tiercd in tiercds)
                {
                    rows  = GetDetRows(program, tiercd, dsTemp); dsDet.Merge(rows);
                    count = GetDetEmpCount(program, tiercd, dsTemp);

                    if (count != 0)
                    {
                        row         = tblDet.NewRow();
                        row["Name"] = "***";
                        row["Tier"] = count;
                        row["Rate"] = GetDetTotalAmt(program, tiercd, dsTemp);
                        tblDet.Rows.Add(row);
                    }
                }
                count = GetEmpCount(program, dsTemp);
                if (count != 0)
                {
                    row          = tblDet.NewRow();
                    row["Class"] = "*** SUB TOTAL:";
                    row["Tier"]  = count;
                    row["Rate"]  = GetTotalAmt(program, dsTemp);
                    tblDet.Rows.Add(row);
                }
            }
            if (tblDet.Rows.Count > 0)
            {
                row          = tblDet.NewRow();
                row["Class"] = "*** GRAND TOTAL:";
                row["Rate"]  = GetTotalAmt(dsTemp);
                tblDet.Rows.Add(row);
            }

            return(dsDet);
        }
Пример #3
0
        public DataSet GetSummaryRpt(string yrmo, string plancode)
        {
            IPBA_DAL dobj = new IPBA_DAL();
            string   tierexp;
            int      count = 0;

            string[] typecds  = { "STD", "CHG", "RETRO", "MANCHG", "MANRETRO" };
            string[] programs = { "Active", "Active Pilot", "COBRA", "COBRA Pilot", "Retiree", "Retiree Pilot" };
            string[] tiercds  = { "E", "C", "S", "F" };
            DataSet  dsTemp   = new DataSet(); dsTemp.Clear();
            DataSet  dsTemp1  = new DataSet(); dsTemp1.Clear();
            DataSet  dsSum    = new DataSet(); dsSum.Clear();

            System.Type typeDecimal = System.Type.GetType("System.Decimal");
            System.Type typeInt     = System.Type.GetType("System.Int32");
            DataTable   tblSum      = dsSum.Tables.Add("Summary");
            DataRow     row;
            DataColumn  col;

            col = new DataColumn("PlanYr"); tblSum.Columns.Add(col);
            col = new DataColumn("Classification"); tblSum.Columns.Add(col);
            col = new DataColumn("Coverage Tier"); tblSum.Columns.Add(col);
            col = new DataColumn("Emps", typeInt); tblSum.Columns.Add(col);
            col = new DataColumn("Rate", typeDecimal); tblSum.Columns.Add(col);
            col = new DataColumn("Total", typeDecimal); tblSum.Columns.Add(col);

            dsTemp  = dobj.GetDetData(yrmo, plancode);
            dsTemp1 = dobj.GetAdjData(yrmo, plancode); dsTemp.Merge(dsTemp1); dsTemp1.Clear();
            dsTemp1 = GetCobraAdjustments(yrmo, plancode); dsTemp.Merge(dsTemp1); dsTemp1.Clear();
            dsTemp1 = GetManualAdjustments(yrmo, plancode); dsTemp.Merge(dsTemp1); dsTemp1.Clear();

            foreach (string typecd in typecds)
            {
                foreach (string program in programs)
                {
                    foreach (string tiercd in tiercds)
                    {
                        tierexp = GetTierExp(tiercd, program);
                        count   = GetEmpCount(typecd, program, tiercd, dsTemp);
                        if (count != 0)
                        {
                            row                   = tblSum.NewRow();
                            row["PlanYr"]         = yrmo.Substring(0, 4);
                            row["Classification"] = GetClassification(typecd, program);
                            row["Coverage Tier"]  = tierexp;
                            row["Emps"]           = count;
                            row["Rate"]           = dobj.GetRate(yrmo, program, plancode, tiercd);
                            if (typecd.Equals("CHG") || typecd.Equals("MANCHG"))
                            {
                                row["Total"] = count * dobj.GetRate(yrmo, program, plancode, tiercd);
                            }
                            else
                            {
                                row["Total"] = GetTotalAmt(typecd, program, tiercd, dsTemp);
                            }
                            tblSum.Rows.Add(row);
                        }
                        if (typecd.Equals("CHG") || typecd.Equals("MANCHG"))
                        {
                            tierexp = GetTierExp(tiercd, program);
                            count   = GetEmpCountPriorCHG(typecd, program, tiercd, dsTemp);
                            if (count != 0)
                            {
                                row                   = tblSum.NewRow();
                                row["PlanYr"]         = yrmo.Substring(0, 4);
                                row["Classification"] = GetClassification(typecd, program);
                                row["Coverage Tier"]  = tierexp;
                                row["Emps"]           = (-1) * count;
                                row["Rate"]           = dobj.GetRate(yrmo, program, plancode, tiercd);
                                row["Total"]          = (-1) * count * dobj.GetRate(yrmo, program, plancode, tiercd);
                                tblSum.Rows.Add(row);
                            }
                        }
                    }
                    count = GetEmpCount(typecd, program, dsTemp);
                    if (count != 0)
                    {
                        row = tblSum.NewRow();
                        row["Classification"] = "***";
                        row["Coverage Tier"]  = "SUB TOTAL:";
                        row["Emps"]           = GetSumEmpCount(GetClassification(typecd, program), dsSum);
                        row["Total"]          = GetTotalAmt(typecd, program, dsTemp);
                        tblSum.Rows.Add(row);
                    }
                }
            }
            if (tblSum.Rows.Count > 0)
            {
                row = tblSum.NewRow();
                row["Classification"] = "*****";
                row["Coverage Tier"]  = "GRAND TOTAL:";
                row["Emps"]           = GetSumEmpCount(dsSum);
                row["Total"]          = GetTotalAmt(dsTemp);
                tblSum.Rows.Add(row);
            }

            return(dsSum);
        }