コード例 #1
0
        public ActionResult Index()
        {
            List <PLScheduleDay> list = ScheduleDayClientService.GetScheduleDayList();

            ViewBag.breadCrumbData = "Schedule Day List";

            return(View("List", list));
        }
コード例 #2
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         ScheduleDayClientService.CreateScheduleDay(collection["scheduleDay"].ToString());
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         Console.Write(e.ToString());
         return(View());
     }
 }
コード例 #3
0
        //
        // GET: /Student/Delete/5

        public ActionResult Delete(string id)
        {
            try
            {
                bool success = ScheduleDayClientService.DeleteScheduleDay(id);

                if (success)
                {
                    return(RedirectToAction("Index"));
                }

                return(RedirectToAction("Error"));
            }
            catch
            {
                return(View());
            }
        }
コード例 #4
0
        public JsonResult GetSampleScheduleDay(int idx)
        {
            List <PLScheduleDay> list = ScheduleDayClientService.GetScheduleDayList();

            return(this.Json(list[idx], JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public string GetNumScheduleDayTotal()
        {
            List <PLScheduleDay> list = ScheduleDayClientService.GetScheduleDayList();

            return(list.Count.ToString());
        }