コード例 #1
0
ファイル: AciManagerTest.cs プロジェクト: evkap/DVS
		/// <summary>
		///A test for ValidateAciXml
		///</summary>

		private int CreateOrder(int formId)
		{
			base.InitDbContext();
			IOrderRepository orderRepository = new OrderRepository(this.DbFactory);
			ICommitProvider commitProvider = new CommitProvider(this.DbFactory);
			int rand = new Random().Next(0, 100000);
			var loanAndContactInfo = new OrderLoanAndContactInfo
			{
				Contacts = new List<OrderContact>() { new OrderContact { ContactRoleId = 2, Email = String.Format("mial{0}@mail.com", rand), Name = "Name" + rand, Phone = "123" + rand } },
				LoanPurposeTypeId = 4,
				GFEDate = DateTime.Now.AddDays(100),
				GFEAmount = 9999.99,
			};

			var generalInfo = new OrderGeneralInfo
			{
				BorrowerFirstName = "Test" + rand,
				BorrowerLastName = "Test" + rand,
				LoanNumber = "100" + rand,
				PropertyAddress = new Address { City = "New York", County = "Test", State = "NY", ZIP = "12345", Street = "Wallstreet" }
			};

			var appraisalInfo = new OrderAppraisalInfo
			{
				PropertyTypeId = 3,
				OccupancyTypeId = 1,
				AppraisalTypeId = 1,
				Rush = true,
				SecondDuplicateAppraisal = true,
				LoanType = LoanType.Conventional,
				NumberUnits = 7,
				AppraisalType = AppraisalType.Appraisal,
				AppraisalForm = formId,
				ReviewForm = 0
			};

			Order order = new Order
			{
				OrderPublicId = "000" + rand,
				AppraiserOrderDeliveryType = 3,
				CreationDate = DateTime.Now,
				LoanAndContactInfo = loanAndContactInfo,
				AppraisalInfo = appraisalInfo,
				CreatedByClientUserId = 1,
				OrderStatusId = OrderStatus.PendingAssignment.ToString(),
				DueDate = DateTime.Now.AddDays(10),
				Latitude = 43,
				Longitude = -73,
				GeneralInfo = generalInfo
			};
			orderRepository.Add(order);
			commitProvider.Commit();
			return order.Id;
		}
コード例 #2
0
ファイル: AppraisalFormsService.cs プロジェクト: evkap/DVS
		public string GetFormTitle(OrderAppraisalInfo appraisalInfo, bool useFormNameAbbreviation = false)
		{
			if (appraisalInfo.AppraisalType == AppraisalType.Appraisal && appraisalInfo.AppraisalForm.HasValue)
			{
				return GetFormTitle(appraisalInfo.AppraisalForm.Value, useFormNameAbbreviation);
			}
			if (appraisalInfo.AppraisalType == AppraisalType.Review && appraisalInfo.ReviewForm.HasValue)
			{
				return GetFormTitle(appraisalInfo.ReviewForm.Value, useFormNameAbbreviation);
			}
			throw new ArgumentOutOfRangeException("Unknown appraisal type:" + appraisalInfo.AppraisalType.ToString());
		}
コード例 #3
0
		public void FillModel(OrderAppraisalInfo model)
		{
			if (model != null)
			{
				if (LoanType != null) model.LoanType = LoanType.Value;

				model.PropertyTypeId = PropertyType;
				model.OccupancyTypeId = Occupancy;
				model.FHACaseNumber = FHACaseNumber;
				model.NumberUnits = NumberUnits;
				if (AppraisalType != null) model.AppraisalType = AppraisalType.Value;
				model.Rush = IsRush;
				model.SecondDuplicateAppraisal = IsSecondAppraisalOrDuplicateAppraisal;
				model.AppraisalForm = AppraisalForm;
				model.DuplicateOrderId = DuplicateOrderId;
				model.ReviewForm = ReviewForm;
				model.FileId = FileId;
				model.SupplementalREOAddendum = IsSupplementalREOAddendum;
			}
		}
コード例 #4
0
		public OrderAppraisalInfoViewModel(OrderAppraisalInfo model)
			: this()
		{
			if (model != null)
			{
				LoanType = model.LoanType;
				PropertyType = model.PropertyTypeId;
				Occupancy = model.OccupancyTypeId;
				FHACaseNumber = model.FHACaseNumber;
				NumberUnits = model.NumberUnits;
				AppraisalType = model.AppraisalType;
				IsRush = model.Rush;
				IsSecondAppraisalOrDuplicateAppraisal = model.SecondDuplicateAppraisal;
				IsSupplementalREOAddendum = model.SupplementalREOAddendum;
				AppraisalForm = model.AppraisalForm;
				DuplicateOrderId = model.DuplicateOrderId;
				ReviewForm = model.ReviewForm;
				FileId = model.FileId;
			}
		}
コード例 #5
0
ファイル: OrderService.cs プロジェクト: evkap/DVS
		private string GetApprasalFormString(OrderAppraisalInfo orderAppraisalInfo)
		{
			var datasource = _appFormsService.GetAppraisalFormsData(orderAppraisalInfo.AppraisalType.Value, orderAppraisalInfo.LoanType.Value, orderAppraisalInfo.PropertyTypeId.Value, orderAppraisalInfo.OccupancyTypeId.Value);
			switch (orderAppraisalInfo.AppraisalType)
			{
				case AppraisalType.Appraisal:
					return datasource[orderAppraisalInfo.AppraisalForm.ToString()];
				case AppraisalType.Review:
					return datasource[orderAppraisalInfo.ReviewForm.ToString()];
				default: throw new ArgumentOutOfRangeException("Unknown appraisal type:" + orderAppraisalInfo.AppraisalType.ToString());
			}
		}