// GET: /User/Details/5 public ActionResult Details(long id) { try { if (Session[SessionVariables.Session_UserInfo] != null) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } POS_USER pos_user = _objBALUser.GetById(id); if (pos_user == null) { return(HttpNotFound()); } return(View(pos_user)); } else { return(RedirectToAction("Login", "Home")); } } catch (Exception ex) { error.Breadcrum = "Home > Users > List > Detail"; 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)); } }