refactoring: --YavscLib-- => Yavsc
This commit is contained in:
parent
724e0e17ef
commit
776b7dae21
102 changed files with 216 additions and 209 deletions
|
|
@ -4,7 +4,7 @@ using Microsoft.AspNet.Mvc.Rendering;
|
|||
using Yavsc.Models;
|
||||
using Yavsc.ViewModels.Controls;
|
||||
using Yavsc.ViewModels.Relationship;
|
||||
using YavscLib;
|
||||
using Yavsc;
|
||||
|
||||
namespace Yavsc.ViewComponents
|
||||
{
|
||||
|
|
@ -16,31 +16,31 @@ namespace Yavsc.ViewComponents
|
|||
this.dbContext = dbContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IViewComponentResult Invoke (ICircleAuthorized target)
|
||||
{
|
||||
var oid = target.GetOwnerId();
|
||||
ViewBag.ACL = dbContext.Circle.Where(
|
||||
c=>c.OwnerId == oid)
|
||||
.Select(
|
||||
c => new SelectListItem
|
||||
{
|
||||
Text = c.Name,
|
||||
Value = c.Id.ToString(),
|
||||
Selected = target.AuthorizeCircle(c.Id)
|
||||
c => new SelectListItem
|
||||
{
|
||||
Text = c.Name,
|
||||
Value = c.Id.ToString(),
|
||||
Selected = target.AuthorizeCircle(c.Id)
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
ViewBag.Access = dbContext.Circle.Where(
|
||||
c=>c.OwnerId == oid)
|
||||
.Select( c=>
|
||||
new AjaxCheckBoxInfo
|
||||
{
|
||||
Text = c.Name,
|
||||
Text = c.Name,
|
||||
Checked = target.AuthorizeCircle(c.Id),
|
||||
Value = c.Id.ToString()
|
||||
});
|
||||
return View(new CirclesViewModel(target));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue