/// <summary> /// Kodun patladığı yeri formatlamak için /// </summary> /// <param name="methodbase">Çağıran metod bilgisi. </param> /// <param name="errorDesc">Hata için bizim açıklamamız</param> /// <param name="ex">Hata sınıfı</param> /// <param name="exType">Hata tipi</param> /// <returns>Geriye formatlanmış hatayı döner</returns> public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType) { //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan //eklenebilir veya formatlanabilir. string formattedException = string.Format(@"<div style='margin-left:30px; border:1px solid black;background:yellow;color:red;'><br /> [ ,<br /><b>Sınıf:</b> {0} <br /> <b>Metod:</b> {1} <br /> <b>Exception Type:</b> {2} <br /> <b>Our Details:</b> {3}<br />]<br /><div>", methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc); return formattedException; }
/// <summary> /// Kodun patladığı yeri formatlamak için /// </summary> /// <param name="methodbase">Çağıran metod bilgisi. </param> /// <param name="errorDesc">Hata için bizim açıklamamız</param> /// <param name="ex">Hata sınıfı</param> /// <param name="exType">Hata tipi</param> /// <returns>Geriye formatlanmış hatayı döner</returns> public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType) { //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan //eklenebilir veya formatlanabilir. string formattedException = string.Format(@" Sınıf: {0} ,\n Metod: {1} ,\n Exception Type: {2} ,\n Our Details: {3}", methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc); return formattedException; }
public PortException(ExceptionTypes type, string message) : base(message) { ErrorType = type; }
internal TrustNotGrantedException(ExceptionTypes exceptionType, string message) : base(exceptionType, message) { }
public ActionResult CreateRPRCase(string memberFName = "", string memberLName = "", string memberDOB = "", string hICN = "", string mIIMReferenceId = "") { ViewBag.PageName = ConstantTexts.MiimPageName; try { string requestData = "memberFName : " + memberFName + ",memberLName : " + memberLName + ",memberDOB : " + memberDOB + ",string hICN : " + hICN + ",string mIIMReferenceId : " + mIIMReferenceId; MIIMServiceLog(MethodBase.GetCurrentMethod().Name, requestData, ConstantTexts.MIIMNew, _currentLoginUserId, TarceMethodLkup.New.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); #region Create Session ExceptionTypes result = CreateSession(WorkBasket.RPR); #endregion if (result == ExceptionTypes.Success) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, requestData, ConstantTexts.MIIMUserAuthSucc, _currentLoginUserId, TarceMethodLkup.InProgress.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); DOGEN_Queue objDOGEN_Queue = new DOGEN_Queue(); #region Dropdowns Binding List <DOADM_UserMaster> lstUsers; DOADM_UserMaster objDOADM_UserMaster = new DOADM_UserMaster(); objDOADM_UserMaster.IsActive = true; BLUserAdministration objBLUserAdministration = new BLUserAdministration(); long?TimeZone = (long)DefaultTimeZone.CentralStandardTime; result = objBLUserAdministration.SearchUser(TimeZone, objDOADM_UserMaster, out lstUsers, out string errorMessage); objDOGEN_Queue.ComplianceStartDate = DateTime.UtcNow; objDOGEN_Queue.DiscrepancyStartDate = objDOGEN_Queue.ComplianceStartDate.Value.AddMonths(1); objDOGEN_Queue.DiscrepancyStartDate = new DateTime(objDOGEN_Queue.DiscrepancyStartDate.Value.Year, objDOGEN_Queue.DiscrepancyStartDate.Value.Month, 1); objDOGEN_Queue.lstUsers = lstUsers.Where(x => x.ADM_UserMasterId > 1000 && x.IsManager).OrderBy(x => x.Email).ToList();//Filtered 1st three Users as Admin.sort list by email id objDOGEN_Queue.lstLob = CacheUtility.GetAllLookupsFromCache((long)LookupTypes.LOB); objDOGEN_Queue.lstDiscCategary = CacheUtility.GetAllLookupMasterCorrelationFromCache((long)LookupTypesCorrelation.WorkBasketVsDiscripancyCategory, (long)WorkBasket.RPR); objDOGEN_Queue.lstContractid = CacheUtility.GetAllLookupsFromCache((long)LookupTypes.Contract); objDOGEN_Queue.lstPbpid = CacheUtility.GetAllLookupsFromCache((long)LookupTypes.PBPID); objDOGEN_Queue.lstActionRequested = CacheUtility.GetAllLookupsFromCache((long)LookupTypes.RPRActionRequested); objDOGEN_Queue.lstTaskBeingPerformed = CacheUtility.GetAllLookupsFromCache((long)LookupTypes.Taskbeingperformedwhenthisdiscrepancywasidentified); objDOGEN_Queue.lstDiscType = CacheUtility.GetAllLookupMasterCorrelationFromCache((long)LookupTypesCorrelation.DiscripancyCategoryVsDiscripancyType, (long)DiscripancyCategory.RPR); #endregion objDOGEN_Queue.MemberFirstName = memberFName; objDOGEN_Queue.MemberLastName = memberLName; objDOGEN_Queue.MIIMReferenceId = mIIMReferenceId; bool isDobCorrect = DateTime.TryParse(memberDOB, out DateTime dtMemberDob); if (isDobCorrect) { objDOGEN_Queue.MemberDOB = dtMemberDob.AddDays(1); } objDOGEN_Queue.MemberCurrentHICN = hICN; MIIMServiceLog(MethodBase.GetCurrentMethod().Name, requestData, ConstantTexts.MIIMRequestCompleted, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); return(View("~/Views/RPR/Create.cshtml", objDOGEN_Queue)); } else if (result == ExceptionTypes.UnknownError) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, requestData, ConstantTexts.MIIMUserAuthFail, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); ViewBag.ErrorMessage = "\nYou are not part of ERS DB.\nPlease contact administrator"; return(View("~/Views/Shared/Error.cshtml")); } else { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, requestData, ConstantTexts.MIIMUserAuthFail, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); ViewBag.ErrorMessage = "\nYou do not have permission to access this page.\nPlease contact administrator"; return(View("~/Views/Shared/Error.cshtml")); } } catch (Exception ex) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, "", ex.ToString(), _currentLoginUserId, TarceMethodLkup.Failed.ToLong(), (long)MIIMServiceMethod.CreateRPRCase); BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.Message); return(View("~/Views/Shared/Error.cshtml")); } }
private ExceptionTypes CreateSession(WorkBasket objWorkBasket) { ExceptionTypes result = ExceptionTypes.UnauthorizedAccessException; string[] strLoginName = System.Web.HttpContext.Current.User.Identity.Name.Split(new string[] { @"\" }, StringSplitOptions.RemoveEmptyEntries); string domain = strLoginName[0]; string loginName = strLoginName[1]; string errorMessage = string.Empty; try { if (IsUserInADGroup()) { if (Session[ConstantTexts.CurrentUserSessionKey] == null) { BLUserAdministration objBLUserAdministration = new BLUserAdministration(); UserAdminstrationController objUserAdminstrationController = new UserAdminstrationController(); //check user access result = objBLUserAdministration.GetUserAccessPermission(loginName, null, null, null, out UIUserLogin loggedInUser); if (result == ExceptionTypes.ZeroRecords) { //insert new User to DB, get details from LDAP bool isUserFound = objUserAdminstrationController.GetUserDetails(loginName, true, out DOADM_UserMaster objDOADM_UserMaster); if (isUserFound) { objDOADM_UserMaster.CreatedByRef = _currentLoginUserId; objDOADM_UserMaster.MSID = loginName; objDOADM_UserMaster.StartDate = DateTime.UtcNow.AddYears(-1); objDOADM_UserMaster.EndDate = DateTime.UtcNow.AddYears(30); objDOADM_UserMaster.lstDOADM_AccessGroupUserCorrelation = new List <DOADM_AccessGroupUserCorrelation>(); //AddAccessGroups(objDOADM_UserMaster); result = objBLUserAdministration.SaveUser(objDOADM_UserMaster, out errorMessage); } else { //user details not found in LDAP MIIMServiceLog(MethodBase.GetCurrentMethod().Name, "", "Session Creation failed for new User. LDAP details not found", _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, "Session Creartion failed, LDAP Details not found", "CREATE session failed"); return(ExceptionTypes.UnknownError); } result = objBLUserAdministration.GetUserAccessPermission(loginName, null, null, null, out loggedInUser); } else if (result != ExceptionTypes.Success) { BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, string.Empty, "Error while fetching logged in user data"); return(result); } // Not adding access groups to MIIM user, so they should not be able to access ERS web application. //adding access groups if no access groups assigned //if (loggedInUser.UserSkills == null || loggedInUser.UserSkills.Count <= 0) //{ // DOADM_UserMaster objDOADM_UserMaster = new DOADM_UserMaster(); // objDOADM_UserMaster.IsActive = true; // objDOADM_UserMaster.MSID = loginName; // objDOADM_UserMaster = objUserAdminstrationController.GetUserSearchResult(objDOADM_UserMaster, out errorMessage).FirstOrDefault(); // AddAccessGroups(objDOADM_UserMaster); // objBLUserAdministration.SaveUser(objDOADM_UserMaster, out errorMessage); //} _currentLoginUserId = loggedInUser.ADM_UserMasterId; loggedInUser.WorkBasketLkup = (long)objWorkBasket; loggedInUser.BusinessSegmentLkup = (long)BusinessSegment.MNR; loggedInUser.RoleLkup = (long)RoleLkup.Processor; //login user result = objBLUserAdministration.LoginUser(loginName); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, string.Empty, "Error while fetching logged in user data"); } //create session Session[ConstantTexts.CurrentUserSessionKey] = loggedInUser; return(ExceptionTypes.Success); } else { UIUserLogin loggedInUser = (UIUserLogin)Session[ConstantTexts.CurrentUserSessionKey]; _currentLoginUserId = loggedInUser.ADM_UserMasterId; //pick current user object and check access group is assigned //check user has access to AD group return(ExceptionTypes.Success); } } else { return(ExceptionTypes.UnauthorizedAccessException); } } catch (Exception ex) { BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.Message); return(ExceptionTypes.UnknownError); } }
public void StartProcess(long processType, string errorMessage) { errorMessage = string.Empty; try { UIUserLogin userLoginDetails; ExceptionTypes retValue = _objCommon.GetCurrentMachineUserId(Environment.MachineName, out userLoginDetails, out errorMessage); //ExceptionTypes retValue = ExceptionTypes.Success; Console.WriteLine("Trying Background Process : " + processType + " With user Id " + userLoginDetails.ADM_UserMasterId); if (retValue != ExceptionTypes.Success || !string.IsNullOrEmpty(errorMessage)) { BLCommon.LogError(2, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BackgroundProcess, (long)ExceptionTypes.Uncategorized, "Not able to get running user/server id.", errorMessage); return; } CurrentMasterUserId = userLoginDetails.ADM_UserMasterId; FDRSubmission objFDRSubmmision; FDRResponseProcessing objFDRUpload; MoveQueue objMoveQueue; switch (processType) { case (long)BackgroundProcessType.FDRSubmissionCat2: objFDRSubmmision = new FDRSubmission(); objFDRSubmmision.CreateCategory2Submission(); break; case (long)BackgroundProcessType.FDRSubmissionCat2CTM: objFDRSubmmision = new FDRSubmission(); objFDRSubmmision.CreateCategory2CTMSubmission(); break; case (long)BackgroundProcessType.FDRSubmissionCat3: objFDRSubmmision = new FDRSubmission(); objFDRSubmmision.CreateCategory3Submission(); break; case (long)BackgroundProcessType.FDRResubmission: objFDRSubmmision = new FDRSubmission(); objFDRSubmmision.CreateReSubmission(); break; case (long)BackgroundProcessType.FDRResponseProcessing: objFDRUpload = new FDRResponseProcessing(); objFDRUpload.StartFDRResponseProcessing(); break; case (long)BackgroundProcessType.FDRSubmissionSCC: objFDRSubmmision = new FDRSubmission(); objFDRSubmmision.CreateSCCFDRSubmission(); break; case (long)BackgroundProcessType.SendOOALetter: SendOOALetter objSendOOALetter = new SendOOALetter(); objSendOOALetter.ProcessOOALetter(); break; case (long)BackgroundProcessType.MQReadQueuesandTopics: MQReadQueuesandTopics objMQReadQueuesandTopics = new MQReadQueuesandTopics(); BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Starting Process - Set Current Batch Status", "Logger for debug"); objMQReadQueuesandTopics.SetCurrentBatchStatus(); BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Starting Process - GET MQ Messages", "Logger for debug"); long savedMessagesBGP = objMQReadQueuesandTopics.GetMQMessages(); //long savedMessagesBGP = objMQReadQueuesandTopics.TestQueueParseAndSave(); BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Starting Process - Update Case details", "Logger for debug"); objMQReadQueuesandTopics.UpdatCaseDetails(savedMessagesBGP); BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Completed Process.", "Logger for debug"); objMQReadQueuesandTopics.SetCurrentBatchStatus(); break; case 7777777: MaskPhiData objMaskPhiData = new MaskPhiData(); objMaskPhiData.MaskPHIData(); //objMaskPhiData.updateMBIforHICN(); break; case (long)BackgroundProcessType.CreateCMSTransaction: CreateCMSTransaction objCreateCMSTransaction = new CreateCMSTransaction(); objCreateCMSTransaction.ProcessCMSTransaction(); break; case (long)BackgroundProcessType.PendFTTToAddScrub: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessPendFTTToAddScrub(); break; case (long)BackgroundProcessType.PendFTTToMARxAdd: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessPendFTTToMARxAdd(); break; case (long)BackgroundProcessType.PendFTTToOpenDisEnroll: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessPendFTTToOpenDisEnroll(); break; case (long)BackgroundProcessType.PendNOTToOpenNOT: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessPendNOTToOpenNOT(); break; case (long)BackgroundProcessType.AutoUnlockRecords: objMoveQueue = new MoveQueue(); objMoveQueue.UnlockRecords(); break; case (long)BackgroundProcessType.EGHPExclusion: OOAEGHPExclusion _OOAEGHPExclusion = new OOAEGHPExclusion(); _OOAEGHPExclusion.StartEGHPExcelProcess(); break; case (long)BackgroundProcessType.MoveNOTMacro: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessUpdateMacroQueue((long)MacroType.NOTMacro); break; case (long)BackgroundProcessType.MoveFTTMacro: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessUpdateMacroQueue((long)MacroType.FTTMacro); break; case (long)BackgroundProcessType.MoveTRC155Macro: objMoveQueue = new MoveQueue(); objMoveQueue.ProcessUpdateMacroQueue((long)MacroType.TRC155Macro); break; default: string s = string.Empty; break; } } catch (Exception ex) { BLCommon.LogError(CurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BackgroundProcess, (long)ExceptionTypes.Uncategorized, "Exception while BG Process", ex.StackTrace.ToString()); } }
internal DeploymentException(ExceptionTypes exceptionType, string message) : base(message) { this._type = exceptionType; }
public DatabaseException(ExceptionTypes exception_type) { this._exTypes = exception_type; }
public ExceptionTypes CheckDuplicate(string strMemberCurrentHICN, long?lMemberContractIDLkup, DateTime?dtRPRRequestedEffectiveDate, long?lRPRActionRequestedLkup, out long lCaseID) { _retValue = new ExceptionTypes(); return(_retValue = _objDALRPR.CheckDuplicate(strMemberCurrentHICN, lMemberContractIDLkup, dtRPRRequestedEffectiveDate, lRPRActionRequestedLkup, out lCaseID)); }
public ActionResult Add(DOADM_UserMaster objDOADM_UserMaster) { string errorMessage = string.Empty; ExceptionTypes result = new ExceptionTypes(); string returnMessage = string.Empty; try { //check if this call is to update record or save new record if (objDOADM_UserMaster.ADM_UserMasterId > 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.UserAdmin, objDOADM_UserMaster.ADM_UserMasterId)) { //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 { objDOADM_UserMaster.CreatedByRef = currentUser.ADM_UserMasterId; //If new record to be saved returnMessage = "Record saved successfully."; } objDOADM_UserMaster.FullName = objDOADM_UserMaster.FirstName != null ? objDOADM_UserMaster.LastName + ", " + objDOADM_UserMaster.FirstName : objDOADM_UserMaster.LastName; objDOADM_UserMaster.SpecialistFax = String.IsNullOrEmpty(objDOADM_UserMaster.SpecialistFax) ? "" : String.Join("", objDOADM_UserMaster.SpecialistFax.Split('-')); objDOADM_UserMaster.SpecialistPhone = String.IsNullOrEmpty(objDOADM_UserMaster.SpecialistPhone) ? "" : String.Join("", objDOADM_UserMaster.SpecialistPhone.Split('-')); objDOADM_UserMaster.UserZip = String.IsNullOrEmpty(objDOADM_UserMaster.UserZip) ? "" : String.Join("", objDOADM_UserMaster.UserZip.Split('-')); objDOADM_UserMaster.IsActive = objDOADM_UserMaster.IsActive; objDOADM_UserMaster.IsManager = objDOADM_UserMaster.IsManager; objDOADM_UserMaster.CreatedByRoleLkup = currentUser.RoleLkup; objDOADM_UserMaster.UpdatedByRoleLkup = currentUser.RoleLkup; objDOADM_UserMaster.LastUpdatedByRef = currentUser.ADM_UserMasterId; if (Session[ConstantTexts.UserAccessGroupSessionKey] != null) { objDOADM_UserMaster.lstDOADM_AccessGroupUserCorrelation = Session[ConstantTexts.UserAccessGroupSessionKey] as List <DOADM_AccessGroupUserCorrelation>; } BLUserAdministration objBLUserAdministration = new BLUserAdministration(); result = objBLUserAdministration.SaveUser(objDOADM_UserMaster, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.ManageUsers, (long)ExceptionTypes.Uncategorized, string.Empty, "error occured while saving data"); return(Json(new { ID = result, Message = "An error occured while updating DB." })); } return(Json(new { ID = result, Message = returnMessage })); } 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 ExceptionTypes Create(DOGEN_Queue objDOGEN_Queue, List <DOGEN_Attachments> lstDOGEN_Attachments, out string errorMessage) { _retValue = new ExceptionTypes(); return(_retValue = _objDALRPR.Create(objDOGEN_Queue, lstDOGEN_Attachments, out errorMessage)); }
internal InvalidDeploymentException(ExceptionTypes exceptionType, string message, Exception innerException) : base(exceptionType, message, innerException) { }
internal InvalidDeploymentException(ExceptionTypes exceptionType, string message) : base(exceptionType, message) { }
internal DependentPlatformMissingException(ExceptionTypes exceptionType, string message, Exception innerException) : base(exceptionType, message, innerException) { }
internal DeploymentDownloadException(ExceptionTypes exceptionType, string message) : base(exceptionType, message) { }
/// <summary>Initializes a new instance of the <see cref="T:System.Deployment.Application.DeploymentException" /> class. </summary> /// <param name="message">Represents text as a series of Unicode characters.</param> public DeploymentException(string message) : base(message) { this._type = ExceptionTypes.Unknown; }
public HandleExceptionAttribute(ExceptionTypes type) { // Errors come here before other error filters Order = 1; _rapidExceptionType = type; }
public DeploymentException(string message, Exception innerException) : base(message, innerException) { this._type = ExceptionTypes.Unknown; }
/// <summary>Initializes a new instance of the <see cref="T:System.Deployment.Application.DeploymentException" /> class. </summary> /// <param name="message">Represents text as a series of Unicode characters.</param> /// <param name="innerException">Represents errors that occur during application execution.</param> public DeploymentException(string message, Exception innerException) : base(message, innerException) { this._type = ExceptionTypes.Unknown; }
public ExceptionTypes SetCurrentBatchStatus(out string errorMessage) { return(_retValue = _objDALMQ.SetCurrentBatchStatus(out errorMessage)); }
internal DeploymentException(ExceptionTypes exceptionType, string message, Exception innerException) : base(message, innerException) { this._type = exceptionType; }
private bool UserLoggedIn(out UIUserLogin loggedInUser) { loggedInUser = null; try { if (CurrentUser == null) { string[] strLoginName = System.Web.HttpContext.Current.User.Identity.Name.Split(new string[] { @"\" }, StringSplitOptions.RemoveEmptyEntries); string domain = strLoginName[0]; string loginName = strLoginName[1]; //Checking user in Database. BLUserAdministration objBLUserAdministration = new BLUserAdministration(); ExceptionTypes result = objBLUserAdministration.GetUserAccessPermission(loginName, null, null, null, out loggedInUser); if (result == ExceptionTypes.ZeroRecords) { return(false); } if (result != (long)ExceptionTypes.Success) { return(false); } else { System.Security.Principal.WindowsIdentity winIdnt = System.Web.HttpContext.Current.User.Identity as System.Security.Principal.WindowsIdentity; System.Security.Principal.IdentityReferenceCollection grps = winIdnt.Groups; //Admin if (IsUserInADGroup(grps, WebConfigData.AdminSID)) { loggedInUser.IsAdminUser = true; } //OST if (IsUserInADGroup(grps, WebConfigData.AdminOSTSID)) { loggedInUser.IsAdmOSTUser = true; } if (IsUserInADGroup(grps, WebConfigData.ManagerOSTSID)) { loggedInUser.IsMgrOSTUser = true; } if (IsUserInADGroup(grps, WebConfigData.ProcessorOSTSID)) { loggedInUser.IsPrcrOSTUser = true; } if (IsUserInADGroup(grps, WebConfigData.ViewerOSTSID)) { loggedInUser.IsVwrOSTUser = true; } //Eligibility if (IsUserInADGroup(grps, WebConfigData.AdminEligSID)) { loggedInUser.IsAdmEligUser = true; } if (IsUserInADGroup(grps, WebConfigData.ManagerEligSID)) { loggedInUser.IsMgrEligUser = true; } if (IsUserInADGroup(grps, WebConfigData.ProcessorEligSID)) { loggedInUser.IsPrcrEligUser = true; } if (IsUserInADGroup(grps, WebConfigData.ViewerEligSID)) { loggedInUser.IsVwrEligUser = true; } //RPR if (IsUserInADGroup(grps, WebConfigData.AdminRPRSID)) { loggedInUser.IsAdmRPRUser = true; } if (IsUserInADGroup(grps, WebConfigData.ManagerRPRSID)) { loggedInUser.IsMgrRPRUser = true; } if (IsUserInADGroup(grps, WebConfigData.ProcessorRPRSID)) { loggedInUser.IsPrcrRPRUser = true; } if (IsUserInADGroup(grps, WebConfigData.ViewerRPRSID)) { loggedInUser.IsVwrRPRUser = true; } if (loggedInUser.IsAdminUser == false && loggedInUser.IsAdmOSTUser == false && loggedInUser.IsAdmEligUser == false && loggedInUser.IsAdmRPRUser == false && loggedInUser.IsMgrOSTUser == false && loggedInUser.IsMgrEligUser == false && loggedInUser.IsMgrRPRUser == false && loggedInUser.IsPrcrOSTUser == false && loggedInUser.IsPrcrEligUser == false && loggedInUser.IsPrcrRPRUser == false && loggedInUser.IsVwrOSTUser == false && loggedInUser.IsVwrEligUser == false && loggedInUser.IsVwrRPRUser == false && loggedInUser.IsWebServiceUser == false && loggedInUser.IsMacroServiceUser == false ) { return(false); } else { CurrentUser = loggedInUser; } } } return(true); } catch { return(false); } }
/// <summary>Initializes a new instance of the <see cref="T:System.Deployment.Application.DeploymentException" /> class. </summary> /// <param name="serializationInfo">Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.</param> /// <param name="streamingContext">Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.</param> protected DeploymentException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { this._type = (ExceptionTypes)serializationInfo.GetValue("_type", typeof(ExceptionTypes)); }
long _currentLoginUserId = 11;//for MIIM System will be set in Create session // GET: MIIMConnector public ActionResult GetCaseDetails(string caseId) { ViewBag.PageName = ConstantTexts.MiimPageName; try { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMNew, _currentLoginUserId, TarceMethodLkup.New.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); if (long.TryParse(caseId, out long lQueueID))// to check if case exists in DB { #region Create Session ExceptionTypes result = CreateSession(WorkBasket.OST); #endregion if (result == ExceptionTypes.Success) { ///Log For User Authentication Success MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMUserAuthSucc, _currentLoginUserId, TarceMethodLkup.InProgress.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); #region validate Record Lock UIRecordsLock objRecordsLocked = new UIRecordsLock(); bool isAvailable = true; try { BLCommon objCommon = new BLCommon(); result = objCommon.GetLockedRecordOrLockRecord(_currentLoginUserId, (long)ScreenType.Queue, lQueueID, false, out objRecordsLocked); if (result == (long)ExceptionTypes.Success) { isAvailable = objRecordsLocked.LockedHours.IsNullOrEmpty(); } } catch (Exception ex) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, "Record locking failed", _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.ToString()); ViewBag.ErrorMessage = "\nError Locking the Record Please try Again."; return(View("~/Views/Shared/Error.cshtml")); } #endregion if (isAvailable) { #region Get Case Discrepancy Category result = _objBLMIIMIntegration.GetCaseDiscrepancyCategory(lQueueID, out long lDiscrepancyCategory, out string errorMessage); if (result != (long)ExceptionTypes.Success && result != ExceptionTypes.ZeroRecords) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMRecordNotFound, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, errorMessage, "Error occured while getting Discrepancy Category."); ViewBag.ErrorMessage = "\nDetails Not available for selected Case."; return(View("~/Views/Shared/Error.cshtml")); } #endregion #region Redirect to Process Work Screen based on Work Basket string strEncodedCaseId = URLEncoderDecoder.Encode(lQueueID.ToString()); MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMRequestCompleted, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); switch (lDiscrepancyCategory) { case (long)DiscripancyCategory.RPR: return(RedirectToAction("RPRProcessWork", "RPR", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.Eligibility: return(RedirectToAction("EligibilityProcessWork", "Eligibility", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.DOB: return(RedirectToAction("DOBProcessWork", "Eligibility", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.Gender: return(RedirectToAction("GenderProcessWork", "Eligibility", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.OOA: return(RedirectToAction("OOAProcessWork", "OST", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.SCC: return(RedirectToAction("SCCProcessWork", "OST", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); case (long)DiscripancyCategory.TRR: return(RedirectToAction("TRRProcessWork", "OST", new { queueId = strEncodedCaseId, pageName = ConstantTexts.MiimPageName })); } #endregion } else { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, "Record is locked by User Id :" + objRecordsLocked.CreatedByRef, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); ViewBag.ErrorMessage = "\nRecord is Locked by " + objRecordsLocked.CreatedByName + " and Not Available for Processing"; return(View("~/Views/Shared/Error.cshtml")); } } else if (result == ExceptionTypes.UnknownError) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMUserAuthFail, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); ViewBag.ErrorMessage = "\nYou are not part of ERS DB.\nPlease contact administrator"; return(View("~/Views/Shared/Error.cshtml")); } else { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ConstantTexts.MIIMUserAuthFail, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); ViewBag.ErrorMessage = "\nYou do not have permission to access this page.\nPlease contact administrator"; return(View("~/Views/Shared/Error.cshtml")); } } MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, "Invalid ERS case Id :" + caseId, _currentLoginUserId, TarceMethodLkup.Completed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); ViewBag.ErrorMessage = "\nInvalid Case Id."; return(View("~/Views/Shared/Error.cshtml")); } catch (Exception ex) { MIIMServiceLog(MethodBase.GetCurrentMethod().Name, caseId, ex.ToString(), _currentLoginUserId, TarceMethodLkup.Failed.ToLong(), (long)MIIMServiceMethod.GetCaseDetails); BLCommon.LogError(_currentLoginUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.MIIMConnector, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.Message); return(View("~/Views/Shared/Error.cshtml")); } }
/// <summary> /// Validate exceptions from RefineLayout() with null reads/null delta's. /// </summary> /// <param name="nodeName"></param> /// <param name="exceptionType">Layout refinement different parameters</param> public void ValidateRefineLayoutMethod(string nodeName, ExceptionTypes exceptionType) { string actualException = null; try { DeltaAlignmentCollection coll = null; IEnumerable<DeltaAlignment> alignments = LayoutRefiner.RefineLayout(coll); if (alignments.Count() >= 0) { ApplicationLog.WriteLine("RefineLayout P2 : Exception not thrown."); Assert.Fail(); } } catch (ArgumentNullException ex) { actualException = ex.Message; ApplicationLog.WriteLine("Refine Layout P2 : Successfully validated the exception"); } string expectedMessage = GetExpectedErrorMessageWithInvalidSequenceType(nodeName, exceptionType); Assert.AreEqual(expectedMessage, actualException.Replace("\n", "").Replace("\r", "")); }
public PortException(ExceptionTypes type) { ErrorType = type; }
/// <summary> /// Gets the expected error message for invalid sequence type. /// </summary> /// <param name="nodeName">xml node</param> /// <param name="sequenceType"></param> /// <returns>Returns expected error message</returns> string GetExpectedErrorMessageWithInvalidSequenceType(string nodeName, ExceptionTypes sequenceType) { string expectedErrorMessage = string.Empty; switch (sequenceType) { case ExceptionTypes.RefineLayoutNullDeltas: expectedErrorMessage = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.RefineLayoutWithNullDeltasNode); break; case ExceptionTypes.ResolveAmbiguityNullDeltas: expectedErrorMessage = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ResolveAmbiguityWithNullDeltasNode); break; case ExceptionTypes.ConsensusWithNullDelta: expectedErrorMessage = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ConsensusWithNullDeltaNode); break; default: expectedErrorMessage = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.ExpectedErrorMessage); break; } return expectedErrorMessage; }
public ExceptionTypes SearchResources(long?TimeZone, DOADM_ResourceDetails objDOADM_ResourceDetails, out List <DOADM_ResourceDetails> lstDOADM_ResourceDetails, out string errorMessage) { _retValue = new ExceptionTypes(); return(_retValue = _objDALResources.SearchResources(TimeZone, objDOADM_ResourceDetails, out lstDOADM_ResourceDetails, out errorMessage)); }
public ExceptionTypes SaveResource(DOADM_ResourceDetails objDOADM_ResourceDetails, out string errorMessage) { _retValue = new ExceptionTypes(); return(_retValue = _objDALResources.SaveResource(objDOADM_ResourceDetails, out errorMessage)); }
internal TrustNotGrantedException(ExceptionTypes exceptionType, string message, Exception innerException) : base(exceptionType, message, innerException) { }
public SparkleTaskException(ExceptionTypes exectionType, string message) : base(message) { ExceptionType = exectionType; }
public static void SetLogEvents(ExceptionTypes events) { try { Types.GraphicsMagickNET.CallMethod("SetLogEvents", new Type[] {Types.ExceptionTypes}, events); } catch (Exception ex) { throw ExceptionHelper.Create(ex); } }
public DeploymentException(string message) : base(message) { this._type = ExceptionTypes.Unknown; }
internal DeploymentDownloadException(ExceptionTypes exceptionType, string message, Exception innerException) : base(exceptionType, message, innerException) { }
protected DeploymentException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { this._type = (ExceptionTypes) serializationInfo.GetValue("_type", typeof(ExceptionTypes)); }
public ExceptionTypes SaveOST(DOGEN_Queue objDOGEN_Queue, out string errorMessage) { _retValue = new ExceptionTypes(); return(_retValue = _objDALOST.SaveOST(objDOGEN_Queue, out errorMessage)); }
public ExceptionTypes GetGenQueueByID(long?TimeZone, long genQueueID, out DOGEN_Queue objDOGEN_Queue, out string errorMsg) { _retValue = new ExceptionTypes(); return(_retValue = _objDALOST.GetGenQueueByID(TimeZone, genQueueID, out objDOGEN_Queue, out errorMsg)); }
public ExceptionTypes SaveOSTActions(DOGEN_OSTActions objDOGEN_OSTActions, out string errorMessage) { _retValue = new ExceptionTypes(); return(_retValue = _objDALOST.SaveOSTActions(objDOGEN_OSTActions, out errorMessage)); }
public PortException(ExceptionTypes type) : base() { ErrorType = type; }
// public ExceptionTypes GetQueueCMSTransaction(StringBuilder strGEN_QueueIdsToSkip, out DOGEN_Queue objDOGEN_Queue, out string errorMsg) { _retValue = new ExceptionTypes(); return(_retValue = _objDALOST.GetQueueCMSTransaction(strGEN_QueueIdsToSkip, out objDOGEN_Queue, out errorMsg)); }
public PortException(ExceptionTypes type, string message, Exception inner) : base(message, inner) { ErrorType = type; }
public ExceptionTypes MQTRRRecordsToProcess(long savedMessagesBGPId, out List <DOMQTRRWorkQueueItems> lstDOMQTRRWorkQueueItems, out string errorMessage) { return(_retValue = _objDALMQ.MQTRRRecordsToProcess(savedMessagesBGPId, out lstDOMQTRRWorkQueueItems, out errorMessage)); }