Exemple #1
0
        /// <summary>
        /// Release the Activity lock.
        /// </summary>
        /// <param name="user_Code"></param>
        /// <param name="dcrActualDate"></param>
        /// <param name="flag"></param>
        /// <returns></returns>
        ///
        public bool ReleasetheActivityLock(string user_Code, string dcrDetails)
        {
            bool result = false;

            // Creates Instance.
            _objCurrentInfo = new CurrentInfo();
            _objdcrLock     = new BLDCRLock();

            // Assign to the Model property.
            DCRActivityLockModel dcrActivityLockModel = new DCRActivityLockModel();

            dcrActivityLockModel.User_Code = user_Code;
            // multiple dcr actual dates and flags with ^ symbol.
            // dcrActivityLockModel.DCR_Actual_Date = dcrActualDates;
            //  dcrActivityLockModel.Activity_Flag = flags;
            dcrActivityLockModel.Released_By         = _objCurrentInfo.GetUserCode();
            dcrActivityLockModel.Released_Date       = DateTime.Now.ToShortDateString();
            dcrActivityLockModel.Request_Released_By = dcrActivityLockModel.Request_Released_By;
            dcrActivityLockModel.Released_Reason     = dcrActivityLockModel.Released_Reason;


            // Call the funtion.
            string activityResult = _objdcrLock.ReleaseActivityLock(_objCurrentInfo.GetCompanyCode(), user_Code, dcrDetails, _objCurrentInfo.GetUserCode());

            if (activityResult.ToUpper() == "SUCCESS")
            {
                result = true;
            }
            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Retrievs the Activity lock data and returns the HTML format.
        /// </summary>
        /// <param name="user_Code"></param>
        /// <returns></returns>
        public StringBuilder GetActivityLockDataPerUser(string user_Code)
        {
            _objdcrLock     = new BLDCRLock();
            _objCurrentInfo = new CurrentInfo();

            string        company_Code = _objCurrentInfo.GetCompanyCode();
            StringBuilder strActivityLockDataHTMLFormat = _objdcrLock.GetActivityLockHTMLFormat(company_Code, user_Code);

            return(strActivityLockDataHTMLFormat);
        }
Exemple #3
0
        /// <summary>
        /// Retrieves the Activity locked user list.
        /// </summary>
        /// <returns></returns>
        public JsonResult GetActivityLockedUsers()
        {
            // Creats instances.
            _objdcrLock     = new BLDCRLock();
            _objCurrentInfo = new CurrentInfo();

            // Retrievs the user list...
            string           company_Code   = _objCurrentInfo.GetCompanyCode();
            List <UserModel> lstLockedUsers = _objdcrLock.GetAcivityLockedUsers(company_Code);

            // returns Json.
            return(Json(lstLockedUsers));
        }
Exemple #4
0
        public bool InsertDCRManualLock(string lockUserCodes, string lockDateFrom, string lockDateTo, string lockReason)
        {
            try
            {
                // Creates Instance.
                _objCurrentInfo = new CurrentInfo();
                _objdcrLock     = new BLDCRLock();

                // Retrieve the Sessions.
                string company_Code = _objCurrentInfo.GetCompanyCode();
                string user_Code    = _objCurrentInfo.GetUserCode();

                // Inserts the DCR Manual lock.
                return(_objdcrLock.InsertDCRManualLock(company_Code, lockUserCodes, lockDateFrom, lockDateTo, user_Code, lockReason));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }