using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CAPI.Custom { /* Buyout Quote Type 1 All Items 1128 2 Non-Stock Only 1129 3 Selected Items 1137 Buyout Status 1 Quote Requested 1130 2 Quote Received 1131 Quote Status 1 Accepted 1126 2 Buyout 1124 3 Declined 1127 4 Draft 1123 5 Sent 1125 Supplier Pricelist Status 1 Current 1141 2 Archived 1142 3 Expired 1143 Yes/No 0 Yes 1073 0 No 1074 */ public interface IQuotesLookup { } public class LookupItem { public int Value { get; set; } public string Text { get; set; } } public class QuoteStatus : IQuotesLookup { public const int Accepted = 1126; public const int Buyout = 1124; public const int Declined = 1127; public const int Draft = 1123; public const int Sent = 1125; public static LookupItem[] GetItems => new LookupItem[] { new LookupItem { Text = nameof(Accepted), Value = Accepted }, new LookupItem { Text = nameof(Buyout), Value = Buyout }, new LookupItem { Text = nameof(Declined), Value = Declined }, new LookupItem { Text = nameof(Draft), Value = Draft }, new LookupItem { Text = nameof(Sent), Value = Sent }, }; }; public class BuyoutStatus : IQuotesLookup { public const int QuoteRequested = 1130; public const int QuoteReceived = 1131; public static LookupItem[] GetItems => new LookupItem[] { new LookupItem { Text = nameof(QuoteRequested).SplitPascalCase(), Value = QuoteRequested }, new LookupItem { Text = nameof(QuoteReceived).SplitPascalCase(), Value = QuoteReceived }, }; } public class BuyoutQuoteType : IQuotesLookup { public const int AllItems = 1128; public const int NonStockOnly = 1129; public const int SelectedItems = 1137; public static LookupItem[] GetItems => new LookupItem[] { new LookupItem { Text = nameof(AllItems).SplitPascalCase(), Value = AllItems }, new LookupItem { Text = "Non-Stock Only", Value = NonStockOnly }, new LookupItem { Text = nameof(SelectedItems).SplitPascalCase(), Value = SelectedItems }, }; } public class PriceListStatus { public const int Current = 1141; public const int Archived = 1142; public const int Expired = 1143; public static LookupItem[] GetItems => new LookupItem[] { new LookupItem { Text = nameof(Current), Value = Current }, new LookupItem { Text = nameof(Archived), Value = Archived }, new LookupItem { Text = nameof(Expired), Value = Expired }, }; } public class YesNo : IQuotesLookup { public const int Yes = 1073; public const int No = 1074; public static LookupItem[] GetItems => new LookupItem[] { new LookupItem { Text = nameof(Yes), Value = Yes }, new LookupItem { Text = nameof(No), Value = No }, }; } }