Beispiel #1
0
        public ActionResult ShowForm()
        {
            var flexEvent = new FlexEventViewModel();

            var locations = LocationManager.Instance.Get(722);

            locations.Insert(0, new Location {
                ItemId = 0, Name = "==Please select a location=="
            });

            //flexEvent.ModuleId = ModuleContext.ModuleId;
            //flexEvent.Locations = locations;

            var list = new List <SelectListItem>();

            foreach (var loc in locations)
            {
                var item = new SelectListItem();
                item.Text  = loc.Name;
                item.Value = loc.ItemId.ToString();
                list.Add(item);
            }

            flexEvent.LocationList  = list;
            flexEvent.StartDateTime = DateTime.Now;
            flexEvent.EndDateTime   = DateTime.Now;

            return(View(flexEvent));
        }
Beispiel #2
0
        public ActionResult ShowForm(FlexEventViewModel flexEvent)
        {
            if (ModelState.IsValid)
            {
                var file = Request.Files;

                if (file.Count != 0)
                {
                    //do something
                }

                //return RedirectToDefaultRoute();
            }

            return(View(flexEvent));
        }