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

            A_AssetVM detail = db.getAssetDetail((int)id);

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

            ViewBag.DepartmentId1 = new SelectList(ddl.getDepartmentList(), "Id", "Name", detail.DepartmentId);
            ViewBag.LocationId    = new SelectList(ddl.getLocationList(), "Id", "Name", detail.LocationId);
            ViewBag.CategoryId    = new SelectList(ddl.getAssetCategoryList(depid), "Id", "Name", detail.AssetCategoryId);
            ViewBag.AssetItemId   = new SelectList(ddl.getAssetItemList(depid), "Id", "Name", detail.AssetItemId);
            return(View(detail));
        }
コード例 #2
0
        public ActionResult Create1(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            int       tokenId = Convert.ToInt32(id);
            int       depid   = Convert.ToInt32(Session["DepartmentId"]);
            A_AssetVM depLoc  = db.getDepartmentLocationByTokenId((int)id);

            ViewBag.DepartmentId    = depLoc.DepartmentId;
            ViewBag.DepartmenName   = depLoc.DepartmentName;
            ViewBag.LocationId      = depLoc.LocationId;
            ViewBag.LocationName    = depLoc.LocationName;
            ViewBag.RequestQuantity = depLoc.RequestQuantity;
            ViewBag.CategoryId      = depLoc.CategoryId;
            ViewBag.CategoryName    = depLoc.CategoryName;
            ViewBag.AssetItemId     = depLoc.AssetItemId;
            ViewBag.TokenId         = tokenId;
            ViewBag.AssetItemName   = depLoc.AssetItemName;
            return(View());
        }