示例#1
0
        public ActionResult AddConference(ConferenceAddViewModel model)
        {
            if (model != null)
            {
                Conference conf = new Conference
                {
                    Thema        = model.Thema,
                    Date         = model.Date,
                    Direction    = model.Direction,
                    Details      = model.Details,
                    Requirements = null,
                    Image        = null
                };

                if (model.Image != null)
                {
                    conf.Image = _userService.СonvertingImg(model.Image);
                }
                if (model.Requirements != null)
                {
                    conf.Requirements = _userService.СonvertingImg(model.Requirements);
                }

                _conferencService.AddCovference(conf);
            }
            return(View("Index"));
        }
示例#2
0
 public ActionResult CreateConference(Conference model)
 {
     if (model != null)
     {
         _conService.AddCovference(model);
     }
     return(RedirectToAction("Index", "Conference"));
 }