Example #1
0
		private void SetOrderInfo(DVSUserDashboardItemViewModel model, Order order)
		{
			if (order.GeneralInfo != null)
			{
				model.BorrowerFirstName = order.GeneralInfo.BorrowerFirstName;
				model.BorrowerLastName = order.GeneralInfo.BorrowerLastName;
				model.LoanNumber = order.GeneralInfo.LoanNumber;
				model.PropertyAddress = order.GeneralInfo.PropertyAddress;
			}

			model.Broker = order.CreatedByClientUser.Company.Profile.IsBroker ? order.CreatedByClientUser.Company.CompanyName : string.Empty;
			model.LastActionDate = GetLastActionDate(order.Id);

			if (order.CreatedByClientUser.Company.Profile.IsBroker)
			{
				if (order.ClientCompany != null)
				{
					model.LenderClient = order.ClientCompany.CompanyName;
				}
				if (order.ClientCompanyBranche != null)
				{
					model.LenderClientBranch = order.ClientCompanyBranche.Name;
				}
			}
			else
			{
				model.LenderClient = order.CreatedByClientUser.Company.CompanyName;
				model.LenderClientBranch = order.CreatedByClientUser.Branch.Name;
			}

			model.OrderNumber = order.OrderPublicId;
			model.Status = order.OrderStatus;
		}
Example #2
0
		private DVSUserDashboardItemViewModel GetDashboardItem(DVSUserDashboardItem item)
		{
			var model = new DVSUserDashboardItemViewModel { OrderId = item.Order.Id, AppraiserOrderId = item.AppraiserOrderId };
			if (item.AppraiserUser != null)
			{
				model.AppraiserFirstName = item.AppraiserUser.User.FirstName;
				model.AppraiserLastName = item.AppraiserUser.User.LastName;
				model.AppraiserEmail = item.AppraiserUser.User.Email;
			}
			SetOrderInfo(model, item.Order);
			return model;
		}