public async Task <MyEvaluationItemModel> updateUserEvaluation(string accessToken, int evalId, decimal totalScore, decimal availableTotal, int noOfQuestions, int duration) { try { MyEvaluationItemModel result = null; using (var client = new HttpClient()) { client.BaseAddress = new Uri(GlobalVal.webapibaseurl); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Add("authorization", String.Format("bearer {0}", accessToken)); //UpdateUserEvaluation? QuestionId = id & TotalScore = tscore & AvailableTotal = availtotal & NoOfQuestions = noofq & Duration = duration var response = await client.GetAsync("/api/Remote/UpdateUserEvaluation?QuestionId=" + evalId + "&TotalScore=" + totalScore + "&AvailableTotal=" + availableTotal + "&NoOfQuestions=" + noOfQuestions + "&Duration=" + duration); result = await response.Content.ReadAsAsync <MyEvaluationItemModel>(); } return(result); } catch (Exception ex) { throw new SecurityException(ex.Message); } }
public msg_MyEvaluationDetail(MyEvaluationItemModel myEval) { _myEval = myEval; }