public ActionResult Evaluate() { ViewData["imgsrc"] = Logo(); ViewData["Student"] = GetStudent(); DrivingToEvaluate dte = GetDrivingToEvaluate(); if (dte != null) { ViewData["DrivingToEvaluate"] = dte; return(View()); } else { return(View("NothingToRate")); } }
public ActionResult SendRating(int mark, string comment) { Student st = GetStudent(); DrivingToEvaluate dte = (DrivingToEvaluate)Session["DrivingToEvaluate"]; ServiceSpeaker srsp = new ServiceSpeaker(ServiceSpeaker.ConstructionMode.fromFile, @"D:\SvmWcf.xml"); Dictionary <string, string> spParams = new Dictionary <string, string>() { ["IdDriving"] = dte.Id.ToString(), ["IdCategory"] = "1", ["IdStudent"] = st.Id.ToString(), ["Mark"] = mark.ToString(), ["Comment"] = comment }; string Result = srsp.Fetch("spSDWriteDrivingRating", spParams); return(Message("Спасибо за оценку!")); }
private void WriteDTE(DrivingToEvaluate dte) { Session["DrivingToEvaluate"] = dte; }