public ActionResult InternalJuryEvaluation_Post(GlobalFyp2Final global) { using (var client = new HttpClient()) { client.BaseAddress = new Uri(Shared.ServerConfig.GetBaseUrl() + "fyp2post/AddFyp2FinalEvaluationJury"); String myTitle = FYP2Final; List <FYP2FinalEvaluation> list = new List <FYP2FinalEvaluation>(); global.IndexModelsFinal = GetFyp2Final(myTitle); list = global.IndexModelsFinal.ToList(); global.SearchModelFinal.LeaderID = list[0].LeaderID; global.SearchModelFinal.Member1ID = list[0].Member1ID; global.SearchModelFinal.Member2ID = list[0].Member2ID; global.SearchModelFinal.FypID = idfyp; global.SearchModelFinal.FormID = 5; var postTask = client.PostAsJsonAsync <FYP2FinalEvaluation>("AddFyp2ExternalEvaluationJury", global.SearchModelFinal); postTask.Wait(); var result = postTask.Result; if (result.IsSuccessStatusCode) { return(RedirectToAction("TeacherHome")); } } return(View()); }
public ActionResult InternalJuryEvaluation(String title) { ViewBag.message = title; FYP2Final = title; var model = new GlobalFyp2Final(); model.IndexModelsFinal = GetFyp2Final(title); return(View(model)); }