public MemberListModel(String HolderName, List<Member> Members)
 {
     this.HolderName = HolderName;
     this.Members = Members;
     Filter = new MemberListFilter();
     AppParams = new ApplicationParameters();
 }
 public MemberListModel(String HolderName, List<Member> Members, MemberListFilter Filter, int TotalItems)
 {
     this.HolderName = HolderName;
     this.Members = Members;
     this.TotalItems = TotalItems;
     this.Filter = Filter;
 }
 public MemberListModel(String HolderName, List <Member> Members)
 {
     this.HolderName = HolderName;
     this.Members    = Members;
     Filter          = new MemberListFilter();
     AppParams       = new ApplicationParameters();
 }
 public MemberListModel(String HolderName, List <Member> Members, MemberListFilter Filter, int TotalItems)
 {
     this.HolderName = HolderName;
     this.Members    = Members;
     this.TotalItems = TotalItems;
     this.Filter     = Filter;
 }
        public ContentResult GetMembers(MemberListFilter Filter)
        {
            Filter.SortColumnName = "MemberID";
            Filter.SortOrderAsc   = true;

            var totalItems = 0;
            var _Members   = Members.Get(Filter, out totalItems);

            String Json = Members.JsonCollection(_Members);

            return(Content(Json, TypeJson));
        }
 public MemberListModel()
 {
     Members = new List<Member>();
     Filter = new MemberListFilter();
     AppParams = new ApplicationParameters();
 }
 public MemberListModel()
 {
     Members   = new List <Member>();
     Filter    = new MemberListFilter();
     AppParams = new ApplicationParameters();
 }
        public JsonResult GetMembers(MemberPaginInfo PaginInfo)
        {
            MemberListFilter Filter = new MemberListFilter();
            Filter.CurrentPage = PaginInfo.CurrentPage;
            Filter.ItemsPerPage = PaginInfo.ItemsPerPage;
            Filter.SortOrderAsc = PaginInfo.SortOrderAsc;
            Filter.AlphabetFilter = PaginInfo.AlphabetFilter;
            Filter.RolesFilter = PaginInfo.RolesFilter;
            Filter.SortColumn = PaginInfo.SortColumn;
            Filter.Search = HttpUtility.UrlDecode(PaginInfo.Search);

            Filter.SortColumnName = "MemberID";
            switch (PaginInfo.SortColumn)
            {
                case 2: Filter.SortColumnName = "Name"; break;
                case 4: Filter.SortColumnName = "Email"; break;
                case 5: Filter.SortColumnName = "LastLogin"; break;
                case 6: Filter.SortColumnName = "Created"; break;
            }

            if (PaginInfo.RolesFilterCondition == "or")
                Filter.RoleFilterCondition = MemberListFilterRoleConditon.OR;
            else if (PaginInfo.RolesFilterCondition == "and")
                Filter.RoleFilterCondition = MemberListFilterRoleConditon.AND;

            var totalItems = 0;
            var members = Web.Admin.Logic.Collections.Members.Get(Filter, out totalItems);

            return Json(new
            {
                Html = this.RenderPartialView("_MemberList", new MemberListModel(PaginInfo.HolderName, members,Filter,totalItems))
            }, JsonRequestBehavior.AllowGet);
        }