Пример #1
0
 public async Task <LetterTemplate> GetTemplate(LetterType type)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri($"/api/letter/template/{(int)type}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <LetterTemplate>());
 }
Пример #2
0
 public Task <IList <Cluster> > Query()
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/Cluster/query")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <IList <Cluster> >());
 }
Пример #3
0
 public Task <byte[]> Download(Guid guid)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri($"/api/file/{guid}")
            .AddInterceptor(new ResponseAsByteInterceptor())
            .Execute <byte[]>());
 }
Пример #4
0
 public Task <List <Settings> > GetSettings()
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri($"/api/settings")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <List <Settings> >());
 }
Пример #5
0
 public async Task <ChecklistHistory> GetByID(long id)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri($"/api/checklist/{id}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <ChecklistHistory>());
 }
Пример #6
0
 public Task <string> Generate(CodeType type)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/code/generate")
            .AddParam("type", $"{(int)type}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <string>());
 }
Пример #7
0
 public async Task <IList <Notification> > List(DateTimeOffset?from)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri("/api/notification/list")
            .AddParam("from", from?.UtcDateTime.ToString())
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <IList <Notification> >());
 }
Пример #8
0
 public Task <Person> GetPersonByAltID(string altID)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/person/find")
            .AddParam("altID", altID)
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Person>());
 }
Пример #9
0
        public async Task <IList <Premise> > List(Guid?customerID)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/premise/query")
                          .AddParam("customerID", $"{customerID.ToString()}")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            return(await builder.Execute <IList <Premise> >());
        }
Пример #10
0
 public async Task <string> UpdateAll(IList <Menu> menus)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri("/api/menu/list")
            .Method(HttpMethod.Put)
            .Content(new JsonContent(menus))
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <string>());
 }
Пример #11
0
 public Task <Notes> AddNotes(Notes notes)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/notes")
            .Method(HttpMethod.Post)
            .Content(new JsonContent(notes))
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Notes>());
 }
Пример #12
0
        public async Task <EmailTemplate> GetTemplate(EmailTemplateType type)
        {
            var a = $"/api/email/template/{(int)type}";
            var b = $"/api/email/template/{(int)type}";

            return(await _requestProvider.BuildUpon(_url)
                   .Uri($"/api/email/template/{(int)type}")
                   .AddInterceptor(new JsonDeserializerInterceptor())
                   .Execute <EmailTemplate>());
        }
Пример #13
0
 public Task <Model.Attendee> GetByID(long id)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri($"/api/attendee/{id}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Model.Attendee>());
 }
Пример #14
0
 public Task <IList <Bill> > List(BillFilter filter)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/bill/list")
            .AddParam("id", filter.ID != null ? $"{filter.ID.Value}" : null)
            .AddParam("requestID", filter.RequestID != null ? $"{filter.RequestID.Value}" : null)
            .AddParam("refNo", filter.RefNo)
            .AddParam("invoiceNo", filter.InvoiceNo)
            .AddParam("refID", filter.RefID)
            .AddParam("customerName", filter.CustomerName)
            .AddParam("status", filter.Status != null ? $"{filter.Status}" : null)
            .AddParam("from", filter.From?.UtcDateTime.ToString())
            .AddParam("to", filter.To?.UtcDateTime.ToString())
            .AddParam("type", filter.Type != null ? $"{filter.Type}" : null)
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <IList <Bill> >());
 }
Пример #15
0
 public async Task <IList <Model.Master> > GetMasterList(Model.MasterType type)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri($"/api/Master")
            .AddParam("type", $"{(int)type}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <IList <Model.Master> >());
 }
Пример #16
0
 public async Task <AuthResponse> Authenticate(AuthParam param)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri("/api/auth")
            .Method(HttpMethod.Post)
            .Content(new JsonContent(param))
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <AuthResponse>());
 }
Пример #17
0
        public Task <IList <JobOrder> > Query(JobOrderOptions options)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/joborder/query")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            if (options.ID > 0L)
            {
                builder.AddParam("id", $"{options.ID}");
            }

            if (!string.IsNullOrEmpty(options.Customer?.Trim()))
            {
                builder.AddParam("customer", options.Customer.Trim());
            }

            if (!string.IsNullOrEmpty(options.Premise?.Trim()))
            {
                builder.AddParam("premise", options.Premise.Trim());
            }

            if (options.Status?.Any() ?? false)
            {
                for (int i = 0; i < options.Status.Count; i++)
                {
                    builder.AddParam($"status[{i}]", $"{(int)options.Status[i]}");
                }
            }

            if (options.Type?.Any() ?? false)
            {
                for (int i = 0; i < options.Type.Count; i++)
                {
                    builder.AddParam($"type[{i}]", $"{(int)options.Type[i]}");
                }
            }

            if (options.AssignedTo?.Any() ?? false)
            {
                for (int i = 0; i < options.AssignedTo.Count; i++)
                {
                    builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString());
                }
            }
            builder.AddParam("from", options.From?.UtcDateTime.ToString());
            builder.AddParam("to", options.To?.UtcDateTime.ToString());

            return(builder.Execute <IList <JobOrder> >());
        }
