Exemplo n.º 1
0
        public ActionResult UserList()
        {
            List <POS_USER> objListUser = new List <POS_USER>();

            try
            {
                if (Session[SessionVariables.Session_UserInfo] != null)
                {
                    objListUser = mobjBALUser.List();
                    return(View(objListUser));
                }
                else
                {
                    return(RedirectToAction("Login", "Home"));
                }
            }
            catch (Exception ex)
            {
                if (ex is BALException)
                {
                    throw ex;
                }
                else
                {
                    ExceptionLogger.WriteExceptionInDB(ex, ExceptionLevel.UI, ExceptionType.Error);
                }
                throw new UIException("User Rights Info not completed in UI Layer");
            }
        }
Exemplo n.º 2
0
 // GET: /User/
 public ActionResult Index()
 {
     try
     {
         if (Session[SessionVariables.Session_UserInfo] != null)
         {
             BranchList();
             return(View(_objBALUser.List()));
         }
         else
         {
             return(RedirectToAction("Login", "Home"));
         }
     }
     catch (Exception ex)
     {
         error.Breadcrum = "Home > Users > List";
         if (ex is BALException)
         {
             error.ErrorMsg = ex.Message.ToString() + "from " + ex.TargetSite.DeclaringType.Name + " method in " + ex.TargetSite.Name + " layer";
         }
         else
         {
             ExceptionLogger.WriteExceptionInDB(ex, ExceptionLevel.UI, ExceptionType.Error);
             error.ErrorMsg = ex.Message.ToString() + "from " + ex.TargetSite.DeclaringType.Name + " method in " + ex.TargetSite.Name + " layer";
         }
         return(RedirectToAction("ShowErrorPage", "Master", error));
     }
 }