Ejemplo n.º 1
0
        /// <summary>
        /// Check if email id exists
        /// </summary>
        /// <param name="EmailId"></param>
        /// <returns></returns>
        public ActionResult CheckIfEmailIdExists(string EmailID, string Module)
        {
            string ActionName     = this.ControllerContext.RouteData.Values["action"].ToString();
            string ControllerName = this.ControllerContext.RouteData.Values["controller"].ToString();
            Int32? UserID         = HttpContext.Session.GetInt32("UserID");
            string ErrorMessage   = string.Empty;

            try
            {
                var result = _empRepository.CheckIfEmailIdExists(EmailID, Module);
                return(Json(result));
            }
            catch (Exception ex)
            {
                var st        = new StackTrace(ex, true);
                var frame     = st.GetFrame(0);
                int ErrorLine = frame.GetFileLineNumber();
                var Result    = _CommonRepository.LogManagement(ControllerName, ActionName, ex.Message, ErrorLine, UserID);
                return(RedirectToAction("ErrorPage", "Common"));
            }
        }