Пример #18
0
        public Task <IList <CertificateBatch> > GetCertificateBatch(CertificateBatchOptions options,
                                                                    bool full)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/certificate/batch/list")
                          .AddInterceptor(new JsonDeserializerInterceptor())
                          .AddParam("includeAll", $"{full}")
                          .AddParam("from", options.From.UtcDateTime.ToString());

            if (options.Status?.Any() ?? false)
            {
                for (int i = 0; i < options.Status.Count; i++)
                {
                    var status = options.Status[i];
                    builder.AddParam($"status[{i}]", $"{(int)status}");
                }
            }

            return(builder.Execute <IList <CertificateBatch> >());
        }
Пример #19
0
 public Task <IList <Bank> > List(BankFilter filter)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/bank/list")
            .AddParam("accountName", filter.AccountName)
            .AddParam("accountNo", filter.AccountNo)
            .AddParam("branchCode", filter.BranchCode)
            .AddParam("bankName", filter.BankName)
            .AddParam("ddaStatus", filter.DDAStatus?.ToString())
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <IList <Bank> >());
 }
Пример #20
0
        public Task <IList <StatisticsPerformance> > Performance(IList <string> keys,
                                                                 DateTimeOffset?from = null,
                                                                 DateTimeOffset?to   = null)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri($"/api/statistics/performance")
                          .AddInterceptor(new JsonDeserializerInterceptor())
                          .AddParam("from", from?.UtcDateTime.ToString())
                          .AddParam("to", to?.UtcDateTime.ToString());

            if (keys?.Any() ?? false)
            {
                for (int i = 0; i < keys.Count; i++)
                {
                    string key = keys[i];
                    builder.AddParam($"keys[{i}]", key);
                }
            }

            return(builder.Execute <IList <StatisticsPerformance> >());
        }
Пример #21
0
 public Task <Certificate360> GetByID(long id)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri($"/api/certificate360/{id}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Certificate360>());
 }
Пример #22
0
 public Task <Payment> GetPaymentByID(long id)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri($"/api/payment/{id}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Payment>());
 }
Пример #23
0
 public async Task <Identity> GetIdentityByID(Guid id)
 {
     return(await _requestProvider.BuildUpon(_url)
            .Uri($"/api/identity/{id}")
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Identity>());
 }
Пример #24
0
        public Task <IList <TransactionCode> > Query(TransactionCode options)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/TransactionCode/query")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            if (!string.IsNullOrEmpty(options.Code?.Trim()))
            {
                builder.AddParam("Code", $"{options.Code}");
            }

            if (!string.IsNullOrEmpty(options.GLEntry?.Trim()))
            {
                builder.AddParam("GLEntry", options.GLEntry.Trim());
            }

            if (!string.IsNullOrEmpty(options.Text?.Trim()))
            {
                builder.AddParam("Text", options.Text.Trim());
            }

            return(builder.Execute <IList <TransactionCode> >());
        }
Пример #25
0
 public Task <RFA> Submit(RFA data)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/rfa")
            .Method(HttpMethod.Post)
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Content(new JsonContent(data))
            .Execute <RFA>());
 }
Пример #26
0
        public Task <IndexModel> Search(HalalLibraryOptions options, int offsetRows, int nextRows)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/ingredient/query")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            builder.AddParam("nextRows", $"{nextRows}");
            builder.AddParam("offsetRows", $"{offsetRows}");

            if (!string.IsNullOrEmpty(options.Name))
            {
                builder.AddParam("Name", options.Name.Trim());
            }

            if (!string.IsNullOrEmpty(options.Brand))
            {
                builder.AddParam("Brand", options.Brand.Trim());
            }

            if (!string.IsNullOrEmpty(options.Supplier))
            {
                builder.AddParam("Supplier", options.Supplier.Trim());
            }

            if (!string.IsNullOrEmpty(options.CertifyingBody))
            {
                builder.AddParam("CertifyingBody", options.CertifyingBody.Trim());
            }

            if (!string.IsNullOrEmpty(options.VerifiedBy))
            {
                builder.AddParam("VerifiedBy", options.VerifiedBy.Trim());
            }

            if (options.Status != null)
            {
                builder.AddParam("Status", $"{(int)options.Status}");
            }

            if (options.RiskCategory != null)
            {
                builder.AddParam("RiskCategory", $"{(int)options.RiskCategory}");
            }

            return(builder.Execute <IndexModel>());
        }
