public ActionResult Create(ShuttleManagementInfoModel model) { GetRole(); if (model.StartLocation == model.EndLocation) { ViewBag.ErrorMessage = "起点和终点不能相同!"; return(View(model)); } if (model.Time == "" || model.Weekdays == "") { ViewBag.ErrorMessage = "请检查是否有空项!"; return(View(model)); } else { repo.CreateShuttle(model.Time, model.StartLocation, model.EndLocation, model.Weekdays); //TODO:发送消息逻辑 return(RedirectToAction("Index")); } }