public ActionResult addRecordInfo(string userId, string classId, int scoType, string recordData, string timestamp)
        {
            int result;
            string msg;

            #region 验证参数
            string teacherNo = ApiTools.Decrypt(HttpUtility.UrlDecode(userId), aesKey, aesIV).Replace("\0", "");
            //userId = Dianda.Common.StringSecurity.DES.Decrypt(HttpUtility.UrlDecode(userId));
            if (string.IsNullOrEmpty(teacherNo))
            {
                result = 0;
                msg = "参数:userId的加密格式错误";
                return Json(new { Result = result, Msg = msg });
            }

            classId = ApiTools.Decrypt(HttpUtility.UrlDecode(classId), aesKey, aesIV);
            //classId = Dianda.Common.StringSecurity.DES.Decrypt(HttpUtility.UrlDecode(classId));
            if (string.IsNullOrEmpty(classId))
            {
                result = 0;
                msg = "参数:classId的加密格式错误";
                return Json(new { Result = result, Msg = msg });
            }
            int trainingId;
            if (!int.TryParse(classId.Replace("\0", ""), out trainingId))
            {
                result = 0;
                msg = "参数:classId不是合法的整数类型";
                return Json(new { Result = result, Msg = msg });
            }

            if (scoType < 1 || scoType > 7)
            {
                result = 0;
                msg = "参数:scoType不合法";
                return Json(new { Result = result, Msg = msg });
            }

            recordData = ApiTools.Decrypt(HttpUtility.UrlDecode(recordData), aesKey, aesIV);
            //recordData = Dianda.Common.StringSecurity.DES.Decrypt(HttpUtility.UrlDecode(recordData));
            if (string.IsNullOrEmpty(recordData))
            {
                result = 0;
                msg = "参数:recordData的加密格式错误";
                return Json(new { Result = result, Msg = msg });
            }
            JavaScriptSerializer jss = new JavaScriptSerializer();
            OutCourse outcourse;
            try
            {
                outcourse = jss.Deserialize<OutCourse>(recordData.Replace("\0", ""));
            }
            catch (Exception)
            {
                result = 0;
                msg = "参数:recordData不是合法的Json格式";
                return Json(new { Result = result, Msg = msg });
            }

            if (!Dianda.Common.StringSecurity.MD5Lib.Encrypt(
                DateTime.Now.ToString("yyyyMMddHH") + teacherNo + trainingId).Equals(timestamp, StringComparison.CurrentCultureIgnoreCase))
            {
                result = 0;
                msg = "参数:timestamp验证不通过";
                return Json(new { Result = result, Msg = msg });
            }
            #endregion

            Member_ClassRegisterBLL mcBLL = new Member_ClassRegisterBLL();
            Member_ClassRegister mcModel = mcBLL.GetModel("Delflag=0 and TrainingId=" + this.ConvertTrainingId(trainingId)
                + " and AccountId=(select top 1.AccountId from Member_BaseInfo where Delflag=0 and TeacherNo='" + teacherNo + "') and PlanId=" + Code.SiteCache.Instance.PlanId);
            if (mcModel == null)
            {
                result = 0;
                msg = "学员班级信息不存在";
                return Json(new { Result = result, Msg = msg });
            }

            switch (scoType)
            {
                case 1:
                    if (mcModel.ReadingScore == null)
                        mcModel.ReadingScore = 1;
                    else
                        mcModel.ReadingScore += 1;
                    break;

                case 2:
                    if (mcModel.ReadingScore == null)
                        mcModel.ReadingScore = 1;
                    else
                        mcModel.ReadingScore += 1;
                    break;

                case 3:
                    if (mcModel.TestingScore == null)
                        mcModel.TestingScore = 1;
                    else
                        mcModel.TestingScore += 1;
                    break;

                case 4:
                    if (mcModel.DiscussScore == null)
                        mcModel.DiscussScore = 1;
                    else
                        mcModel.DiscussScore += 1;
                    break;

                case 5:
                    if (mcModel.HomeWorkScore == null)
                        mcModel.HomeWorkScore = 1;
                    else
                        mcModel.HomeWorkScore += 1;
                    break;

                case 6:
                    if (mcModel.ExaminationScore == null)
                        mcModel.ExaminationScore = 1;
                    else
                        mcModel.ExaminationScore += 1;
                    break;

                case 7:
                    if (mcModel.OtherScore == null)
                        mcModel.OtherScore = 1;
                    else
                        mcModel.OtherScore += 1;
                    break;
            }

            Course_OutCourseRecordBLL bll = new Course_OutCourseRecordBLL();
            Course_OutCourseRecord model = new Course_OutCourseRecord();
            model.ClassId = mcModel.ClassId;
            model.TrainingId = mcModel.TrainingId;
            model.AccountId = mcModel.AccountId;
            model.DataType = scoType;
            model.Status = true;
            model.Delflag = false;
            ConvertModel(outcourse, model);

            try
            {
                using (TransactionScope trans = new TransactionScope())
                {
                    bll.Add(model);
                    mcBLL.Update(mcModel);
                    trans.Complete();
                    result = 1;
                    msg = "新增学习记录成功";
                    ApiTools.WriteLog(TraceEventType.Information, 1, "新增学习活动记录");
                    return Json(new { Result = result, Msg = msg });
                }
            }
            catch (Exception e)
            {
                ApiTools.WriteLog(TraceEventType.Error, 0, e.ToString());
                result = 0;
                msg = "新增学习记录失败";
                return Json(new { Result = result, Msg = msg });
            }
        }
        public ActionResult setEvaluation(string userId, string classId, int isPassed, string assessmentName, string remark, string timestamp)
        {
            int result;
            string msg;

            #region 验证参数
            string teacherNo = ApiTools.Decrypt(HttpUtility.UrlDecode(userId), aesKey, aesIV).Replace("\0", "");
            //userId = Dianda.Common.StringSecurity.DES.Decrypt(HttpUtility.UrlDecode(userId));
            if (string.IsNullOrEmpty(userId))
            {
                result = 0;
                msg = "参数:userId的加密格式错误";
                return Json(new { Result = result, Msg = msg });
            }

            classId = ApiTools.Decrypt(HttpUtility.UrlDecode(classId), aesKey, aesIV);
            //classId = Dianda.Common.StringSecurity.DES.Decrypt(HttpUtility.UrlDecode(classId));
            if (string.IsNullOrEmpty(classId))
            {
                result = 0;
                msg = "参数:classId的加密格式错误";
                return Json(new { Result = result, Msg = msg });
            }
            int trainingId;
            if (!int.TryParse(classId.Replace("\0", ""), out trainingId))
            {
                result = 0;
                msg = "参数:classId不是合法的整数类型";
                return Json(new { Result = result, Msg = msg });
            }

            if (!Dianda.Common.StringSecurity.MD5Lib.Encrypt(
                DateTime.Now.ToString("yyyyMMddHH") + teacherNo + trainingId).Equals(timestamp, StringComparison.CurrentCultureIgnoreCase))
            {
                result = 0;
                msg = "参数:timestamp验证不通过";
                return Json(new { Result = result, Msg = msg });
            }
            #endregion

            Member_ClassRegisterBLL mcBLL = new Member_ClassRegisterBLL();
            Member_ClassRegister mcModel = mcBLL.GetModel("Delflag=0 and TrainingId=" + this.ConvertTrainingId(trainingId)
                + " and AccountId=(select top 1.AccountId from Member_BaseInfo where Delflag=0 and TeacherNo='" + teacherNo + "') and PlanId=" + Code.SiteCache.Instance.PlanId);
            if (mcModel == null)
            {
                result = 0;
                msg = "学员班级信息不存在";
                return Json(new { Result = result, Msg = msg });
            }

            if (isPassed == 1)
                mcModel.Result = 1;
            else
                mcModel.Result = 0;

            Course_OutCourseRecordBLL bll = new Course_OutCourseRecordBLL();
            Course_OutCourseRecord model = new Course_OutCourseRecord();
            model.AssessmentName = assessmentName;
            model.ClassId = mcModel.ClassId;
            model.TrainingId = mcModel.TrainingId;
            model.AccountId = mcModel.AccountId;
            model.DataType = 0;
            if (isPassed == 1)
                model.IsPassed = true;
            else
                model.IsPassed = false;
            model.Remark = remark;
            model.Status = true;
            model.Delflag = false;
            model.CreateDate = DateTime.Now;

            try
            {
                using (TransactionScope trans = new TransactionScope())
                {
                    bll.Add(model);
                    mcBLL.Update(mcModel);
                    trans.Complete();
                    result = 1;
                    msg = "结业评定操作成功";
                    ApiTools.WriteLog(TraceEventType.Information, 1, "结业评定");
                    return Json(new { Result = result, Msg = msg });
                }
            }
            catch (Exception e)
            {
                ApiTools.WriteLog(TraceEventType.Error, 0, e.ToString());
                result = 0;
                msg = "结业评定操作失败";
                return Json(new { Result = result, Msg = msg });
            }
        }
        public JsonResult MyVerifyAll(int Status, string Ids)
        {
            try
            {
                string[] myIds = Ids.Trim(',').Split(',');
                foreach (string Id in myIds)
                {
                    Member_ClassRegisterBLL member_ClassRegisterBLL = new Member_ClassRegisterBLL();
                    Member_ClassRegister member_ClassRegister = new Member_ClassRegister();
                    member_ClassRegister = member_ClassRegisterBLL.GetModel(Convert.ToInt32(Id), "");

                    if ((Status == 3 && member_ClassRegister.Status != 3) || (Status == 5 && member_ClassRegister.Status != 5))
                    {
                        Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
                        Class_Detail class_Detail = new Class_Detail();
                        class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);
                        class_Detail.People -= 1;
                        class_DetailBLL.Update(class_Detail);
                    }
                    else if ((Status == 2 && member_ClassRegister.Status == 3) || (Status == 4 && member_ClassRegister.Status == 5) || (Status == 2 && member_ClassRegister.Status == 5))
                    {
                        Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
                        Class_Detail class_Detail = new Class_Detail();
                        class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);
                        class_Detail.People += 1;
                        class_DetailBLL.Update(class_Detail);
                    }
                    member_ClassRegister.Status = Status;
                    member_ClassRegisterBLL.Update(member_ClassRegister);

                    Member_ClassRegisterApplicationBLL member_ClassRegisterApplicationBLL = new Member_ClassRegisterApplicationBLL();
                    Member_ClassRegisterApplication member_ClassRegisterApplication = new Member_ClassRegisterApplication();
                    member_ClassRegisterApplication.ClassRegisterId = Convert.ToInt32(Id);
                    member_ClassRegisterApplication.Status = Status;
                    member_ClassRegisterApplication.Creater = Code.SiteCache.Instance.LoginInfo.UserId;
                    member_ClassRegisterApplication.Delflag = false;
                    member_ClassRegisterApplication.CreateDate = DateTime.Now;
                    member_ClassRegisterApplicationBLL.Add(member_ClassRegisterApplication);
                }
                return Json(new { Code = 0, Msg = "提交成功" }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { Code = -1, Msg = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }
        public ActionResult MyVerify(int Status, int mpId, string content)
        {
            try
            {
                Member_ClassRegisterBLL member_ClassRegisterBLL = new Member_ClassRegisterBLL();
                Member_ClassRegister member_ClassRegister = member_ClassRegisterBLL.GetModel(mpId, "");
                member_ClassRegister = member_ClassRegisterBLL.GetModel(mpId, "");
                if ((Status == 3 && member_ClassRegister.Status != 3) || (Status == 5 && member_ClassRegister.Status != 5))
                {
                    Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
                    Class_Detail class_Detail = new Class_Detail();
                    class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);
                    class_Detail.People -= 1;
                    class_DetailBLL.Update(class_Detail);
                }
                else if ((Status == 2 && member_ClassRegister.Status == 3) || (Status == 4 && member_ClassRegister.Status == 5) || (Status == 2 && member_ClassRegister.Status == 5))
                {
                    Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
                    Class_Detail class_Detail = new Class_Detail();
                    class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);
                    class_Detail.People += 1;
                    if (class_Detail.LimitPeopleCnt != -1)
                    {
                        if (class_Detail.LimitPeopleCnt < class_Detail.People)
                        {
                            TempData["Msg"] = "超过报名限制!";
                            return RedirectToAction("../../Market/Coursemarket/CoursemarketVerify");
                        }
                    }
                    class_DetailBLL.Update(class_Detail);
                }
                member_ClassRegister.Status = Status;
                member_ClassRegister.ApplyRemark = content;
                member_ClassRegisterBLL.Update(member_ClassRegister);

                Member_ClassRegisterApplicationBLL member_ClassRegisterApplicationBLL = new Member_ClassRegisterApplicationBLL();
                Member_ClassRegisterApplication member_ClassRegisterApplication = new Member_ClassRegisterApplication();
                member_ClassRegisterApplication.ClassRegisterId = mpId;
                member_ClassRegisterApplication.Status = Status;
                member_ClassRegisterApplication.Remark = content;
                member_ClassRegisterApplication.Creater = Code.SiteCache.Instance.LoginInfo.UserId;
                member_ClassRegisterApplication.Delflag = false;
                member_ClassRegisterApplication.CreateDate = DateTime.Now;
                member_ClassRegisterApplicationBLL.Add(member_ClassRegisterApplication);
                TempData["Msg"] = "提交成功!";
                return RedirectToAction("../../Market/Coursemarket/CoursemarketVerify");
            }
            catch (Exception)
            {
                TempData["Msg"] = "提交失败!";
                return RedirectToAction("../../Market/Coursemarket/CoursemarketVerify");
            }
        }
        public ActionResult DetailInformation(int Id)
        {
            ViewBag.Title = "报名详细信息";
            Member_ClassRegisterBLL member_ClassRegisterBLL = new Member_ClassRegisterBLL();
            Member_ClassRegister member_ClassRegister = new Member_ClassRegister();
            member_ClassRegister = member_ClassRegisterBLL.GetModel(Id, "");

            Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
            Class_Detail class_Detail = new Class_Detail();
            class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);

            Member_AccountBLL member_AccountBLL = new Member_AccountBLL();
            ViewBag.AcountInfo = member_AccountBLL.GetModel(member_ClassRegister.AccountId, "");

            Member_BaseInfoBLL member_BaseInfoBLL = new Member_BaseInfoBLL();
            ViewBag.BaseInfo = member_BaseInfoBLL.GetModelByAccountId(member_ClassRegister.AccountId);

            Member_ClassRegisterApplicationBLL member_ClassRegisterApplicationBLL = new Member_ClassRegisterApplicationBLL();
            ViewBag.CApplicationList = member_ClassRegisterApplicationBLL.GetList(" Delflag='false' and ClassRegisterId='" + member_ClassRegister.Id + "'", "CreateDate");
            return View(class_Detail);
        }
        public ActionResult CoursemarketVerifyPage(int Id)
        {
            int groupId = Code.SiteCache.Instance.GroupId;//4,学校管理7,普通教师
            ViewData["groupId"] = groupId;
            ViewData["mId"] = Id;
            ViewBag.Title = "报名审核";
            Member_ClassRegisterBLL member_ClassRegisterBLL = new Member_ClassRegisterBLL();
            Member_ClassRegister member_ClassRegister = new Member_ClassRegister();
            member_ClassRegister = member_ClassRegisterBLL.GetModel(Id, "");

            Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
            Class_Detail class_Detail = new Class_Detail();
            class_Detail = class_DetailBLL.GetModel(member_ClassRegister.ClassId);

            Member_AccountBLL member_AccountBLL = new Member_AccountBLL();
            ViewBag.AcountInfo = member_AccountBLL.GetModel(member_ClassRegister.AccountId, "");

            Member_BaseInfoBLL member_BaseInfoBLL = new Member_BaseInfoBLL();
            ViewBag.BaseInfo = member_BaseInfoBLL.GetModelByAccountId(member_ClassRegister.AccountId);

            Member_ClassRegisterApplicationBLL member_ClassRegisterApplicationBLL = new Member_ClassRegisterApplicationBLL();
            ViewBag.CApplicationList = member_ClassRegisterApplicationBLL.GetList(" Delflag='false' and ClassRegisterId='" + member_ClassRegister.Id + "'", "CreateDate");
            return View(class_Detail);
        }