Exemplo n.º 1
0
        //  XiaoTuan/Home/ActivityAddAdmin
        public ActionResult ActivityAddAdmin()
        {
            InitForm("添加活动");
            var orgSelect = _IXiaoTuanService.UserOrgList(DataContext.UserID);

            return(View(ActivityAddAdmin_M.ToViewModel(orgSelect)));
        }
Exemplo n.º 2
0
 public ActionResult ActivityAddAdmin(ActivityAddAdmin_M model)
 {
     try
     {
         return(_activity.Add(model.ToModel()).HasValue()
      ? RedirectToAction("ActivityList", "Home", new { area = "XiaoTuan" })
      : Alert("添加失败"));
     }
     catch (FormValitationException ex)
     {
         FormValitation = ex;
         InitForm("添加活动");
         var orgSelect = _IXiaoTuanService.UserOrgList(DataContext.UserID);
         return(View(ActivityAddAdmin_M.ToViewModel(orgSelect)));
     }
 }