Exemplo n.º 1
0
        public ActionResult Details(int?id)
        {
            var ses   = sesrepo.GetSessionById((User as CustomPrincipal).UserId);
            int orgid = ses.OrganizationId;

            if (id == null || id == 0)
            {
                return(HttpNotFound());
            }

            var item = db.GetItemDetails((int)id);

            if (item.Item == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CategoryId     = new SelectList(ddl.GetCategoryList(orgid), "Id", "Name");
            ViewBag.OrganizationId = new SelectList(ddl.GetOrganizationList(), "Id", "Name");
            return(View(item));
        }