protected PagedTableModel(string defaultSort, string defaultDirection) { Pager = new PagerModel2(Count) { Sort = defaultSort, Direction = defaultDirection }; }
public SavedQueryModel() { onlyMine = DbUtil.Db.UserPreference("savedSearchOnlyMine", "true").ToBool(); Pager = new PagerModel2(Count); Pager.Direction = "asc"; Pager.Sort = "Name"; }
public SavedQueryModel() { onlyMine = DbUtil.Db.UserPreference("savedSearchOnlyMine", "true").ToBool(); Pager = new PagerModel2(Count); Pager.Direction = "asc"; Pager.Sort = "Description"; }
public FamilyModel(int id) { Person = DbUtil.Db.LoadPersonById(id); Pager = new PagerModel2(Count); Pager.pagesize = 10; Pager.ShowPageSize = false; }
public SMSModel() { Pager = new PagerModel2(DbUtil.Db) { GetCount = Count }; }
public TransactionsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Date"; Pager.Direction = "desc"; finance = HttpContext.Current.User.IsInRole("Finance"); admin = HttpContext.Current.User.IsInRole("Admin") || HttpContext.Current.User.IsInRole("ManageTransactions"); }
public TransactionsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Date"; Pager.Direction = "desc"; finance = HttpContext.Current.User.IsInRole("Finance"); admin = HttpContext.Current.User.IsInRole("Admin") || HttpContext.Current.User.IsInRole("ManageTransactions"); }
public TransactionsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Date"; Pager.Direction = "desc"; finance = HttpContext.Current.User.IsInRole("Finance"); isSage = OnlineRegModel.GetTransactionGateway() == "sage"; admin = HttpContext.Current.User.IsInRole("Admin") || HttpContext.Current.User.IsInRole("ManageTransactions"); }
public EmailsModel() { Pager = new PagerModel2(DbUtil.Db) { GetCount = Count, Sort = "Sent/Scheduled", Direction = "desc", }; }
public TransactionsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Date"; Pager.Direction = "desc"; finance = HttpContext.Current.User.IsInRole("Finance"); isSage = OnlineRegModel.GetTransactionGateway() == "sage"; admin = HttpContext.Current.User.IsInRole("Admin") || HttpContext.Current.User.IsInRole("ManageTransactions"); }
public CheckinTimeModel() { Pager = new PagerModel2(); Pager.setCountDelegate(Count); Pager.Direction = "desc"; Pager.Sort = "Date/Time"; var locs = Locations(); location = DbUtil.Db.UserPreference("checkintimes-location", locs.FirstOrDefault()); }
private void SetPager(int?page, int?pageSize) { Pager = new PagerModel2(Count); if (pageSize.HasValue) { Pager.PageSize = pageSize.Value; } Pager.Page = page; }
public CheckinTimeModel() { Pager = new PagerModel2(); Pager.setCountDelegate(Count); Pager.Direction = "desc"; Pager.Sort = "Date/Time"; var locs = Locations(); location = DbUtil.Db.UserPreference("checkintimes-location", locs.FirstOrDefault()); }
private void SetPager(int?page, int?pageSize) { Pager = new PagerModel2(DbUtil.Db) { GetCount = Count }; if (pageSize.HasValue) { Pager.PageSize = pageSize.Value; } Pager.Page = page; }
private void LoadRecipients(int?page = null, int?pageSize = null) { var cn = DbUtil.Db.Connection; dynamic counts = cn.Query(@" SELECT COUNT(*) AS Total ,(SELECT COUNT(DISTINCT PeopleId) FROM dbo.EmailResponses WHERE EmailQueueId = @emailQueueId) AS NumberOpened ,(SELECT COUNT(*) FROM dbo.EmailQueueToFail WHERE Id = @emailQueueId) AS NumberFailed FROM dbo.EmailQueueTo eqt WHERE eqt.Id = @emailQueueId ", new { emailQueueId = Id }).Single(); CountOfAllRecipients = counts.Total; CountOfOpenedRecipients = counts.NumberOpened; CountOfFailedRecipients = counts.NumberFailed; CountOfNotOpenedRecipients = CountOfAllRecipients - CountOfOpenedRecipients; switch (FilterType) { case FilterType.All: _count = CountOfAllRecipients; break; case FilterType.Opened: _count = CountOfOpenedRecipients; break; case FilterType.NotOpened: _count = CountOfNotOpenedRecipients; break; case FilterType.Failed: _count = CountOfFailedRecipients; break; default: _count = CountOfAllRecipients; Pager = new PagerModel2(DbUtil.Db) { GetCount = Count }; break; } SetPager(page, pageSize); Recipients = GetRecipients(); }
public EmailsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Sent/Scheduled"; Pager.Direction = "desc"; }
private void LoadRecipients(int? page = null, int? pageSize = null) { var cn = DbUtil.Db.Connection; dynamic counts = cn.Query(@" SELECT COUNT(*) AS Total ,(SELECT COUNT(DISTINCT PeopleId) FROM dbo.EmailResponses WHERE EmailQueueId = @emailQueueId) AS NumberOpened ,(SELECT COUNT(*) FROM dbo.EmailQueueToFail WHERE Id = @emailQueueId) AS NumberFailed FROM dbo.EmailQueueTo eqt WHERE eqt.Id = @emailQueueId ", new { emailQueueId = Id }).Single(); CountOfAllRecipients = counts.Total; CountOfOpenedRecipients = counts.NumberOpened; CountOfFailedRecipients = counts.NumberFailed; CountOfNotOpenedRecipients = CountOfAllRecipients - CountOfOpenedRecipients; switch (FilterType) { case FilterType.All: _count = CountOfAllRecipients; break; case FilterType.Opened: _count = CountOfOpenedRecipients; break; case FilterType.NotOpened: _count = CountOfNotOpenedRecipients; break; case FilterType.Failed: _count = CountOfFailedRecipients; break; default: _count = CountOfAllRecipients; Pager = new PagerModel2(Count); break; } SetPager(page, pageSize); Recipients = GetRecipients(); }
private void SetPager(int? page, int? pageSize) { Pager = new PagerModel2(Count); if (pageSize.HasValue) Pager.PageSize = pageSize.Value; Pager.Page = page; }
private void Populate() { Pager = new PagerModel2(Count); var i = (from mm in DbUtil.Db.OrganizationMembers where mm.OrganizationId == OrgId && mm.PeopleId == PeopleId select new { mm, mm.Person.Name, mm.Organization.OrganizationName, }).SingleOrDefault(); Name = i.Name; OrgName = i.OrganizationName; }
public SMSModel() { Pager = new PagerModel2(Count); }
public SavedQueryModel() { Pager = new PagerModel2(Count); Pager.Direction = "asc"; Pager.Sort = "Name"; }
public EmailModel() { Pager = new PagerModel2(Count); filter = "All"; }
public EmailsModel() { Pager = new PagerModel2(Count); Pager.Sort = "Sent/Scheduled"; Pager.Direction = "desc"; }
public EmailModel() { Pager = new PagerModel2(Count); filter = "All"; }
public OrgSearchModel() { Pager = new PagerModel2(); Pager.GetCount = Count; }
public SearchAddModel() { Pager = new PagerModel2(Count); Pager.ShowPageSize = false; }
public SMSModel() { Pager = new PagerModel2(Count); }