Exemple #1
0
        public JsonResult UnlockRecord(long caseId, long screenLkup)
        {
            try
            {
                BLCommon       objCommon = new BLCommon();
                ExceptionTypes result    = objCommon.UnlockRecord(screenLkup, caseId);

                if (result == (long)ExceptionTypes.Success)
                {
                    return(Json(new { Status = (long)ExceptionTypes.Success, ErrMsg = string.Empty }));
                }
            }
            catch (Exception ex)
            {
                BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.RecordsLocked, (long)ExceptionTypes.Uncategorized, ex.ToString(), ex.ToString());
            }

            return(Json(new { Status = (long)ExceptionTypes.UnknownError, ErrMsg = "Unlock failed. Please retry." }));
        }
Exemple #2
0
        //Process Unlock Record
        public bool ProcessUnlockRecord(long ScreenType, long CaseID)
        {
            UIRecordsLock objRecordsLocked = new UIRecordsLock();
            bool          isSuccess        = false;

            try
            {
                BLCommon objBLCommon = new BLCommon();
                _retValue = objBLCommon.UnlockRecord(ScreenType, CaseID);
                if (_retValue == ExceptionTypes.Success && objRecordsLocked.Status == (long)ExceptionTypes.Success)
                {
                    isSuccess = true;
                }
            }
            catch (Exception ex)
            {
                BLCommon.LogError(_lCurrentMasterUserId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPSendOOALetter, (long)ExceptionTypes.Uncategorized, ex.Message.ToString(), ex.Message.ToString());
                //ErrorMessage += ex.Message + ex.StackTrace;
            }

            return(isSuccess);
        }
Exemple #3
0
        public ActionResult GMURecord(DateTime dtpStartDate, DateTime dtpEndDate, long queueLkup, long?queueIdToSkip, string DiscrepancyCategory)
        {
            BLQueueSummary objBLQueueSummary = new BLQueueSummary();
            BLCommon       objCommon         = new BLCommon();
            DOGEN_Queue    objDOGEN_Queue    = new DOGEN_Queue();
            string         strErrorMessage   = string.Empty;
            bool           isForcedLock      = false;

            try
            {
                if (queueIdToSkip > 0)
                {
                    ExceptionTypes exceptionResult = objCommon.UnlockRecord((long)ScreenType.Queue, (long)queueIdToSkip);
                    if (exceptionResult != ExceptionTypes.Success)
                    {
                        BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.EligibilityGetQueue, (long)ExceptionTypes.Uncategorized, strErrorMessage, strErrorMessage);
                        return(RedirectToAction("Maintenance", "Error", new { Error = strErrorMessage }));
                    }
                }

                int lockCount = 1;
                do
                {
                    ExceptionTypes dbresult = objBLQueueSummary.GetGMURecord(dtpStartDate, dtpEndDate, (long)currentUser.BusinessSegmentLkup, queueLkup, queueIdToSkip, currentUser.ADM_UserMasterId, currentUser.IsRestrictedUser, out objDOGEN_Queue, out strErrorMessage);
                    if (dbresult == ExceptionTypes.Success)
                    {
                        //Locking  the record.
                        if (objDOGEN_Queue.LockedByRef == currentUser.ADM_UserMasterId)
                        {
                            isForcedLock = true;
                        }
                        UIRecordsLock  objRecordsLocked;
                        ExceptionTypes exceptionResult = objCommon.GetLockedRecordOrLockRecord(currentUser.ADM_UserMasterId, (long)ScreenType.Queue, (long)objDOGEN_Queue.GEN_QueueId, false, out objRecordsLocked);

                        if (exceptionResult == (long)ExceptionTypes.Success && objRecordsLocked != null)
                        {
                            if (objRecordsLocked.CreatedByRef != currentUser.ADM_UserMasterId)
                            {
                                lockCount = lockCount + 1;
                                continue;
                            }

                            lockCount = 11;
                        }
                        else
                        {
                            lockCount = lockCount + 1;
                        }
                    }
                    else
                    {
                        lockCount = lockCount + 1;
                    }
                } while (lockCount <= 10);
                ViewBag.Name = DiscrepancyCategory;
                return(PartialView("_GetEligibilityWorkItem", objDOGEN_Queue));
            }
            catch (Exception ex)
            {
                BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.EligibilityGetQueue, (long)ExceptionTypes.Uncategorized, string.Empty, ex.Message);
                return(RedirectToAction("Maintenance", "Error", new { Error = ex.ToString() }));
            }
        }