public void TestconvertUserId_KhongKetQua()
        {
            IInfoDiemDanhService idds = new InfoDiemDanhService();
            bool result    = false;
            int  resultget = idds.convertUserId(0);

            if (resultget > 0)
            {
                result = true;
            }
            Assert.IsFalse(result, "Lỗi: TestconvertUserId_KhongKetQua: trả về kết quả.");
        }
        public HttpResponseMessage convertUserId([FromBody] object info)
        {
            HttpResponseMessage resmsg;

            if (info == null)
            {
                resmsg = Request.CreateResponse(HttpStatusCode.BadRequest, JsonConvert.SerializeObject(
                                                    new { error = 0 }));
            }
            else
            {
                var obj    = JObject.Parse(info.ToString());
                var userid = obj["userid"].ToObject <int>();

                IInfoDiemDanhService idds = new InfoDiemDanhService();

                int result = idds.convertUserId(userid);
                resmsg = Request.CreateResponse(HttpStatusCode.OK, result);
            }

            return(resmsg);
        }