protected void btn_importActives_Click(object sender, EventArgs e) { DataTable dtLOA; ImportYEBData iObj = new ImportYEBData(); if (Session["yrmo"] != null) { usryrmo = Session["yrmo"].ToString(); } if (Session["pilotind"] != null) { pilotind = Session["pilotind"].ToString(); } status = "EBAACT"; if (pilotind != "" && status != "") { try { //Delete any previously imported data for the specified YRMO and criteria ImportYEBData.Rollback("ACT" + pilotind, usryrmo); //retrieve the datatable for the criteria specified based on status dtLOA = ImportYEBData.getYEBEmployeesbyStatus(pilotind, status.Substring(3, 3)).Tables[0]; if (dtLOA.Rows.Count > 0) { ImportYEBData.PrintACTProgressBar(); _counter = iObj.insertYEB_ACT_LOA_Data(dtLOA, usryrmo, pilotind, src, status); ImportYEBData.ClearProgressBar(_counter); if (_counter > 0) { MultiView1.SetActiveView(view_result); lbl_result.Text = "Import completed successfully -- " + _counter + " records imported"; } } } catch (Exception ex) { //resultDiv.Visible = false; ImportYEBData.Rollback("ACT" + pilotind, usryrmo); lbl_error.Text = "Error - " + ex.Message; } } }