Portal

<back to all web services

BrowseAllPurchaseOrder

Requires Authentication
The following routes are available for this service:
POST/user/{userid}/allpurchaseorders
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Portal.ServiceDto;
using Portal.Common;

namespace Portal.Common
{
    public enum FilterOperator
    {
        NotSet = 0,
        Equal = 1,
        Greater = 2,
        Less = 3,
        GreaterOrEqual = 4,
        LessOrEqual = 5,
        NotEqual = 6,
        IsNull = 7,
        IsNotNull = 8,
        Like = 9,
        NotLike = 10,
        Begins = 11,
        Ends = 12,
        In = 13,
        Between = 14,
    }

    public enum GridSortDirection
    {
        None = 0,
        Asc = 1,
        Desc = 2,
    }

    public partial class GridViewColumnFilter
    {
        public virtual string FieldName { get; set; }
        public virtual string FilterValue { get; set; }
        public virtual FilterOperator Operator { get; set; }
    }

    public partial class GridViewColumnState
    {
        public virtual string FieldName { get; set; }
        public virtual GridSortDirection SortDirection { get; set; }
    }

    public partial class GridViewPagerState
    {
        public virtual int SkipRowCount { get; set; }
        public virtual int PageRowCount { get; set; }
    }

    public partial class GridViewState
    {
        public GridViewState()
        {
            ColumnFilters = new List<GridViewColumnFilter>{};
        }

        public virtual GridViewColumnState ColumnState { get; set; }
        public virtual List<GridViewColumnFilter> ColumnFilters { get; set; }
        public virtual GridViewPagerState PagerState { get; set; }
        public virtual bool IsReturnCount { get; set; }
    }

    public partial class PaginationResult<TModel>
    {
        public PaginationResult()
        {
            Items = new List<TModel>{};
        }

        public virtual int TotalRowCount { get; set; }
        public virtual List<TModel> Items { get; set; }
    }

    public enum ProcedureType
    {
        Competition = 0,
        Simplified = 1,
    }

    public enum TenderStatus
    {
        FirstRound = 0,
        SecondRound = 1,
        ThirdRound = 2,
        Successful = 3,
        UnSuccessful = 4,
        Revoked = 5,
    }

    public enum TenderType
    {
        Private = 0,
        Public = 1,
    }

}

namespace Portal.ServiceDto
{
    public partial class BrowseAllPurchaseOrder
        : PaginationRequestBase, IPost
    {
        public virtual int UserId { get; set; }
    }

    public partial class PaginationRequestBase
        : IGridView
    {
        public virtual GridViewState GridViewState { get; set; }
    }

    public partial class PaginationResponse<TenderSimple>
        : ResponseBase
    {
        public virtual PaginationResult<TenderSimple> Result { get; set; }
    }

    public partial class ResponseBase
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    public partial class TenderSimple
    {
        public virtual int TenderId { get; set; }
        public virtual string TenderIdentifier { get; set; }
        public virtual ProcedureType ProcedureType { get; set; }
        public virtual string Subject { get; set; }
        public virtual string TenderRoundName { get; set; }
        public virtual string SectionName { get; set; }
        public virtual DateTime? Deadline { get; set; }
        public virtual TenderType TenderType { get; set; }
        public virtual TenderStatus TenderStatus { get; set; }
        public virtual bool IsUnderPublish { get; set; }
        public virtual DateTime? PublishStartDateTime { get; set; }
        public virtual DateTime? PublishEndDateTime { get; set; }
        public virtual int? PublishedById { get; set; }
        public virtual bool IsProcurementEnabled { get; set; }
        public virtual bool IsComplianceEnabled { get; set; }
    }

}

C# BrowseAllPurchaseOrder DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /user/{userid}/allpurchaseorders HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"UserId":0,"GridViewState":{"ColumnState":{"FieldName":"String","SortDirection":0},"ColumnFilters":[{"FieldName":"String","FilterValue":"String","Operator":0}],"PagerState":{"SkipRowCount":0,"PageRowCount":0},"IsReturnCount":false}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Result":{"TotalRowCount":0,"Items":[{"Id":0,"PurchaseOrderIdentifier":"String","TenderIdentifier":"String","TenderUserId":0,"TenderId":0,"UserId":0,"SupplierUserId":0,"Buyer":"String","Subject":"String","Status":0,"ConfirmationDeadline":"0001-01-01T00:00:00.0000000","CancellationDateTime":"0001-01-01T00:00:00.0000000","IsCancelled":false}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}