Ejemplo n.º 1
0
        public void SendOrderRequest(OrderRequestViewModel model)
        {
            var template = GetTemplate("OrderRequest.aspx");
            var text = template.Apply(model);

            SendNotification(string.Format("{0} {1}", model.LastName, model.FirstName), BookingEmail, "Запрос на бронирование", text);
        }
Ejemplo n.º 2
0
        public void SendOrderRequest(OrderRequestViewModel model)
        {
            switch (model.ProtoName)
            {
                case "hotels":
                    var hotel = meridian.hotelsStore.Get(model.Id);
                    model.EntityTitle = hotel.title;
                    model.Link = Url.RouteUrl("HotelOne", new { hotel.id, entryName = hotel.title.TransliterateAndClear() }, Request.Url.Scheme);
                    break;
                case "resorts":
                    var resort = meridian.resortsStore.Get(model.Id);
                    model.EntityTitle = resort.title;
                    model.Link = Url.RouteUrl("ResortOne", new { resort.id, entryName = resort.title.TransliterateAndClear() }, Request.Url.Scheme);
                    break;
            }

            CreateMailer().SendOrderRequest(model);
        }
Ejemplo n.º 3
0
        public ActionResult SendOrderRequest(EntityViewModel entityViewModel)
        {
            var model = new OrderRequestViewModel
            {
                Id = entityViewModel.Entity.id,
                ProtoName = entityViewModel.Entity.ProtoName,
                FromDate = DateTime.Now.Date,
                ToDate = DateTime.Now.Date
            };

            return PartialView(model);
        }