コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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();
 }
コード例 #4
0
    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);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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();
    }
コード例 #7
0
 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);
 }
コード例 #8
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();
    }
コード例 #9
0
ファイル: WebAccountService.cs プロジェクト: dblock/sncore
 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);
 }
コード例 #10
0
ファイル: WebAccountService.cs プロジェクト: dblock/sncore
 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());
 }