/// <summary>
        /// thêm dữ liệu vào bảng examhallstudent :
        /// </summary>
        /// <param name="listStudentCode"></param>
        /// <param name="examTimeCode"></param>
        /// <param name="courseCode"></param>
        /// <param name="parentCode"></param>
        /// <returns></returns>

        public JsonResult Insert(List<string> listStudentCode, string examTimeCode, string courseCode)
        {
            int ret = 0;
            if (listStudentCode != null)
            {
                EXAMHALLSTUDENT_BUS bus = new EXAMHALLSTUDENT_BUS();
                foreach (var studentCode in listStudentCode)
                {
                    MARK_BUS markBus = new MARK_BUS();
                    MARK_OBJ markObj = markBus.GetByKey(
                        new fieldpara("STUDENTCODE", studentCode, 0),
                        new fieldpara("COURSECODE", courseCode, 0),
                        new fieldpara("UNIVERSITYCODE", _ses.gUNIVERSITYCODE, 0)
                     );
                    if (markObj == null)
                        ret = -1;
                    else
                    {
                        // kiểm tra đã tồn tại bản ghi có markcode và coursecode truyền vào chưa
                        EXAMHALLSTUDENT_OBJ obj = bus.GetByKey(
                                        new fieldpara("MARKCODE", markObj.CODE, 0),
                                        new fieldpara("COURSECODE", courseCode, 0),
                                        new fieldpara("EXAMTIMECODE", examTimeCode, 0),
                                        new fieldpara("UNIVERSITYCODE", _ses.gUNIVERSITYCODE, 0)
                        );
                        if (obj != null)
                        {
                            ret = -2;
                            return Json(new { ret }, JsonRequestBehavior.AllowGet);
                        }
                        EXAMHALLSTUDENT_OBJ objTemp = new EXAMHALLSTUDENT_OBJ();
                        objTemp.CODE = bus.genNextCode(objTemp);
                        objTemp.MARKCODE = markObj.CODE;
                        objTemp.COURSECODE = courseCode;
                        objTemp.EXAMTIMECODE = examTimeCode;
                        objTemp.LOCK = 0;
                        objTemp.EDITTIME = DateTime.Now;
                        objTemp.EDITUSER = _ses.loginCode;
                        objTemp.UNIVERSITYCODE = _ses.gUNIVERSITYCODE;
                        ret = bus.insert(objTemp);
                    }
                    markBus.CloseConnection();
                }
                bus.CloseConnection();
            }
            return Json(new { ret }, JsonRequestBehavior.AllowGet);
        }