コード例 #1
0
ファイル: BillingService.svc.cs プロジェクト: fwka1605/next
        public async Task <CountResult> DeleteByInputIdAsync(string SessionKey, long InputId, int UseLongTermAdvanceReceived,
                                                             int RegisterContractInAdvance, int UseDiscount, int LoginUserId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var billings = (await billingProcessor.GetByBillingInputIdAsync(InputId)).ToArray();
                var source = new BillingDeleteSource {
                    Ids = billings.Select(x => x.Id).ToArray(),
                    CompanyId = billings.First().CompanyId,
                    LoginUserId = LoginUserId,
                };

                var result = await billingProcessor.DeleteAsync(source, token);
                return new CountResult()
                {
                    Count = result, ProcessResult = new ProcessResult()
                    {
                        Result = true
                    }
                };
            }, logger));
        }