Exemplo n.º 1
0
        public ActionResult ListStatus(int ListTableID, string Status)
        {
            ViewBag.ListTableID = ListTableID;
            listtable  table  = ListTableRepository.GetListByID(ListTableID);
            listheader header = ListHeaderRepository.GetByListTableID(ListTableID);

            ViewBag.Header = header;

            IEnumerable <listitem> ListItem;

            ListItem            = ListItemRepository.GetListItemByListStatus(ListTableID, Status);
            ViewBag.RecordCount = ListItem.Count();

            //security
            ViewBag.Supervisor = false;
            int memberID = Convert.ToInt16(System.Web.HttpContext.Current.Session["personID"]);

            if (MembershipRepositroy.IsUser(memberID))
            {
                user user = MembershipRepositroy.GetUserByID(memberID);
                if ((user.role.Name == "WebMaster") || (user.role.Name == "Officer") || (user.role.Name == "Admin")) //creator access
                {
                    ViewBag.Supervisor = true;
                }
            }

            return(PartialView(ListItem));
        }