public HttpResponseMessage GetInfoDiemDanh([FromBody] object info)
        {
            HttpResponseMessage resmsg;

            if (info == null)
            {
                resmsg = Request.CreateResponse(HttpStatusCode.BadRequest, JsonConvert.SerializeObject(
                                                    new { error = 0 }));
            }
            else
            {
                try
                {
                    var jsonSettings = new JsonSerializerSettings();
                    jsonSettings.DateFormatString = "dd/MM/yyy hh:mm:ss";
                    var obj   = JObject.Parse(info.ToString());
                    var mssv  = obj["mssv"].ToObject <int>();
                    var matkb = obj["matkb"].ToObject <int>();

                    IInfoDiemDanhService idds = new InfoDiemDanhService();

                    var result = idds.GetInfoDiemDanh(mssv, matkb);

                    resmsg = Request.CreateResponse(HttpStatusCode.OK, JsonConvert.SerializeObject(result, jsonSettings));
                } catch (Exception ex)
                {
                    resmsg = Request.CreateResponse(HttpStatusCode.InternalServerError);
                }
            }

            return(resmsg);
        }
        public void TestGetInfoDiemDanh_KhongKetQua_SaiMSSV()
        {
            IInfoDiemDanhService idds = new InfoDiemDanhService();
            var  danhsach             = idds.GetInfoDiemDanh(0, 3);
            bool result = false;

            if (danhsach.Count > 0)
            {
                result = true;
            }
            Assert.IsFalse(result, "Lỗi: TestGetInfoDiemDanh_KhongKetQua_SaiMSSV: trả về kết quả.");
        }
        public void TestGetInfoDiemDanh_CoKetQua()
        {
            IInfoDiemDanhService idds = new InfoDiemDanhService();
            var  danhsach             = idds.GetInfoDiemDanh(1, 3);
            bool result = false;

            if (danhsach.Count > 0)
            {
                result = true;
            }
            Assert.IsTrue(result, "Lỗi: TestGetInfoDiemDanh_CoKetQua: không trả về kết quả.");
        }