/// <summary> /// Refresh the Employer group from Excel file /// </summary> /// <returns></returns> public ExceptionTypes StartEGHPExcelProcess() { ExceptionTypes result = ExceptionTypes.Success; DataTable dataTable = new DataTable(); string fileName = CacheUtility.GetConfigrationValueByConfigName(ConstantTexts.EGHPExclusionFileName); string errorMessage = string.Empty; try { ReadAsDataTable(fileName, out dataTable, out errorMessage); if (dataTable != null && dataTable.Rows.Count > 0) { result = _BLCommon.EGHPExcelProcess(dataTable, out errorMessage); } else { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, "Error in EGHP File", errorMessage); } if (result != ExceptionTypes.Success) { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } } catch (Exception ex) { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPFDRSubmission, (long)ExceptionTypes.Uncategorized, "Exception EGHP Exclusion Excel", ex.StackTrace.ToString()); } return(result); }
private void DOCMSPostTransaction(string BirthDate, string CaseNumber, string ContractNumber, string EffectiveStartDate, string EffectiveEndDate, string MedicareClaimNumber, string LastName, string PbpNo, long LoginUserID, long?ActionLkup, out string errorMessage) { GPSServiceGetMethods objGPSServiceGetMethods = new GPSServiceGetMethods(); DOGEN_GPSServiceRequestParameter objDOGEN_GPSServiceRequestParameter = new DOGEN_GPSServiceRequestParameter(); errorMessage = string.Empty; try { objDOGEN_GPSServiceRequestParameter.BirthDate = BirthDate; objDOGEN_GPSServiceRequestParameter.CaseNumber = CaseNumber; objDOGEN_GPSServiceRequestParameter.ContractNumber = ContractNumber; objDOGEN_GPSServiceRequestParameter.EffectiveEndDate = EffectiveEndDate; objDOGEN_GPSServiceRequestParameter.EffectiveStartDate = EffectiveStartDate; objDOGEN_GPSServiceRequestParameter.MedicareClaimNumber = MedicareClaimNumber; objDOGEN_GPSServiceRequestParameter.LastName = LastName; objDOGEN_GPSServiceRequestParameter.PbpNo = PbpNo; objDOGEN_GPSServiceRequestParameter.TransactionCode = ((long)CMSTransactionCode.TRR76).ToString(); objDOGEN_GPSServiceRequestParameter.LoggedInUserId = LoginUserID; objDOGEN_GPSServiceRequestParameter.ActionLkup = ActionLkup; objGPSServiceGetMethods.CreateCMSTransactionService(objDOGEN_GPSServiceRequestParameter, out errorMessage);//Do CMS Post Transaction } catch (Exception ex) { BLCommon.LogError(LoginUserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.OSTProcessWorkflow, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); throw ex; } }
public JsonResult CheckDuplicateConfigName(string ConfigName) { long? TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; var data = ""; BLConfigurations objBLConfigurations = new BLConfigurations(); List <DOMGR_ConfigMaster> lstDDOMGR_ConfigMaster; DOMGR_ConfigMaster objDOMGR_ConfigMaster = new DOMGR_ConfigMaster(); objDOMGR_ConfigMaster.ConfigName = ConfigName; objDOMGR_ConfigMaster.IsActive = true; string errorMessage = string.Empty; ExceptionTypes result = objBLConfigurations.SearchConfiguration(TimeZone, objDOMGR_ConfigMaster, out lstDDOMGR_ConfigMaster, out errorMessage); if (result != (long)ExceptionTypes.Success) { //Log error BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Configurations, (long)ExceptionTypes.Uncategorized, errorMessage.ToString(), errorMessage.ToString()); } else if (result == ExceptionTypes.ZeroRecords) { lstDDOMGR_ConfigMaster.Add(objDOMGR_ConfigMaster); lstDDOMGR_ConfigMaster = new List <DOMGR_ConfigMaster>(); } int i = lstDDOMGR_ConfigMaster.Count; if (i > 0) { data = "Configuration Name already exists."; } return(Json(new { Data = data }, JsonRequestBehavior.AllowGet)); }
private List <DOGEN_GPSData> GetMemberInfoByHouseHoldID(string gpsHouseholdId, long UserID) { GPSServiceGetMethods objGPSServiceGetMethods = new GPSServiceGetMethods(); DOGEN_GPSServiceRequestParameter objDOGEN_GPSServiceRequestParameter = new DOGEN_GPSServiceRequestParameter(); objDOGEN_GPSServiceRequestParameter.HouseholdId = gpsHouseholdId; List <DOGEN_GPSData> lstDOGEN_GPSData = new List <DOGEN_GPSData>(); string errorMessage = string.Empty; try { objDOGEN_GPSServiceRequestParameter.LoggedInUserId = UserID; objGPSServiceGetMethods.GetMemberEligibilityService(objDOGEN_GPSServiceRequestParameter, out lstDOGEN_GPSData, out errorMessage); if (!errorMessage.IsNullOrEmpty()) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.GPSWebservice, (long)ExceptionTypes.Uncategorized, string.Empty, errorMessage); } return(lstDOGEN_GPSData); } catch (Exception ex) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.GPSWebservice, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); throw ex; } }
private List <DOGEN_GPSData> PPersonSearch(string hICNNumber, long UserID) { string errorMessage = string.Empty; GPSServiceGetMethods objGPSServiceGetMethods = new GPSServiceGetMethods(); DOGEN_GPSServiceRequestParameter objDOGEN_GPSServiceRequestParameter = new DOGEN_GPSServiceRequestParameter(); objDOGEN_GPSServiceRequestParameter.MedicareClaimNumber = hICNNumber; List <DOGEN_GPSData> lstDOGEN_GPSData = new List <DOGEN_GPSData>(); errorMessage = string.Empty; try { objDOGEN_GPSServiceRequestParameter.LoggedInUserId = UserID; objGPSServiceGetMethods.GetMemberDemographicalDetails(objDOGEN_GPSServiceRequestParameter, out lstDOGEN_GPSData, out errorMessage); if (!errorMessage.IsNullOrEmpty()) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.OSTProcessWorkflow, (long)ExceptionTypes.Uncategorized, string.Empty, errorMessage); } return(lstDOGEN_GPSData); } catch (Exception ex) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.OSTProcessWorkflow, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); throw ex; } }
private List <DOCMN_LookupTypeCorrelations> PGetAllLookupTypeCorrelations(string strDescription = "", int ddlLookupType = 0, bool isActive = true) { long?TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; List <DOCMN_LookupTypeCorrelations> lstDOCMN_LookupTypeCorrelations = new List <DOCMN_LookupTypeCorrelations>(); DOCMN_LookupTypeCorrelations objDOCMN_LookupTypeCorrelations = new DOCMN_LookupTypeCorrelations(); string errorMessage = string.Empty; try { objDOCMN_LookupTypeCorrelations.CorrelationDescription = strDescription; objDOCMN_LookupTypeCorrelations.CMN_LookupTypeParentRef = ddlLookupType; objDOCMN_LookupTypeCorrelations.IsActive = isActive; ExceptionTypes result = _objBLLookupCorrelations.GetAllLookupTypeCorrelations(TimeZone, objDOCMN_LookupTypeCorrelations, out lstDOCMN_LookupTypeCorrelations, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.LookupsCorrelation, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } return(lstDOCMN_LookupTypeCorrelations); } catch (Exception ex) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.LookupsCorrelation, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); throw ex; } }
public ActionResult Save(UIDOAccessGroup objUIDOAccessGroup) { string errorMessage = string.Empty; string returnMessage = string.Empty; ExceptionTypes result = new ExceptionTypes(); try { //check if this call is to update record or save new record if (objUIDOAccessGroup.ADM_AccessGroupMasterId > 0) { //if old record is to be updated BLCommon objCommon = new BLCommon(); //check if record is locked by current user if (!objCommon.ValidateLockBeforeSave(currentUser.ADM_UserMasterId, (long)ScreenType.AccessGroup, objUIDOAccessGroup.ADM_AccessGroupMasterId)) { //if record is not locked by current user dont save record and return error. errorMessage = "Record not locked, please reload the page."; result = ExceptionTypes.UnknownError; return(Json(new { ID = result, Message = errorMessage })); } returnMessage = "Record updated successfully."; } else { //If new record to be saved returnMessage = "Record saved successfully."; } objUIDOAccessGroup.lstDOADM_AccessGroupSkillsCorrelation = new List <DOADM_AccessGroupSkillsCorrelation>(); objUIDOAccessGroup.lstDOADM_AccessGroupReportCorrelation = new List <DOADM_AccessGroupReportCorrelation>(); if (Session[ConstantTexts.AccessGroupSkillSessionKey] != null) { objUIDOAccessGroup.lstDOADM_AccessGroupSkillsCorrelation = Session[ConstantTexts.AccessGroupSkillSessionKey] as List <DOADM_AccessGroupSkillsCorrelation>; } if (Session[ConstantTexts.AccessGroupReportSessionKey] != null) { objUIDOAccessGroup.lstDOADM_AccessGroupReportCorrelation = Session[ConstantTexts.AccessGroupReportSessionKey] as List <DOADM_AccessGroupReportCorrelation>; } BLAccessGroup objBLAccessGroup = new BLAccessGroup(); result = objBLAccessGroup.AddEditAccessGroup(currentUser.ADM_UserMasterId, objUIDOAccessGroup, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageAccessGroups, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); return(Json(new { ID = result, Message = "An error occured while updating DB." })); } Session[ConstantTexts.AccessGroupSkillSessionKey] = null; Session[ConstantTexts.AccessGroupReportSessionKey] = null; return(Json(new { ID = result, Message = returnMessage })); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageAccessGroups, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(RedirectToAction("Maintenance", "Error", new { Error = MethodBase.GetCurrentMethod().Name + " Action terminated and redirected to Maintenance. Error:" + ex.ToString() })); } }
/// <summary> /// Fetch ACL Groups from DB and check Logged In User belon to which all ACL groups /// </summary> /// <param name="filterContext">Current context</param> /// <returns>UserPrincipal Object</returns> private List <string> QueryAd(HttpActionContext context) { List <string> userMemberOf = new List <string>(); try { string ntGroup = ConfigurationManager.AppSettings["AdmOSTSID"].ToString(); //BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Exception, "NT Group Sid: "+ ntGroup, ""); string loggedInUserMsid = (HttpContext.Current.User != null && HttpContext.Current.User.Identity != null && !String.IsNullOrEmpty(HttpContext.Current.User.Identity.Name)) ? HttpContext.Current.User.Identity.Name.Replace("MS\\", "") : ""; //BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Exception, "Logged User Id: " + loggedInUserMsid, ""); WindowsIdentity wi = HttpContext.Current.User.Identity as WindowsIdentity; var grp = wi.Groups.ToList(); bool rtnValue = false; rtnValue = grp.Exists(p => p.Value == ntGroup); if (rtnValue) { //BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Exception, "Return Value: " + rtnValue, ""); userMemberOf.Add(ConfigurationManager.AppSettings["MacroRole"]); } //BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Exception, "Return Value: " + rtnValue, ""); } catch (Exception ex) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Exception, ex.InnerException.Message, ""); } return(userMemberOf); }
public ActionResult RPRGetQueue() { BLQueueSummary objBLQueueSummary = new BLQueueSummary(); QueueSummary objQueueSummary; DateTime dtpStartDate = DateTime.UtcNow.AddDays(-90); DateTime dtpEndDate = DateTime.UtcNow; string strErrorMessage; try { ExceptionTypes result = objBLQueueSummary.GetQueueSummary(dtpStartDate, dtpEndDate, (long)currentUser.BusinessSegmentLkup, (long)DiscripancyCategory.RPR, out objQueueSummary, out strErrorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.RPRGetQueue, (long)ExceptionTypes.Uncategorized, strErrorMessage, strErrorMessage); } objQueueSummary.lstUserAccessQueueLkups = currentUser.UserQueueList.Select(item => item.QueueLkp).Distinct().ToList(); objQueueSummary.StartDate = dtpStartDate; objQueueSummary.EndDate = dtpEndDate; objQueueSummary.BusinessSegment = currentUser.BusinessSegmentLkup; ViewBag.ReportUrl = GetReportUrl(); return(View(objQueueSummary)); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.RPRGetQueue, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); return(RedirectToAction("Maintenance", "Error", new { Error = ex.ToString() })); } }
public ActionResult ValidateLookupMaster(long lookupTypeId, long lookupMasterID = 0, string lookupMasterValue = "", int priority = 0) { try { CacheUtility.ClearCache(ConstantTexts.LookupMasterCacheKey); List <DOCMN_LookupMaster> lstDOCMN_LookupMaster = new List <DOCMN_LookupMaster>(); lstDOCMN_LookupMaster = CacheUtility.GetAllLookupsFromCache(lookupTypeId); if (lstDOCMN_LookupMaster.Where(xx => xx.LookupValue.ToUpper() == lookupMasterValue.ToUpper() && xx.CMN_LookupMasterId != lookupMasterID).Count() > 0) { return(Json(new { ID = 1, Message = "Lookup value already exists." })); } else if (lstDOCMN_LookupMaster.Where(xx => xx.DisplayOrder == priority && xx.CMN_LookupMasterId != lookupMasterID).Count() > 0) { return(Json(new { ID = 1, Message = "Priority value already exists." })); } return(Json(new { ID = 0, Message = "" })); } catch (Exception ex) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Lookups, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(Json(new { ID = 1, Message = "An error occured while validating" })); } }
private List <DOADM_ResourceDetails> PGetResource(string strName = "", string strDescription = "", string strLinkLocation = "", bool bolIsActive = true) { long?TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; //temporary object for search resource function DOADM_ResourceDetails objDOADM_ResourceDetails = new DOADM_ResourceDetails(); objDOADM_ResourceDetails.IsActive = bolIsActive; objDOADM_ResourceDetails.ResourceName = strName; objDOADM_ResourceDetails.ResourceDescription = strDescription; objDOADM_ResourceDetails.ResourceLinkLocation = strLinkLocation; objDOADM_ResourceDetails.ConsiderDates = false; List <DOADM_ResourceDetails> lstDOADM_ResourceDetails; string errorMessage = string.Empty; ExceptionTypes result = _objBLResources.SearchResources(TimeZone, objDOADM_ResourceDetails, out lstDOADM_ResourceDetails, out errorMessage); //check result for DB action if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Resources, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } else if (result == ExceptionTypes.ZeroRecords) { lstDOADM_ResourceDetails = new List <DOADM_ResourceDetails>(); } return(lstDOADM_ResourceDetails); }
public ActionResult Search(string strMSID = "", string strEmail = "", string strFullname = "", bool bIsActive = true) { try { DOADM_UserMaster objDOADM_UserMaster = new DOADM_UserMaster(); List <DOADM_UserMaster> lstDOADM_UserMaster = new List <DOADM_UserMaster>(); string strErrorMessage = string.Empty; objDOADM_UserMaster.MSID = strMSID; objDOADM_UserMaster.Email = strEmail; objDOADM_UserMaster.FullName = strFullname; objDOADM_UserMaster.IsActive = bIsActive; long?TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; lstDOADM_UserMaster = GetUserSearchResult(TimeZone, objDOADM_UserMaster, out strErrorMessage); if (strErrorMessage != "") { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageUsers, (long)ExceptionTypes.Uncategorized, string.Empty, "error occred while retriving search results"); lstDOADM_UserMaster = new List <DOADM_UserMaster>(); } return(PartialView("_SearchResults", lstDOADM_UserMaster)); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageUsers, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(RedirectToAction("Maintenance", "Error", new { Error = MethodBase.GetCurrentMethod().Name + " Action terminated and redirected to Maintenance. Error:" + ex.ToString() })); } }
public ActionResult GetUserDetailsLdap(string data) { ExceptionTypes result = new ExceptionTypes(); string returnMessage = string.Empty; try { DOADM_UserMaster user = null; bool isUserFound = GetUserDetails(data, true, out user); if (!isUserFound) { isUserFound = GetUserDetails(data, false, out user); } if (isUserFound) { result = ExceptionTypes.Success; } else { result = ExceptionTypes.Exception; returnMessage = "User not found in Active directory."; } return(Json(new { ID = result, Message = returnMessage, data = user })); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageUsers, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(RedirectToAction("Maintenance", "Error", new { Error = MethodBase.GetCurrentMethod().Name + " Action terminated and redirected to Maintenance. Error:" + ex.ToString() })); } }
private List <DOADM_AlertDetails> PGetAlerts(string strTitle = "", string strDescription = "", bool bolIsActive = true) { long?TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; //temporary object for search alert function DOADM_AlertDetails objDOADM_AlertDetails = new DOADM_AlertDetails(); objDOADM_AlertDetails.IsActive = bolIsActive; objDOADM_AlertDetails.AlertTitle = strTitle; objDOADM_AlertDetails.AlertDescription = strDescription; objDOADM_AlertDetails.ConsiderDates = false; List <DOADM_AlertDetails> lstDOADM_AlertDetails; List <DORPT_ReportsMaster> lstDORPT_ReportsMaster; string errorMessage = string.Empty; ExceptionTypes result = _objBLAlerts.SearchAlerts(TimeZone, objDOADM_AlertDetails, out lstDOADM_AlertDetails, out errorMessage); ExceptionTypes resultReports = _objBLReports.GetAllReports((long)ReportId.AlertsHistoryReport, string.Empty, out lstDORPT_ReportsMaster, out errorMessage); //check result for DB action if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Alerts, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } else if (result == ExceptionTypes.ZeroRecords) { lstDOADM_AlertDetails = new List <DOADM_AlertDetails>(); } objDOADM_AlertDetails.lstReports = lstDORPT_ReportsMaster; return(lstDOADM_AlertDetails); }
public ActionResult Reports() { try { var businessSegment = currentUser.BusinessSegmentLkup; var role = currentUser.RoleLkup; var workBasket = currentUser.WorkBasketLkup; var selectacc = currentUser.UserReports.Where(x => x.RoleLkup.Equals(role) && x.WorkBasketLkup.Equals(workBasket)).ToList(); var user = currentUser; BLReports objBLReports = new BLReports(); string errorMessage = string.Empty; List <DORPT_ReportsMaster> reports = new List <DORPT_ReportsMaster>(); List <DORPT_ReportsMaster> finalReports = new List <DORPT_ReportsMaster>(); ExceptionTypes result = objBLReports.GetAllReports(0, null, out reports, out errorMessage); reports = reports.Where(x => x.ViewInUI == true).ToList(); ViewBag.BusinessSegment = currentUser.BusinessSegmentLkup; finalReports = (from r in reports join s in selectacc.ToList() on r.RPT_ReportsMasterId equals s.RPT_ReportsMasterId select r).Distinct().OrderBy(x => x.ReportName).ToList(); return(View(finalReports)); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Reports, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(RedirectToAction("Maintenance", "Error", new { Error = MethodBase.GetCurrentMethod().Name + " Action terminated and redirected to Maintenance. Error:" + ex.ToString() })); } }
/// <summary> /// Get Ers Case those are Ready For SendOOALetter /// </summary> /// <returns></returns> private bool GetGenQueueForSendOOALetter(StringBuilder strGEN_QueueIdsToSkip, out DOGEN_Queue objDOGEN_Queue, out string errorMessage) { objDOGEN_Queue = null; bool isSuccess = false; errorMessage = string.Empty; ExceptionTypes result = new ExceptionTypes(); try { result = objOST.GetQueueSendOOALetter(strGEN_QueueIdsToSkip, out objDOGEN_Queue, out errorMessage); if (result != ExceptionTypes.Success) { if (result != ExceptionTypes.ZeroRecords) { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPSendOOALetter, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } return(false); } isSuccess = true; } catch (Exception ex) { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPSendOOALetter, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.ToString()); throw ex; } return(isSuccess); }
public ActionResult SaveCorrelationMaster(DOCMN_LookupMasterCorrelationsExtended objDOCMN_LookupMasterCorrelationsExtended) { errorMessage = string.Empty; ExceptionTypes result = new ExceptionTypes(); long loginUserId = currentUser.ADM_UserMasterId; string returnMessage = string.Empty; try { if (objDOCMN_LookupMasterCorrelationsExtended.objDOCMN_LookupMasterCorrelations.CMN_LookupMasterCorrelationsId > 0) { objDOCMN_LookupMasterCorrelationsExtended.objDOCMN_LookupMasterCorrelations.LastUpdatedByRef = loginUserId; returnMessage = "Record updated successfully."; } else { objDOCMN_LookupMasterCorrelationsExtended.objDOCMN_LookupMasterCorrelations.CreatedByRef = loginUserId; returnMessage = "Record saved successfully."; } result = _objBLLookupCorrelations.SaveCorrelationMaster(objDOCMN_LookupMasterCorrelationsExtended, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.LookupsCorrelation, (long)ExceptionTypes.Uncategorized, string.Empty, errorMessage); return(Json(new { ID = result, Message = "An error occured." })); } return(Json(new { ID = result, Message = returnMessage })); } catch (Exception ex) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.LookupsCorrelation, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(Json(new { ID = result, Message = "An error occured." })); } }
/// <summary> /// Check If DisenrollmentDate And GPS HouseHoldId is there Or Not for particular ERS CaseID /// </summary> /// <returns></returns> private bool ValidateBeforeSendLetterRequest(DOGEN_Queue objDOGEN_Queue, out string errorMessage) { errorMessage = string.Empty; bool isSuccess = false; try { if (objDOGEN_Queue.DisenrollmentDate.IsNull() || objDOGEN_Queue.GPSHouseholdID.IsNull()) { if (objDOGEN_Queue.DisenrollmentDate.IsNull()) { errorMessage = "DisenrollmentId for ERS Case Id " + objDOGEN_Queue.GEN_QueueId + " is missing From BGP."; } if (objDOGEN_Queue.GPSHouseholdID.IsNull()) { errorMessage = "GPSHousehold ID for ERS Case Id " + objDOGEN_Queue.GEN_QueueId + " is Missing From BGP."; } return(isSuccess); } isSuccess = true; } catch (Exception ex) { BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPSendOOALetter, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.ToString()); throw ex; } return(isSuccess); }
/// <summary> /// Used to handle excpetion /// </summary> /// <param name="filterContext"></param> public override void OnException(ExceptionContext filterContext) { try { var controlName = filterContext.RouteData.Values["controller"]; var action = filterContext.RouteData.Values["action"]; string exMessage = filterContext.Exception.InnerException.Message; string userId = filterContext.HttpContext.User.Identity.Name.ToString(); if (userId != "" && userId != string.Empty) { BLCommon.LogError(0, controlName + "/" + action, (long)ErrorModuleName.ErrorHandler, (long)ExceptionTypes.Uncategorized, exMessage, ""); } else { //If User id not avaliable we will insert MSID BLCommon.LogError(0, controlName + "/" + action, (long)ErrorModuleName.ErrorHandler, (long)ExceptionTypes.Uncategorized, exMessage, ""); } base.OnException(filterContext); } catch (Exception ex) { BLCommon.LogError(0, MethodBase.GetCurrentMethod().ToString(), (long)ErrorModuleName.ErrorHandler, (long)ExceptionTypes.Uncategorized, ex.InnerException.Message, ""); } }
/// <summary> /// Download template based on template ID /// </summary> /// <param name="templateMasterId"></param> /// <returns></returns> public FileResult DownloadTemplate(long templateMasterId) { byte[] fileBytes = null; string fileName = string.Empty; List <DOGEN_BulkImportExcelTemplateMaster> lstDOGEN_BulkImportExcelTemplateMaster = new List <DOGEN_BulkImportExcelTemplateMaster>(); try { lstDOGEN_BulkImportExcelTemplateMaster = CacheUtility.GetBulkImportExcelTemplateFromCache().lstDOGEN_BulkImportExcelTemplateMaster; if (lstDOGEN_BulkImportExcelTemplateMaster.Where(xx => xx.GEN_BulkImportExcelTemplateMasterId == templateMasterId && xx.IsActive == true).Count() > 0) { var item = lstDOGEN_BulkImportExcelTemplateMaster.Where(xx => xx.GEN_BulkImportExcelTemplateMasterId == templateMasterId && xx.IsActive == true).FirstOrDefault(); fileBytes = System.IO.File.ReadAllBytes(item.ExcelDirectoryPath + item.ExcelTemplateName); fileName = item.ExcelTemplateName; } return(File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName)); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); throw; } }
private List <DOADM_AccessGroupMaster> GetAccessGroupSearchResult(string AccessGroupName = "", string AccessGroupDescription = "", bool IsActive = true) { long? TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; BLAccessGroup objBLAccessGroup = new BLAccessGroup(); DOADM_AccessGroupMaster objDOADM_AccessGroupMaster = new DOADM_AccessGroupMaster(); objDOADM_AccessGroupMaster.AccessGroupName = AccessGroupName; objDOADM_AccessGroupMaster.AccessGroupDescription = AccessGroupDescription; objDOADM_AccessGroupMaster.IsActive = IsActive; List <DOADM_AccessGroupMaster> lstDOADM_AccessGroupMaster = new List <DOADM_AccessGroupMaster>(); try { ExceptionTypes result = objBLAccessGroup.GetAccessGroupBasedOnSearch(TimeZone, objDOADM_AccessGroupMaster, out lstDOADM_AccessGroupMaster); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageAccessGroups, (long)ExceptionTypes.Uncategorized, string.Empty, "error while retriving search results"); } return(lstDOADM_AccessGroupMaster); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageAccessGroups, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(null); } }
private UIBulkUploadSearch PLoadBulkUpload() { long?TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; UIBulkUploadSearch objUIBulkUploadSearch = new UIBulkUploadSearch(); List <DOGEN_BulkImport> lstDOGEN_BulkImport = new List <DOGEN_BulkImport>(); errorMessage = string.Empty; try { long workBasketLkp = currentUser.WorkBasketLkup.ToInt64(); objUIBulkUploadSearch.WorkbasketLkup = workBasketLkp; objUIBulkUploadSearch.lstWorkbasket = CacheUtility.GetAllLookupsFromCache(LookupTypes.WorkBasket.ToInt64()); objUIBulkUploadSearch.lstDiscCategary = CacheUtility.GetAllLookupMasterCorrelationFromCache((long)LookupTypesCorrelation.WorkBasketVsDiscripancyCategory, workBasketLkp); objUIBulkUploadSearch.lstDOGEN_BulkImportExcelTemplateMaster = CacheUtility.GetBulkImportExcelTemplateFromCache().lstDOGEN_BulkImportExcelTemplateMaster.Where(x => x.TemplateTypeLkup == TemplateType.BulkUpload.ToInt64()).ToList(); objUIBulkUploadSearch.TemplateTypeLkup = TemplateType.BulkUpload.ToLong(); ExceptionTypes result = _objBLBulkUpload.GetBulkUploadSearchResult(TimeZone, objUIBulkUploadSearch, out lstDOGEN_BulkImport, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); } objUIBulkUploadSearch.lstDOGEN_BulkImport = lstDOGEN_BulkImport; return(objUIBulkUploadSearch); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); throw ex; } }
private DOGEN_GPSData GetEmployerSummaryDetails(string gpsHouseholdId, long UserID) { GPSServiceGetMethods objGPSServiceGetMethods = new GPSServiceGetMethods(); DOGEN_GPSServiceRequestParameter objDOGEN_GPSServiceRequestParameter = new DOGEN_GPSServiceRequestParameter(); objDOGEN_GPSServiceRequestParameter.HouseholdId = gpsHouseholdId; DOGEN_GPSData objDOGEN_GPSData = new DOGEN_GPSData(); string errorMessage = string.Empty; try { objDOGEN_GPSServiceRequestParameter.LoggedInUserId = UserID; objGPSServiceGetMethods.GetEmployerSummary(objDOGEN_GPSServiceRequestParameter, out objDOGEN_GPSData, out errorMessage); if (!errorMessage.IsNullOrEmpty()) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.GPSWebservice, (long)ExceptionTypes.Uncategorized, string.Empty, errorMessage); } return(objDOGEN_GPSData); } catch (Exception ex) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.GPSWebservice, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); throw ex; } }
private bool SaveFileToTempFolder(HttpPostedFileBase file, out string tempFilePath) { bool isUploadSuccess = false; try { tempFilePath = string.Empty; string webServerTempPath = CacheUtility.GetMasterConfigurationByName(ConstantTexts.webServerTempPath); //path tempFilePath = Path.Combine(webServerTempPath, DateTime.Now.ToString("yyyyMMddHHmmss_") + Path.GetFileName(file.FileName)); if (!Directory.Exists(webServerTempPath)) { Directory.CreateDirectory(webServerTempPath); } file.SaveAs(tempFilePath); isUploadSuccess = true; } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); isUploadSuccess = false; throw ex; } return(isUploadSuccess); }
public DOGEN_Queue PGetTRRData(string IndividualID, long UserID) { string errorMessage = string.Empty; GPSServiceGetMethods objGPSServiceGetMethods = new GPSServiceGetMethods(); DOGEN_GPSServiceRequestParameter objDOGEN_GPSServiceRequestParameter = new DOGEN_GPSServiceRequestParameter(); DOGEN_GPSData objDOGEN_GPSData = new DOGEN_GPSData(); DOGEN_Queue objDOGEN_Queue = new DOGEN_Queue(); try { objDOGEN_GPSServiceRequestParameter.IndividualId = IndividualID; objDOGEN_GPSServiceRequestParameter.LoggedInUserId = UserID; //web service call for TRR data objGPSServiceGetMethods.GetTRRSummaryInfoService(objDOGEN_GPSServiceRequestParameter, ref objDOGEN_Queue, out errorMessage); if (!errorMessage.IsNullOrEmpty()) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Common, (long)ExceptionTypes.Uncategorized, string.Empty, errorMessage); } } catch (Exception ex) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Common, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); } return(objDOGEN_Queue); }
/// <summary> /// it will save the file to actual path /// </summary> /// <param name="filePath"></param> /// <param name="newFilePath"></param> /// <returns></returns> private bool SaveFileToActualFolder(string filePath, out string newFilePath) { bool isScucess = false; string basePath = string.Empty; try { newFilePath = CacheUtility.GetMasterConfigurationByName(ConstantTexts.BulkUploadFilePath); FileInfo fi = new FileInfo(filePath); basePath = newFilePath + DateTime.Now.Year + "\\" + DateTime.Now.Month + "\\" + DateTime.Now.Day; newFilePath = basePath + "\\" + fi.Name; if (!Directory.Exists(basePath)) { Directory.CreateDirectory(basePath); } fi.MoveTo(newFilePath); isScucess = true; } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); throw ex; } return(isScucess); }
public HttpResponseMessage GetEmployerSummary(string HouseHoldID, long UserID) { HttpResponseMessage responseMessage = new HttpResponseMessage(); DOGEN_AEGPSServiceTrace objDOGEN_AEGPSServiceTrace = new DOGEN_AEGPSServiceTrace(); HttpContextBase abstractContext = new HttpContextWrapper(System.Web.HttpContext.Current); var url = abstractContext.Request.Url; DOGEN_GPSData objDOGEN_GPSData = new DOGEN_GPSData(); try { objDOGEN_GPSData = GetEmployerSummaryDetails(HouseHoldID, UserID); var output = JsonConvert.SerializeObject(objDOGEN_GPSData); //var responseData = new { IsSuccess = true, Message = "", data = lstDOGEN_GPSData }; var responseData = output; objDOGEN_AEGPSServiceTrace.ResponseData = responseData; responseMessage = Request.CreateResponse(HttpStatusCode.OK, responseData, Configuration.Formatters.JsonFormatter); } catch (Exception ex) { BLCommon.LogError(UserID, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.EligibilityCreateSuspectCase, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message); throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); } objDOGEN_AEGPSServiceTrace.CreatedByRef = UserID; objDOGEN_AEGPSServiceTrace.RequestData = url.ToString(); objDOGEN_AEGPSServiceTrace.WebServiceMethodName = MethodBase.GetCurrentMethod().Name; objDOGEN_AEGPSServiceTrace.WebServiceMethodLkup = (long)WebserviceMethod.GetEmployerSummary; objDOGEN_AEGPSServiceTrace.StatusLkup = (long)WebserviceStatus.Success; TraceWebApi(objDOGEN_AEGPSServiceTrace); return(responseMessage); }
/// <summary> /// make entry to database /// </summary> /// <param name="oldFileName"></param> /// <param name="newFileName"></param> /// <param name="filePath"></param> /// <param name="workbasketId"></param> /// <param name="discripanctCatgoryLkup"></param> /// <param name="templateId"></param> /// <param name="errorMessage"></param> /// <returns></returns> private bool SaveToDB(string oldFileName, string newFileName, string filePath, long workbasketId, long discripanctCatgoryLkup, long templateId, out string errorMessage) { bool isScuess = false; DOGEN_BulkImport objDOGEN_BulkImport = new DOGEN_BulkImport(); errorMessage = string.Empty; try { long loginUserID = currentUser.ADM_UserMasterId; objDOGEN_BulkImport.WorkBasketLkup = workbasketId; objDOGEN_BulkImport.DiscrepancyCategoryLkup = discripanctCatgoryLkup; objDOGEN_BulkImport.GEN_BulkImportExcelTemplateMasterRef = templateId; objDOGEN_BulkImport.ExcelFileName = oldFileName; objDOGEN_BulkImport.DuplicateFileName = newFileName; objDOGEN_BulkImport.ExcelFilelPath = filePath; objDOGEN_BulkImport.ImportStatusLkup = (long)ImportStatus.ReadyForImport; objDOGEN_BulkImport.IsActive = true; ExceptionTypes result = _objBLBulkUpload.SaveBulkUpload(objDOGEN_BulkImport, loginUserID, out errorMessage); if (result == ExceptionTypes.Success) { isScuess = true; } } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BulkUpload, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); throw ex; } return(isScuess); }
public ActionResult SaveUserPreference(DOADM_UserPreference objUserPreference) { try { string errorMessage = string.Empty; ExceptionTypes result = new ExceptionTypes(); objUserPreference.ADM_UserMasterRef = currentUser.ADM_UserMasterId; BLUserAdministration objUserAdministration = new BLUserAdministration(); result = objUserAdministration.SaveUserPreference(objUserPreference, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.UserPreference, (long)ExceptionTypes.Uncategorized, "An error occured while saving userpreference.", "An error occured while saving userpreference."); return(Json(new { ID = result, Message = "An error occured while saving." })); } if (currentUser != null) { currentUser.ADM_UserPreference = objUserPreference; System.Web.HttpContext.Current.Session[ConstantTexts.CurrentUserSessionKey] = currentUser; } string returnMessage = "User Preferences Saved Successfully."; return(Json(new { ID = 0, Message = returnMessage })); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.UserPreference, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(RedirectToAction("Maintenance", "Error", new { Error = MethodBase.GetCurrentMethod().Name + " Action terminated and redirected to Maintenance. Error:" + ex.ToString() })); } }
private void GetSkillForEdit(long lSkillsID, bool isActive, out DOADM_SkillsMaster objDOADM_SkillsMaster) { long? TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; string errorMessage = string.Empty; ExceptionTypes result; List <DOADM_SkillsMaster> lstDOADM_SkillsMaster = new List <DOADM_SkillsMaster>(); objDOADM_SkillsMaster = new DOADM_SkillsMaster(); try { objDOADM_SkillsMaster.ADM_SkillsMasterId = lSkillsID; objDOADM_SkillsMaster.IsActive = isActive; result = _objBLSkills.SearchSkills(TimeZone, objDOADM_SkillsMaster, out lstDOADM_SkillsMaster, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageSkills, (long)ExceptionTypes.Uncategorized, "error occured while retrving skill data", "error occured while retrving skill data"); } if (lstDOADM_SkillsMaster.Count > 0) { objDOADM_SkillsMaster = lstDOADM_SkillsMaster.FirstOrDefault(); } } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageSkills, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.ToString()); } }