public vResourcePresentation(vResource r) { Resource = r; ApplicationUser user = db.Users.Where(u => u.UserId == Resource.Id).FirstOrDefault(); UserName = user.UserName; }
protected virtual void LoadViewbag(vResource vResource = null) { ViewBag.ActionMenuHtml = BO.GetActionMenuHTML(); ViewBag.Tabs = BO.GetTabs(); if (vResource == null) { ViewBag.GroupId = new SelectList(db.vGroup, "Id", "Descr"); } else { vResource vresource = vResource; ViewBag.GroupId = new SelectList(db.vGroup, "Id", "Descr", vresource.GroupId); } }