Esempio n. 1
0
		public AddressViewModel(Address address)
		{
			if (address != null)
			{
				ZIP = address.ZIP;
				City = address.City;
				State = address.State;
				Street = address.Street;
				Street2 = address.Street2;
			}
		}
Esempio n. 2
0
		public static MvcHtmlString AddressMultiline(this HtmlHelper htmlHelper, Address address, int maxLength, bool displayState = true, bool displayZip = true)
		{
			StringBuilder sb = new StringBuilder();
			sb.Append(htmlHelper.LengthLimitedText(address.Street, maxLength));
			sb.Append(",<br />");
			if (!string.IsNullOrEmpty(address.Street2))
			{
				sb.Append(htmlHelper.LengthLimitedText(address.Street2, maxLength));
				sb.Append(",<br />");
			}
			sb.Append(htmlHelper.LengthLimitedText(address.GetDisplayView(displayStreet: false, displayCounty: false, displayState: displayState, displayZip: displayZip), maxLength));
			return new MvcHtmlString(sb.ToString());
		}
Esempio n. 3
0
		private XmlDocument CreateAvmXmlDocument(int orderId, Address propertyAddress)
		{
			var xmlDocument = new XmlDocument();
			var declaration = xmlDocument.CreateXmlDeclaration("1.0", "utf-8", null);
			xmlDocument.InsertBefore(declaration, xmlDocument.DocumentElement);
			var fullAddress = xmlDocument.CreateElement("fulladdress");
			fullAddress.InnerText = propertyAddress.Street;
			var city = xmlDocument.CreateElement("city");
			city.InnerText = propertyAddress.City;
			var state = xmlDocument.CreateElement("state");
			state.InnerText = propertyAddress.State;
			var zip = xmlDocument.CreateElement("zip");
			zip.InnerText = propertyAddress.ZIP;
			var address = xmlDocument.CreateElement("address");
			address.AppendChild(city);
			address.AppendChild(state);
			address.AppendChild(zip);
			address.AppendChild(fullAddress);
			var info = xmlDocument.CreateElement("info");
			var property = xmlDocument.CreateElement("property");
			property.AppendChild(address);
			property.AppendChild(info);
			var userid = xmlDocument.CreateElement("userid");
			userid.InnerText = _configurationHelper.AvmRequestLogin;
			var password = xmlDocument.CreateElement("password");
			password.InnerText = _configurationHelper.AvmRequestPassword;
			var account = xmlDocument.CreateElement("account");
			account.AppendChild(userid);
			account.AppendChild(password);
			var metainfo = xmlDocument.CreateElement("metainfo");
			metainfo.SetAttribute("name", "transactionid");
			metainfo.SetAttribute("value", orderId.ToString());
			var requestheader = xmlDocument.CreateElement("requestheader");
			requestheader.AppendChild(metainfo);
			requestheader.AppendChild(account);
			var request = xmlDocument.CreateElement("request");
			request.SetAttribute("type", "valuerange");
            request.SetAttribute("pdfLink", "true");
			request.AppendChild(requestheader);
			request.AppendChild(property);
			var avmx1 = xmlDocument.CreateElement("avmx");
			avmx1.SetAttribute("xmlns:xsi", DVS.Logic.Constants.Avm.AvmAttributeXsi);
			avmx1.SetAttribute("xmlns:xsd", DVS.Logic.Constants.Avm.AvmAttributeXsd);
			avmx1.AppendChild(request);
			xmlDocument.AppendChild(avmx1);
			return xmlDocument;
		}
Esempio n. 4
0
		public AddressWithCountyViewModel(Address address) :
			base(address)
		{
			County = address.County;
		}