示例#1
0
        public ActionResult ScreenShot(int Id)
        {
            ApplyLeave obj = new ApplyLeave();

            obj = ApplyLeave.getLeaveInfo(Id);
            return(View("ScreenShot", obj));
        }
示例#2
0
        public ActionResult deleteLeaves(int id)
        {
            ApplyLeave obj = new ApplyLeave();

            obj = ApplyLeave.getLeaveInfo(id);
            if (obj.StartDate.Date > DateTime.Now.Date || obj.Status == "Approval Pending")
            {
                if (ApplyLeave.deleteLeave(id))
                {
                    return(RedirectToAction("ViewLeaves", "ApplyLeave"));
                }
                else
                {
                    return(RedirectToAction("Index", "LTLogin"));
                }
            }
            else
            {
                return(RedirectToAction("ViewLeaves", "ApplyLeave"));
            }
        }