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); }