private string GetTitleFromDays(int days, DueDateType dueDateType, DateTime dueDate) { if (days == 0) { return($"A request for help you accepted is due today ({dueDate.FormatDate(DateTimeFormat.ShortDateFormat)})"); } else if (days == 1) { return($"A request for help you accepted is due tomorrow ({dueDate.FormatDate(DateTimeFormat.ShortDateFormat)})"); } else { switch (dueDateType) { case DueDateType.Before: return($"A request for help you accepted is due within {days} days"); case DueDateType.On: return($"A request for help you accepted is due in {days} days"); default: throw new Exception("Unknown title"); } } }
public static bool HasDate(this DueDateType dueDateType) { return(dueDateType switch { DueDateType.Before => false, DueDateType.On => true, DueDateType.SpecificStartTime => true, DueDateType.SpecificStartAndEndTimes => true, _ => throw new ArgumentException($"Unexpected DueDateType value: {dueDateType}", nameof(dueDateType)) });
public static string JobDueDate(this DateTime dateTimeDue, DueDateType dueDateType) { return(new DateTimeUtils(new MockableDateTime()).JobDueDate(dateTimeDue, dueDateType)); }
public InvoiceType() { this.invoiceLineField = new ObservableCollection<InvoiceLineType>(); this.legalMonetaryTotalField = new MonetaryTotalType(); this.withholdingTaxTotalField = new ObservableCollection<TaxTotalType>(); this.taxTotalField = new ObservableCollection<TaxTotalType>(); this.paymentAlternativeExchangeRateField = new ExchangeRateType(); this.paymentExchangeRateField = new ExchangeRateType(); this.pricingExchangeRateField = new ExchangeRateType(); this.taxExchangeRateField = new ExchangeRateType(); this.allowanceChargeField = new ObservableCollection<AllowanceChargeType>(); this.prepaidPaymentField = new ObservableCollection<PaymentType>(); this.paymentTermsField = new ObservableCollection<PaymentTermsType>(); this.paymentMeansField = new ObservableCollection<PaymentMeansType>(); this.deliveryTermsField = new DeliveryTermsType(); this.deliveryField = new ObservableCollection<DeliveryType>(); this.taxRepresentativePartyField = new PartyType(); this.sellerSupplierPartyField = new SupplierPartyType(); this.buyerCustomerPartyField = new CustomerPartyType(); this.payeePartyField = new PartyType(); this.accountingCustomerPartyField = new CustomerPartyType(); this.accountingSupplierPartyField = new SupplierPartyType(); this.signatureField = new ObservableCollection<SignatureType>(); this.projectReferenceField = new ObservableCollection<ProjectReferenceType>(); this.additionalDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.contractDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.originatorDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.statementDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.receiptDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.despatchDocumentReferenceField = new ObservableCollection<DocumentReferenceType>(); this.billingReferenceField = new ObservableCollection<BillingReferenceType>(); this.orderReferenceField = new OrderReferenceType(); this.invoicePeriodField = new ObservableCollection<PeriodType>(); this.buyerReferenceField = new BuyerReferenceType(); this.lineCountNumericField = new LineCountNumericType(); this.accountingCostField = new AccountingCostType(); this.accountingCostCodeField = new AccountingCostCodeType(); this.paymentAlternativeCurrencyCodeField = new PaymentAlternativeCurrencyCodeType(); this.paymentCurrencyCodeField = new PaymentCurrencyCodeType(); this.pricingCurrencyCodeField = new PricingCurrencyCodeType(); this.taxCurrencyCodeField = new TaxCurrencyCodeType(); this.documentCurrencyCodeField = new DocumentCurrencyCodeType(); this.taxPointDateField = new TaxPointDateType(); this.noteField = new ObservableCollection<NoteType>(); this.invoiceTypeCodeField = new InvoiceTypeCodeType(); this.dueDateField = new DueDateType(); this.issueTimeField = new IssueTimeType(); this.issueDateField = new IssueDateType(); this.uUIDField = new UUIDType(); this.copyIndicatorField = new CopyIndicatorType(); this.idField = new IDType(); this.profileExecutionIDField = new ProfileExecutionIDType(); this.profileIDField = new ProfileIDType(); this.customizationIDField = new CustomizationIDType(); this.uBLVersionIDField = new UBLVersionIDType(); this.uBLExtensionsField = new ObservableCollection<UBLExtensionType>(); }
/// <summary> /// Initializes a new instance of the <see cref="TaskList" /> class. /// </summary> /// <param name="id">id.</param> /// <param name="title">title.</param> /// <param name="requester">requester.</param> /// <param name="requestTicketNumber">requestTicketNumber.</param> /// <param name="requesterDisplayName">requesterDisplayName.</param> /// <param name="dueDate">dueDate.</param> /// <param name="dueDateType">dueDateType.</param> /// <param name="serviceType">serviceType.</param> /// <param name="createdTime">createdTime.</param> /// <param name="taskType">taskType.</param> /// <param name="status">status.</param> public TaskList(Guid id = default(Guid), string title = default(string), string requester = default(string), int requestTicketNumber = default(int), string requesterDisplayName = default(string), DateTime?dueDate = default(DateTime?), DueDateType dueDateType = default(DueDateType), ServiceType serviceType = default(ServiceType), DateTime createdTime = default(DateTime), TaskType taskType = default(TaskType), TaskResult status = default(TaskResult)) { this.Id = id; this.Title = title; this.Requester = requester; this.RequestTicketNumber = requestTicketNumber; this.RequesterDisplayName = requesterDisplayName; this.DueDate = dueDate; this.DueDateType = dueDateType; this.ServiceType = serviceType; this.CreatedTime = createdTime; this.TaskType = taskType; this.Status = status; }