Beispiel #1
0
        public ActionResult Detail(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            A_ItemVM detail = db.getItemDetail((int)id);

            if (detail == null)
            {
                return(HttpNotFound());
            }
            return(View(detail));
        }
Beispiel #2
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            A_ItemVM detail = db.getItemDetail((int)id);

            if (detail == null)
            {
                return(HttpNotFound());
            }
            int depid = Convert.ToInt32(Session["DepartmentId"]);

            ViewBag.AssetCategoryId = new SelectList(ddl.getCategoryListByDepartment(depid), "Id", "Name", detail.AssetCategoryId);
            return(View(detail));
        }