public ActionResult EditDetails(string Application_Id)
        {
            if (Application_Id != null && Session["EmpID"] != null)
            {
                Application_Id = LeaveApplication.Models.Encryption.Base64Decode(Application_Id);
                try
                {
                    int.Parse(Application_Id);
                    LeaveApplication.Models.LeaveApplication x = lb.GetApplication(Application_Id);
                    Session["EditLeave"] = x;
                    if (x == null)
                    {
                        return(RedirectToAction("Index", "ViewApplications"));
                    }
                    else
                    {
                        ViewBag.Reasons    = lb.GetReasons();
                        ViewBag.Leavetypes = lb.GetLeaveTypes();

                        if (TempData["HrsError"] != null && Convert.ToBoolean(TempData["HrsError"]) == true)
                        {
                            ViewBag.HrsError = true;
                        }
                        else
                        {
                            ViewBag.HrsError = false;
                        }
                        return(View("EditDetails", x));
                    }
                }
                catch (FormatException)
                {
                    return(RedirectToAction("FacultyApplications"));
                }
            }
            else
            {
                return(RedirectToAction("Index", "ViewApplications"));
            }
        }