public ActionResult FormAppointment(string dt, int docid, int type) { surveylist survey = _context.surveylist.SingleOrDefault(m => m.Doctorid == docid); if (survey == null) { survey = _context.surveylist.SingleOrDefault(m => m.Doctorid == 1); } formAppoimtnetViewModel fview = new formAppoimtnetViewModel { appoint = new Appointment { Docid = docid, type = type, Date = DateTime.ParseExact(dt, "dd/MM/yyyy-HH:mm", CultureInfo.InvariantCulture) }, allstate = _context.States.ToList(), survey = survey, checkout = false, }; fview.allstate.RemoveAt(fview.allstate.Count - 1); return(View("_NewAppointment", fview)); }
public ActionResult save(surveylist surlist) { // return(RedirectToAction("Appoint", "Appointment")); }