public void SendEmail()
        {
            var url = "http://kendorwood.com/com-link.php";
            var request = (HttpWebRequest)HttpWebRequest.Create(url);
            request.Method = "POST";

            // TODO:  Get valid values for TO, FROM, SUBJECT, MESSAGE (order content)
            // Name, Email, Phone, Notes
            var key = "Y29yZXktcGVya2lucy1lZGRpZS1kaWxsb24tcHJvZHVjdGlvbnM=";
            var from = Email;    // customer
            var to = "*****@*****.**";     // kendor
            //var to = "*****@*****.**";     // kendor
            var subject = string.Format("Kendor Wood - {0}", DateTime.Now.ToShortDateString());
            var message = GetHtmlMessage();

            request.Headers["ENC_KEY"] = key;
            request.Headers["TO"] = to;
            request.Headers["FROM"] = from;

            request.ContentType = "application/x-www-form-urlencoded";
            postData = string.Format("SUBJECT={0}&MESSAGE={1}", subject, message);

            request.ContentLength = postData.Length;
            request.BeginGetRequestStream(RequestCallback, request);

            var newOrdLiVM = new OrderLineItemViewModel();
            var resetMsg = new GenericMessage<OrderLineItemViewModel>(newOrdLiVM, "Reset", newOrdLiVM);
            Messenger.Default.Send(resetMsg);
        }
Ejemplo n.º 2
0
 private OrderLineItemViewModel NewOrderLineItemVM()
 {
     var orderLineItemViewModel = new OrderLineItemViewModel();
     orderLineItemViewModel.Inner = Inners[0] as Inner;
     orderLineItemViewModel.Outer = Outers[0] as Outer;
     orderLineItemViewModel.Panel = Panels[0] as Kendor_Website.Model.Panel;
     orderLineItemViewModel.SelectedSpecies = Species[0] as Species;
     orderLineItemViewModel.Style = Styles[0] as Kendor_Website.Model.Style;
     orderLineItemViewModel.WidthInches = Fractions[0];
     orderLineItemViewModel.HeightInches = Fractions[0];
     orderLineItemViewModel.Moulding = Mouldings.One;
     orderLineItemViewModel.MouldingOne = "2 1/4" + "\"";
     orderLineItemViewModel.MouldingTwo = "3 " + "\"";
     return orderLineItemViewModel;
 }
Ejemplo n.º 3
0
 public string GetDoorImageLocation(OrderLineItemViewModel livm)
 {
     List<IParameter> parms = new List<IParameter>();
     parms.Add(livm.SelectedSpecies);
     parms.Add(livm.Inner);
     parms.Add(livm.Outer);
     parms.Add(livm.Panel);
     parms.Add(livm.Style);
     return DoorImageFactory.Instance.GetDoorImage(parms);
 }