public ActionResult ViewFyp2MidEvaluation_Post(GlobalFyp2Mid global) { using (var client = new HttpClient()) { client.BaseAddress = new Uri(Shared.ServerConfig.GetBaseUrl() + "fyp2post/AddMidEvaluationJury"); //HTTP POST String myTitle = FYP2Mid; List <FYP2MidEvaluation> list = new List <FYP2MidEvaluation>(); global.IndexModels = GetFyp2Mid(myTitle); list = global.IndexModels.ToList(); global.SearchModel.LeaderID = list[0].LeaderID; global.SearchModel.Member1ID = list[0].Member1ID; global.SearchModel.Member2ID = list[0].Member2ID; global.SearchModel.Member2ID = list[0].Member2ID; global.SearchModel.FypID = idfyp; global.SearchModel.FormID = 3; global.SearchModel.Member2ID = list[0].Member2ID; var postTask = client.PostAsJsonAsync <FYP2MidEvaluation>("AddMidEvaluationJury", global.SearchModel); postTask.Wait(); var result = postTask.Result; if (result.IsSuccessStatusCode) { return(RedirectToAction("TeacherHome")); } } return(View()); }
public ActionResult ViewFYP2MidEvaluation(String title) { ViewBag.message = title; FYP2Mid = title; var model = new GlobalFyp2Mid(); model.IndexModels = GetFyp2Mid(title); return(View(model)); }