Пример #1
0
        public void PreCheckSAPCompany(SAPCompanyVM vm, Action <SAPCompanyResp> callback)
        {
            SAPCompanyInfo data = vm.ConvertVM <SAPCompanyVM, SAPCompanyInfo>();

            data.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InvoiceService/SAP/PreCheckSAPCompany";

            restClient.Query <SAPCompanyResp>(relativeUrl, data, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(args.Result);
            });
        }
Пример #2
0
        public void CreateSAPCompany(SAPCompanyVM vm, int alertFlag, Action callback)
        {
            SAPCompanyInfo entity = vm.ConvertVM <SAPCompanyVM, SAPCompanyInfo>();

            entity.CompanyCode = CPApplication.Current.CompanyCode;
            SAPCompanyReq data = new SAPCompanyReq();

            data.SAPCompany = entity;
            data.AlertFlag  = alertFlag;
            string relativeUrl = "/InvoiceService/SAP/CreateSAPCompany";

            restClient.Create <SAPCompanyInfo>(relativeUrl, data, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback();
            });
        }