コード例 #1
0
        public async Task<dynamic> GetModellDescription()
        {
            var model = new LateInvoiceDoc
            {
                CustomerName = "",
                PropertyName = "",
                CustomerAddress = "",
                CustomerZipCity = "",
                CustomerTel = "",
                CustomerFax = "",
                CurrentDate = DateTime.UtcNow,
                QuotationNumber = "",
                QuotationPurpose = "",
                InvoiceNumber = "",
                InvoiceAmount = 0.0,
                EndOfWorkDate = DateTime.Now,
                LateDays = 0,
                DueToPay = 0,
                PartialPaymentsTotal = 0
            };

            var result = new
            {
                ModellDescription = GetProperties(model),
                ConditionsModellDescription = GetProperties(new ProjectInvoice())
            };
            return result;
        }
コード例 #2
0
ファイル: ProjectsManager.cs プロジェクト: PUG-IT/06Etanche
 public async Task<ActionResult> CheckIfProjectExists(string currentProjectId, string quotationNumber)
 {
     var companyId = (await _dbContext.ProjectsListAggregated.FirstOrDefaultAsync(p => p.Id == currentProjectId))?.CompanyId;
     var item = await _dbContext.ProjectsListAggregated.FirstOrDefaultAsync(p => p.Id != currentProjectId && p.CompanyId == companyId && p.QuotationNumber == quotationNumber);
     var result = new
     {
         SearchParams = new[] { $"quotationNumber:{quotationNumber}" },
         FoundItems = item == null ? null : new[] { item }
     };
     return ActionResult.Success(result);
 }