public void SetupOrderStatusCodes() { var orderStatusCodes = new List<OrderStatusCode>(); var orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Account Manager"; orderStatusCode.Level = 3; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AM"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Approver"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Conditional Approval"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CA"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete-Not Uploaded KFS"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CN"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("CP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Purchaser"; orderStatusCode.Level = 4; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("PR"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Requester"; orderStatusCode.Level = 1; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("RQ"); orderStatusCodes.Add(orderStatusCode); new FakeOrderStatusCodes(0, OrderStatusCodeRepository, orderStatusCodes, true); }
public void SetupValidOrderStatusCodes() { var statusCodes = new List <OrderStatusCode>(); var statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.AccountManager); statusCode.Name = "Account Manager"; statusCode.Level = 3; statusCode.IsComplete = false; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Approver); statusCode.Name = "Approver"; statusCode.Level = 2; statusCode.IsComplete = false; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.ConditionalApprover); statusCode.Name = "Conditional Approval"; statusCode.Level = 2; statusCode.IsComplete = false; statusCode.KfsStatus = false; statusCode.ShowInFilterList = false; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.CompleteNotUploadedKfs); statusCode.Name = "Complete-Not Uploaded KFS"; statusCode.Level = 5; statusCode.IsComplete = true; statusCode.KfsStatus = false; statusCode.ShowInFilterList = false; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Complete); statusCode.Name = "Complete"; statusCode.Level = 5; statusCode.IsComplete = true; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Cancelled); statusCode.Name = "Cancelled"; statusCode.Level = 5; statusCode.IsComplete = true; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Denied); statusCode.Name = "Denied"; statusCode.Level = 5; statusCode.IsComplete = true; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Purchaser); statusCode.Name = "Purchaser"; statusCode.Level = 4; statusCode.IsComplete = false; statusCode.KfsStatus = false; statusCode.ShowInFilterList = true; statusCodes.Add(statusCode); statusCode = new OrderStatusCode(); statusCode.SetIdTo(OrderStatusCode.Codes.Requester); statusCode.Name = "Requester"; statusCode.Level = 1; statusCode.IsComplete = false; statusCode.KfsStatus = false; statusCode.ShowInFilterList = false; statusCodes.Add(statusCode); new FakeOrderStatusCodes(0, OrderStatusCodeRepository, statusCodes, true); }
public void LoadOrderStatusCodes() { var orderStatusCodeRepository = new RepositoryWithTypedId <OrderStatusCode, string>(); var orderStatusCodes = new List <OrderStatusCode>(); var orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Account Manager"; orderStatusCode.Level = 3; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AM"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Approver"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Conditional Approval"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CA"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete-Not Uploaded KFS"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CN"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("CP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Purchaser"; orderStatusCode.Level = 4; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("PR"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Requester"; orderStatusCode.Level = 1; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("RQ"); orderStatusCodes.Add(orderStatusCode); foreach (var statusCode in orderStatusCodes) { orderStatusCodeRepository.EnsurePersistent(statusCode); } }
private void SetupData1() { var orderStatusCodes = new List <OrderStatusCode>(); var orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Account Manager"; orderStatusCode.Level = 3; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AM"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Approver"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("AP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Conditional Approval"; orderStatusCode.Level = 2; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CA"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete-Not Uploaded KFS"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("CN"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Complete"; orderStatusCode.Level = 5; orderStatusCode.IsComplete = true; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("CP"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Purchaser"; orderStatusCode.Level = 4; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = true; orderStatusCode.SetIdTo("PR"); orderStatusCodes.Add(orderStatusCode); orderStatusCode = new OrderStatusCode(); orderStatusCode.Name = "Requester"; orderStatusCode.Level = 1; orderStatusCode.IsComplete = false; orderStatusCode.KfsStatus = false; orderStatusCode.ShowInFilterList = false; orderStatusCode.SetIdTo("RQ"); orderStatusCodes.Add(orderStatusCode); new FakeOrderStatusCodes(0, OrderStatusCodesRepository, orderStatusCodes, true); }