Пример #27
0
        public Task <IList <Request> > Query(RequestOptions options)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/request/query")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            if (options.ID > 0L)
            {
                builder.AddParam("id", $"{options.ID}");
            }

            if (options.CustomerID.HasValue)
            {
                builder.AddParam("customerId", $"{options.CustomerID}");
            }

            if (!string.IsNullOrEmpty(options.RefID?.Trim()))
            {
                builder.AddParam("refID", options.RefID.Trim());
            }

            if (!string.IsNullOrEmpty(options.CustomerCode?.Trim()))
            {
                builder.AddParam("customerCode", options.CustomerCode.Trim());
            }

            if (!string.IsNullOrEmpty(options.Customer?.Trim()))
            {
                builder.AddParam("customer", options.Customer.Trim());
            }

            if (!string.IsNullOrEmpty(options.Premise?.Trim()))
            {
                builder.AddParam("premise", options.Premise.Trim());
            }

            if (options.Status?.Any() ?? false)
            {
                for (int i = 0; i < options.Status.Count; i++)
                {
                    builder.AddParam($"status[{i}]", $"{(int)options.Status[i]}");
                }
            }

            if (options.Type?.Any() ?? false)
            {
                for (int i = 0; i < options.Type.Count; i++)
                {
                    builder.AddParam($"type[{i}]", $"{(int)options.Type[i]}");
                }
            }

            if (options.RFAStatus != null)
            {
                builder.AddParam($"rfaStatus", $"{(int)options.RFAStatus}");
            }

            if (options.AssignedTo?.Any() ?? false)
            {
                for (int i = 0; i < options.AssignedTo.Count; i++)
                {
                    builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString());
                }
            }

            if (options.EscalateStatus != null)
            {
                builder.AddParam($"escalateStatus", $"{(int)options.EscalateStatus}");
            }

            if (options.StatusMinor?.Any() ?? false)
            {
                for (int i = 0; i < options.StatusMinor.Count; i++)
                {
                    builder.AddParam($"statusMinor[{i}]", $"{(int)options.StatusMinor[i]}");
                }
            }

            builder.AddParam("from", options.From?.UtcDateTime.ToString())
            .AddParam("to", options.To?.UtcDateTime.ToString());

            return(builder.Execute <IList <Request> >());
        }
Пример #28
0
 public Task <Customer> GetCustomerContactInfo(string name, string altID)
 {
     return(_requestProvider.BuildUpon(_url)
            .Uri("/api/customer/find")
            .AddParam("name", name)
            .AddParam("altID", altID)
            .AddInterceptor(new JsonDeserializerInterceptor())
            .Execute <Customer>());
 }
Пример #29
0
        public Task <IList <Case> > Query(CaseOptions options)
        {
            var builder = _requestProvider.BuildUpon(_url)
                          .Uri("/api/case/list")
                          .AddInterceptor(new JsonDeserializerInterceptor());

            if (options.ID > 0L)
            {
                builder.AddParam("id", $"{options.ID}");
            }

            if (!string.IsNullOrEmpty(options.Source.ToString()))
            {
                builder.AddParam("source", options.Source.ToString());
            }

            if (options.OffenceType?.Any() ?? false)
            {
                for (int i = 0; i < options.OffenceType.Count; i++)
                {
                    builder.AddParam($"offenceType[{i}]", options.OffenceType[i].ToString());
                }
            }

            if (options.ManagedBy?.Any() ?? false)
            {
                for (int i = 0; i < options.ManagedBy.Count; i++)
                {
                    builder.AddParam($"managedBy[{i}]", options.ManagedBy[i].ToString());
                }
            }

            if (options.AssignedTo?.Any() ?? false)
            {
                for (int i = 0; i < options.AssignedTo.Count; i++)
                {
                    builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString());
                }
            }

            if (options.Status?.Any() ?? false)
            {
                for (int i = 0; i < options.Status.Count; i++)
                {
                    builder.AddParam($"status[{i}]", options.Status[i].ToString());
                }
            }

            builder.AddParam("from", options.From?.UtcDateTime.ToString())
            .AddParam("to", options.To?.UtcDateTime.ToString());

            return(builder.Execute <IList <Case> >());
        }