Boolean ImportFile(string strFilePath1) { string _yrmo = ddlYrmo.SelectedItem.Text; bool importStat = false; ImportDAL iObj = new ImportDAL(); try { DataSet ds = new DataSet(); ImportExcelReport tObj = new ImportExcelReport(); ds = tObj.importHTH(strFilePath1, _yrmo); parseDataSet pObj = new parseDataSet(); pObj.parseHTH(ds, _yrmo); counter = iObj.insertHTHHeadcounts(_yrmo); importStat = true; int _counter = iObj.getImportCount("HTH", _yrmo); Session["taskId"] = Convert.ToInt32(Session["taskId"]) + 1; Audit.auditUserTaskI(Session.SessionID, Session["mid"].ToString(), Session["taskId"].ToString(), "ANTHEM", "Anthem Billing Reconciliation", "Headcount", "International HTH Report Import", _yrmo, _counter); } catch (Exception ex) { iObj.Rollback("HTH", _yrmo); throw ex; } finally { File.Delete(strFilePath1); FileUpload1.FilePost.InputStream.Flush(); FileUpload1.FilePost.InputStream.Close(); FileUpload1.FilePost.InputStream.Dispose(); } return(importStat); }