Example #1
0
        public async Task <IList <Certificate> > IndexData(string customerCode         = null,
                                                           string customerName         = null,
                                                           string premise              = null,
                                                           string postal               = null,
                                                           string serialNo             = null,
                                                           DateTimeOffset?issuedOnFrom = null,
                                                           DateTimeOffset?issuedOnTo   = null,
                                                           [FromQuery] IList <CertificateDeliveryStatus> status = null)
        {
            var result = await _certificateService.CertDeliveryFilter(new CertificateDeliveryOptions
            {
                CustomerCode = customerCode,
                CustomerName = customerName,
                Premise      = premise,
                Postal       = postal,
                SerialNo     = serialNo,
                IssuedOnFrom = issuedOnFrom,
                IssuedOnTo   = issuedOnTo,
                Status       = (status != null && status.Count > 0) ? status : new List <CertificateDeliveryStatus>
                {
                    CertificateDeliveryStatus.Pending
                },
            });

            return(result);
        }
Example #2
0
 public async Task <IList <Certificate> > GetDeliveryCertificates(string customerCode,
                                                                  string customerName, string postal, string premise, string serialNo,
                                                                  DateTimeOffset?issuedOnFrom, DateTimeOffset?issuedOnTo,
                                                                  [FromQuery] CertificateDeliveryStatus[] status)
 {
     return(await _certificateService.CertDeliveryFilter(new CertificateDeliveryFilter
     {
         CustomerCode = customerCode,
         CustomerName = customerName,
         IssuedOnFrom = issuedOnFrom,
         IssuedOnTo = issuedOnTo,
         Postal = postal,
         Premise = premise,
         SerialNo = serialNo,
         Status = status
     }));
 }