Пример #1
0
    Boolean ImportFile(string strFilePath1)
    {
        string         _yrmo       = ddlYrmo.SelectedItem.Text;
        string         logFilePath = Server.MapPath("~/uploads/") + "Exceptions_Putnam_" + _yrmo + ".txt";
        bool           importStat  = false;
        HRAImportDAL   iObj        = new HRAImportDAL();
        HRAExcelImport tObj        = new HRAExcelImport();
        HRAParseData   pObj        = new HRAParseData();
        DataSet        ds          = new DataSet(); ds.Clear();


        tObj.ConfirmPutnamYRMO(strFilePath1, _yrmo);

        if (File.Exists(logFilePath))
        {
            File.Delete(logFilePath);
        }

        iObj.Rollback(source, _yrmo);

        ds = tObj.importPutnam(strFilePath1);

        _counter = pObj.parsePutnam(ds, _yrmo, strFilePath1);

        if (File.Exists(logFilePath))
        {
            resultDiv.Visible = true;
        }
        importStat = true;

        Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1;
        Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "HRA", "Reconciliation", "HTH_HMO_Billing", "Putnam Import", _yrmo, _counter);

        return(importStat);
    }
Пример #2
0
    Boolean ImportFile(string strFilePath1)
    {
        string         _yrmo       = ddlYrmo.SelectedItem.Text;
        string         logFilePath = Server.MapPath("~/uploads/") + "Exceptions_PutnamAdj_" + _yrmo + ".txt";
        bool           importStat  = false;
        HRAImportDAL   iObj        = new HRAImportDAL();
        HRAExcelImport tObj        = new HRAExcelImport();
        HRAParseData   pObj        = new HRAParseData();
        DataSet        ds          = new DataSet();

        if (String.Compare((strFilePath1.Substring(strFilePath1.Length - 3)), "txt") == 0)
        {
            ds = HRATextImport.getTextFileData(strFilePath1, "PutnamAdjTable", '\t');
        }
        else
        {
            ds = tObj.getExcelData(strFilePath1, "PutnamAdjTable");
        }

        tObj.ConfirmPutnamAdjYRMO(_yrmo, ds, "PutnamAdjTable");

        if (File.Exists(logFilePath))
        {
            File.Delete(logFilePath);
        }

        iObj.Rollback(source, _yrmo);

        _counter = pObj.parsePutnamAdj(ds, _yrmo);

        if (File.Exists(logFilePath))
        {
            resultDiv.Visible = true;
        }

        importStat = true;

        Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1;
        Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "HRA", "Reconciliation", "HTH_HMO_Billing", "Putnam Adj. Import", _yrmo, _counter);

        return(importStat);
    }
