void picturesView_OnGetDataSource(object sender, EventArgs e) { AccountPicturesQueryOptions po = new AccountPicturesQueryOptions(); po.Hidden = false; ServiceQueryOptions options = new ServiceQueryOptions(picturesView.PageSize, picturesView.CurrentPageIndex); picturesView.DataSource = SessionManager.GetCollection<TransitAccountPicture, int, AccountPicturesQueryOptions>( AccountId, po, options, SessionManager.AccountService.GetAccountPictures); }
void gridManage_OnGetDataSource(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; ServiceQueryOptions options = new ServiceQueryOptions(); options.PageSize = gridManage.PageSize; options.PageNumber = gridManage.CurrentPageIndex; gridManage.DataSource = SessionManager.GetCollection<TransitAccountPicture, int, AccountPicturesQueryOptions>( RequestId, ap, options, SessionManager.AccountService.GetAccountPictures); }
void GetData(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; gridManage.CurrentPageIndex = 0; gridManage.VirtualItemCount = SessionManager.GetCount<TransitAccountPicture, int, AccountPicturesQueryOptions>( RequestId, ap, SessionManager.AccountService.GetAccountPicturesCount); gridManage_OnGetDataSource(sender, e); gridManage.DataBind(); }
void picturesView_OnGetDataSource(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; ServiceQueryOptions options = new ServiceQueryOptions(picturesView.PageSize, picturesView.CurrentPageIndex); picturesView.DataSource = SessionManager.GetCollection <TransitAccountPicture, int, AccountPicturesQueryOptions>( Account.Id, ap, options, SessionManager.AccountService.GetAccountPictures); }
void gridManage_OnGetDataSource(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; AccountService.ServiceQueryOptions options = new AccountService.ServiceQueryOptions(); options.PageSize = gridManage.PageSize; options.PageNumber = gridManage.CurrentPageIndex; gridManage.DataSource = SessionManager.GetCollection <TransitAccountPicture, AccountService.ServiceQueryOptions, int, AccountPicturesQueryOptions>( RequestId, ap, options, SessionManager.AccountService.GetAccountPictures); }
void GetData(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; gridManage.CurrentPageIndex = 0; gridManage.VirtualItemCount = SessionManager.GetCount <TransitAccountPicture, AccountService.ServiceQueryOptions, int, AccountPicturesQueryOptions>( RequestId, ap, SessionManager.AccountService.GetAccountPicturesCount); gridManage_OnGetDataSource(sender, e); gridManage.DataBind(); }
void GetPicturesData(object sender, EventArgs e) { AccountPicturesQueryOptions po = new AccountPicturesQueryOptions(); po.Hidden = false; picturesView.CurrentPageIndex = 0; picturesView.VirtualItemCount = SessionManager.GetCount<TransitAccountPicture, int, AccountPicturesQueryOptions>( AccountId, po, SessionManager.AccountService.GetAccountPicturesCount); picturesView_OnGetDataSource(sender, e); picturesView.DataBind(); noPictures.Visible = (picturesView.Items.Count == 0); }
void GetPicturesData(object sender, EventArgs e) { AccountPicturesQueryOptions ap = new AccountPicturesQueryOptions(); ap.Hidden = false; picturesView.CurrentPageIndex = 0; picturesView.VirtualItemCount = SessionManager.GetCount <TransitAccountPicture, int, AccountPicturesQueryOptions>( AccountPicture.AccountId, ap, SessionManager.AccountService.GetAccountPicturesCount); picturesView_OnGetDataSource(sender, e); picturesView.DataBind(); }
public List<TransitAccountPicture> GetAccountPictures(string ticket, int id, AccountPicturesQueryOptions qopt, ServiceQueryOptions options) { List<ICriterion> expressions = new List<ICriterion>(); expressions.Add(Expression.Eq("Account.Id", id)); if (qopt != null && !qopt.Hidden) expressions.Add(Expression.Eq("Hidden", false)); Order[] orders = { Order.Asc("Position"), Order.Desc("Created") }; return WebServiceImpl<TransitAccountPicture, ManagedAccountPicture, AccountPicture>.GetList( ticket, options, expressions.ToArray(), orders); }
public int GetAccountPicturesCount(string ticket, int id, AccountPicturesQueryOptions qopt) { StringBuilder query = new StringBuilder(); query.AppendFormat("WHERE AccountPicture.Account.Id = {0}", id); if (qopt != null && !qopt.Hidden) query.Append(" AND AccountPicture.Hidden = 0"); return WebServiceImpl<TransitAccountPicture, ManagedAccountPicture, AccountPicture>.GetCount( ticket, query.ToString()); }