Esempio n. 1
0
 protected PagedTableModel(string defaultSort, string defaultDirection)
 {
     Pager = new PagerModel2(Count)
     {
         Sort = defaultSort, Direction = defaultDirection
     };
 }
Esempio n. 2
0
 public SavedQueryModel()
 {
     onlyMine        = DbUtil.Db.UserPreference("savedSearchOnlyMine", "true").ToBool();
     Pager           = new PagerModel2(Count);
     Pager.Direction = "asc";
     Pager.Sort      = "Name";
 }
Esempio n. 3
0
 public SavedQueryModel()
 {
     onlyMine = DbUtil.Db.UserPreference("savedSearchOnlyMine", "true").ToBool();
     Pager = new PagerModel2(Count);
     Pager.Direction = "asc";
     Pager.Sort = "Description";
 }
Esempio n. 4
0
 public FamilyModel(int id)
 {
     Person = DbUtil.Db.LoadPersonById(id);
     Pager = new PagerModel2(Count);
     Pager.pagesize = 10;
     Pager.ShowPageSize = false;
 }
Esempio n. 5
0
 public SMSModel()
 {
     Pager = new PagerModel2(DbUtil.Db)
     {
         GetCount = Count
     };
 }
Esempio n. 6
0
 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");
 }
Esempio n. 7
0
 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");
 }
Esempio n. 8
0
 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");
 }
Esempio n. 9
0
 public EmailsModel()
 {
     Pager = new PagerModel2(DbUtil.Db)
     {
         GetCount  = Count,
         Sort      = "Sent/Scheduled",
         Direction = "desc",
     };
 }
Esempio n. 10
0
 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");
 }
Esempio n. 11
0
 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());
 }
Esempio n. 12
0
 private void SetPager(int?page, int?pageSize)
 {
     Pager = new PagerModel2(Count);
     if (pageSize.HasValue)
     {
         Pager.PageSize = pageSize.Value;
     }
     Pager.Page = page;
 }
Esempio n. 13
0
        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());
        }
Esempio n. 14
0
        private void SetPager(int?page, int?pageSize)
        {
            Pager = new PagerModel2(DbUtil.Db)
            {
                GetCount = Count
            };
            if (pageSize.HasValue)
            {
                Pager.PageSize = pageSize.Value;
            }

            Pager.Page = page;
        }
Esempio n. 15
0
        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();
        }
Esempio n. 16
0
 public EmailsModel()
 {
     Pager = new PagerModel2(Count);
     Pager.Sort = "Sent/Scheduled";
     Pager.Direction = "desc";
 }
Esempio n. 17
0
        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();
        }
Esempio n. 18
0
 private void SetPager(int? page, int? pageSize)
 {
     Pager = new PagerModel2(Count);
     if (pageSize.HasValue)
         Pager.PageSize = pageSize.Value;
     Pager.Page = page;
 }
Esempio n. 19
0
 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;
 }
Esempio n. 20
0
 public SMSModel()
 {
     Pager = new PagerModel2(Count);
 }
Esempio n. 21
0
 public SavedQueryModel()
 {
     Pager = new PagerModel2(Count);
     Pager.Direction = "asc";
     Pager.Sort = "Name";
 }
Esempio n. 22
0
 public EmailModel()
 {
     Pager  = new PagerModel2(Count);
     filter = "All";
 }
Esempio n. 23
0
 public EmailsModel()
 {
     Pager           = new PagerModel2(Count);
     Pager.Sort      = "Sent/Scheduled";
     Pager.Direction = "desc";
 }
Esempio n. 24
0
 public EmailModel()
 {
     Pager = new PagerModel2(Count);
     filter = "All";
 }
Esempio n. 25
0
 public OrgSearchModel()
 {
     Pager = new PagerModel2();
     Pager.GetCount = Count;
 }
Esempio n. 26
0
 public SearchAddModel()
 {
     Pager = new PagerModel2(Count);
     Pager.ShowPageSize = false;
 }
Esempio n. 27
0
 public SMSModel()
 {
     Pager = new PagerModel2(Count);
 }