public ActionResult LearnOnLineTaskShowView(int TrainingId, int UnitContent, int ClassId, int UId) { //获取活动及标题 var Model_Course_UnitContent = this.GetCourseUnitContentActivity(TrainingId, UnitContent, ClassId, false); var homeWorkBll = new Course_UnitHomeWorkBLL(); var Model_Course_UnitHomeWork = new Course_UnitHomeWork(); var stbSqlWhere = new StringBuilder(); var MemberBll = new Member_AccountBLL(); var strNickName = string.Empty; //获取作业信 stbSqlWhere.AppendFormat(@" UId = {0}", UId); Model_Course_UnitHomeWork = homeWorkBll.GetModel(UId, string.Empty); if (Model_Course_UnitHomeWork != null) { strNickName = MemberBll.GetModel(Model_Course_UnitHomeWork.AccountId, string.Empty).Nickname; } ViewBag.ClassId = ClassId; ViewBag.NickName = strNickName; ViewBag.UnitContent = UnitContent = Model_Course_UnitHomeWork.Id; ViewBag.Model_Course_UnitHomeWork = Model_Course_UnitHomeWork; return View(); }
public bool IsCanRegister(int ClassId, bool Issingle, int MemberId, int Type) { int ParentOrganId = 1; int oType = 1; int partitionId = Code.SiteCache.Instance.LoginInfo.PartitionId; int UserId = MemberId; Member_AccountBLL member_AccountBLL = new Member_AccountBLL(); Member_Account ma = member_AccountBLL.GetModel(UserId, ""); int OrganId = 1; if (Issingle) { ParentOrganId = (int)organ_DetailBLL.GetModel(Code.SiteCache.Instance.OrganId).ParentId; oType = (int)organ_DetailBLL.GetModel(Code.SiteCache.Instance.OrganId).OType; OrganId = Code.SiteCache.Instance.OrganId; } else { ParentOrganId = (int)organ_DetailBLL.GetModel(Code.SiteCache.Instance.ManageOrganId).ParentId; oType = (int)organ_DetailBLL.GetModel(Code.SiteCache.Instance.ManageOrganId).OType; OrganId = Code.SiteCache.Instance.ManageOrganId; } Member_BaseInfoBLL member_BaseInfoBLL = new Member_BaseInfoBLL(); Member_BaseInfo m = member_BaseInfoBLL.GetModelByAccountId(UserId); string where = " and td.PartitionId='" + partitionId + "'and cd.PlanId='" + Code.SiteCache.Instance.PlanId + "' and cd.PartitionId='" + partitionId + "' and cd.Id='" + ClassId + "'"; if (oType == 1) { where += " and td.OrganId='" + OrganId + "'"; } else if (oType == 2) { if (m != null) { switch (Type) { case 1: where += " and ((css.StudySection in(select StudySection from Member_StudySection where AccountId='" + UserId + "' and Delflag='false')and css.delflag='false' )or cd.StudyLevel=1)"; break; case 2: where += " and ((cts.TeachSubject in(select TeachSubject from Member_TeachSubject where AccountId='" + UserId + "' and Delflag='false')and cts.delflag='false' )or cd.Subject=1)"; break; case 3: where += " and ((ctg.TeachGrade in(select TeachGrade from Member_TeachGrade where AccountId='" + UserId + "' and Delflag='false')and ctg.delflag='false' )or cd.TeachGrade=1)"; break; case 4: where += " and ((ctr.TeachRank in(select WorkRank from Member_WorkRank where AccountId='" + UserId + "' and Delflag='false')and ctr.delflag='false' )or cd.TeachRank=1)"; break; case 5: where += " and (CHARINDEX('," + OrganId + ",',','+cd.OrganRange+',')>0 or cd.OrganRange='0')"; break; } where += " and (td.OrganId='" + ParentOrganId + "' or td.Range=2)"; } else { where += "and 1=2"; } } else if (oType == 5) { if (m != null) { switch (Type) { case 1: where += " and ((css.StudySection in(select StudySection from Member_StudySection where AccountId='" + UserId + "' and Delflag='false')and css.delflag='false' )or cd.StudyLevel=1)"; break; case 2: where += " and ((cts.TeachSubject in(select TeachSubject from Member_TeachSubject where AccountId='" + UserId + "' and Delflag='false')and cts.delflag='false' )or cd.Subject=1)"; break; case 3: where += " and ((ctg.TeachGrade in(select TeachGrade from Member_TeachGrade where AccountId='" + UserId + "' and Delflag='false')and ctg.delflag='false' )or cd.TeachGrade=1)"; break; case 4: where += " and ((ctr.TeachRank in(select WorkRank from Member_WorkRank where AccountId='" + UserId + "' and Delflag='false')and ctr.delflag='false' )or cd.TeachRank=1)"; break; case 5: where += " and (CHARINDEX('," + ma.OrganId + ",',','+cd.OrganRange+',')>0 or cd.OrganRange='0')"; break; } where += " and (td.OrganId='" + OrganId + "' or td.Range=2)"; } else { where += "and 1=2"; } } else { where += " and 1=2"; } Traning_DetailBLL traning_DetailBLL = new Traning_DetailBLL(); int total = 0; List<Traning_Detail> tdlist = traning_DetailBLL.GetListHasClass(10, 1, where, "CreateDate desc", out total); return total > 0; }
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); }
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 JsonResult getAllMemer(int ClassId) { var memberModel = new Dianda.AP.BLL.Member_ClassRegisterBLL().GetList(" Delflag=0 and ClassId=" + ClassId, ""); var accountModel = (from c in memberModel select new { Account=c.AccountId,Status=c.Status }).ToList(); List<Member_Account> list = new List<Member_Account>(); var bll = new Dianda.AP.BLL.Member_AccountBLL(); foreach (var item in accountModel) { var act = bll.GetModel(item.Account, ""); act.RegisterStatus = item.Status; list.Add(act); } return Json(list, JsonRequestBehavior.AllowGet); }