Пример #3
0
    //protected void checkPastImport()
    //{
    //    string _yrmo = Session("yrmo"); //ddlYrmo.SelectedItem.Text;
    //    HRAImportDAL iobj = new HRAImportDAL();

    //    if (iobj.PastImport(source, _yrmo))
    //    {
    //        MultiView1.SetActiveView(view_reimport);
    //        lbl_reimport.Text = "Imported already for year-month (YRMO): " + _yrmo + "<br />Do you want to re-import the file?";
    //    }
    //    else
    //    {
    //        MultiView1.SetActiveView(view_main);
    //        //autoImport();
    //    }
    //}
    Boolean ImportFile(string strFilePath1)
    {
        string         _yrmo       = Session["yrmo"].ToString(); //ddlYrmo.SelectedItem.Text;
        string         logFilePath = Server.MapPath("~/uploads/") + "YEB_Online_" + _yrmo + ".xls";
        bool           importStat  = false;
        ImportYEBData  iObj        = new ImportYEBData();
        HRAExcelImport tObj        = new HRAExcelImport();
        DataTable      dtYEBOL;
        DataSet        ds = new DataSet(); ds.Clear();

        ds      = tObj.getExcelData(strFilePath1, "YEBOLTable");
        dtYEBOL = ds.Tables["YEBOLTable"];
        if (dtYEBOL.Rows.Count > 0)
        {
            ImportYEBData.Rollback(source, _yrmo);
            ImportYEBData.PrintOLProgressBar();
            //http://www.eggheadcafe.com/articles/20051223.asp

            _counter = iObj.insertYEBOLData(dtYEBOL);
            Thread.Sleep(2000);
            ImportYEBData.ClearProgressBar(_counter);
            //Now update the YEbDetailtable with the matches
            //found in the YEBOnline table
            ImportYEBData.updateYEBDetailData(_yrmo, "YEBOL");
        }

        if (File.Exists(logFilePath))
        {
            File.Delete(logFilePath);
        }

        importStat = true;

        Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1;
        Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "YEB", "ImportSourceFile", "YEB_ONLINE", "YEBOL Import", _yrmo, _counter);

        return(importStat);
    }
    Boolean ImportFile(string strFilePath1)
    {
        string         _yrmo       = Session["yrmo"].ToString(); //ddlYrmo.SelectedItem.Text;
        string         logFilePath = Server.MapPath("~/uploads/") + "YEB_WWRET_" + _yrmo + ".xls";
        bool           importStat  = false;
        string         filterexp   = "";
        ImportYEBData  iObj        = new ImportYEBData();
        HRAExcelImport tObj        = new HRAExcelImport();
        HRAParseData   pObj        = new HRAParseData();

        ImportYEBData.Rollback(source + pilotind, _yrmo);
        DataTable dtWWret;
        DataSet   ds = new DataSet(); ds.Clear();

        ds = tObj.getExcelData(strFilePath1, "WWRetTable");
        //testing Cigna Admin fee bill 6-8-2009
        //ds = tObj.getCignaAdminFeeBillData(strFilePath1, "CignaAdminFeeTable");
        //tObj.ConfirmPutnamYRMO(strFilePath1, _yrmo);
        ////ds.Tables.Add(tObj.ConvertRangeXLS(_filepath, dt, "SSN", 0));
        ///_counter = pObj.parsePutnamPartData(ds, _filepath, _source, _qy);
        ///end testing///
        dtWWret = ds.Tables["WWRetTable"];

        if (dtWWret.Rows.Count > 0)
        {
            if (pilotind == "PI")

            {
                filterexp = "(HealthStatusCode not in ('RT','VT','RFB','RFG','RFI','RFO','RFP','RFS')) AND " +
                            "EligGroupID <> 0 AND ((Med_TierID)  not in (1,2,3,4,5,6)) AND ((Den_TierID) not in (1,2,3,4,5,6)) and ((Vis_TierID) not in (1,2,3,4,5,6)) AND " +
                            "((Med_OptionID <> 100) OR (Den_OptionID <>100) OR (Vis_OptionID <> 100)) AND (pilotflag='True') AND EEID >0";
                //"(Med_OptionID <> '100' and Den_OptionID <>'100' and Vis_OptionID <> '100') AND (pilotflag='True') AND EEID >0";

                DataRow[] foundrows = dtWWret.Select(filterexp);
                _counter = foundrows.Length;
                //foreach (DataRow dr in foundrows)
                {
                    //insert the row in the YEB Detail table
                    iObj.insertWWRetData(foundrows, usryrmo, pilotind, source, TypeCD);
                }
            }

            else if (pilotind == "NP")
            {
                filterexp = "(HealthStatusCode not in ('RT','VT','RFB','RFG','RFI','RFO','RFP','RFS')) AND " +
                            "EligGroupID <> 0 AND ((Med_TierID)  not in (1,2,3,4,5,6)) AND ((Den_TierID) not in (1,2,3,4,5,6)) and ((Vis_TierID) not in (1,2,3,4,5,6)) AND " +
                            "((Med_OptionID <> 100) OR (Den_OptionID <>100) OR (Vis_OptionID <> 100)) AND (pilotflag='False') AND EEID >0";
                //"(Med_OptionID <> '100' AND Den_OptionID <>'100' AND Vis_OptionID <> '100') AND (pilotflag='False') AND EEID >0";
                DataRow[] foundrows = dtWWret.Select(filterexp);
                _counter = foundrows.Length;
                //foreach (DataRow dr in foundrows)
                {
                    //insert the row in the YEB Detail table
                    iObj.insertWWRetData(foundrows, usryrmo, pilotind, source, TypeCD);
                }
            }
        }

        if (File.Exists(logFilePath))
        {
            File.Delete(logFilePath);
        }

        importStat = true;

        Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1;
        Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "YEB", "ImportSourceFile", "YEB_WWRET", "WW Import", usryrmo, _counter);

        return(importStat);
    }