예제 #1
0
        public ActionResult ConfirmSchedule()
        {
            // update rehearsal part times
            //vm.LstConfirmScheduledRehearsalParts = tmpRehearsalPartsSchedule.LstScheduledRehearsalParts;
            // insert start and end dates for each rehearsal part into db
            InsertDAL insert = new InsertDAL();

            insert.OpenConnection();
            foreach (var rp in tmpRehearsalPartsSchedule.LstScheduledRehearsalParts)
            {
                insert.UpdateRPTimes(rp.IntRehearsalPartID, rp.DtmStartDateTime.GetValueOrDefault(), rp.DtmEndDateTime.GetValueOrDefault());
            }

            insert.CloseConnection();

            return(Json(new { success = true, response = "confirmed!" }, JsonRequestBehavior.AllowGet));

            //return RedirectToAction("Index", "Schedule");
        }