public PartialViewResult Add()
 {
     var customRoleProvider = new CustomAuthentication.CustomRoleProvider();
     var roleID = customRoleProvider.GetRole("Office");
     var customMembershipProvider = new CustomAuthentication.CustomMembershipProvider();
     var Users = customMembershipProvider.GetUsers(roleID.RoleId);
     return PartialView(Users);
 }
 public PartialViewResult Edit(int id)
 {
     var customRoleProvider = new CustomAuthentication.CustomRoleProvider();
     var roleID = customRoleProvider.GetRole("Office");
     var customMembershipProvider = new CustomAuthentication.CustomMembershipProvider();
     var Users = customMembershipProvider.GetUsers(roleID.RoleId);
     ViewData["Users"] = Users;
     var officesManager = new DataAccess.OfficeMananer();
     return PartialView(officesManager.GetOffice(id));
 }
 public ActionResult Add()
 {
     var userDetailManager = new DataAccess.UserManager();
     var officeMananer = new DataAccess.OfficeMananer();
     var user = userDetailManager.GetUserDetail(UserDetail.UserId);
     var offices = officeMananer.GetOffices(IsAdmin ? 0 : UserDetail.UserId);
     ViewData["Offices"] = offices;
     var conventionManager = new DataAccess.ConventionManager();
     var conventions = conventionManager.GetConventions();
     ViewData["Conventions"] = conventions;
     if (IsAdmin)
     {
         var customRoleProvider = new CustomAuthentication.CustomRoleProvider();
         var customMembershipProvider = new CustomAuthentication.CustomMembershipProvider();
         ViewData["Employee"] = customMembershipProvider.GetUsers(4);
     }
     return PartialView();
 }