/// <summary>
        /// 根据教师的id获取信息
        /// </summary>
        /// <param name="tCategory"></param>
        /// <returns></returns>
        public string CreateMembers(string members)
        {
            //主题
            Member_AccountBLL member_AccountBLL = new Member_AccountBLL();
            members = members.TrimStart(',').TrimEnd(',');
            List<Member_Account> list = member_AccountBLL.GetList(" Id in (" + members + ") and  Delflag='false'", " Id");

            return (new JavaScriptSerializer()).Serialize(list);
        }
 public ActionResult ChooseMembers(int? pageIndex, int organId, string searchName)
 {
     ViewData["organId"] = Code.SiteCache.Instance.ManageOrganId;
     int i = TypeConverter.ObjectToInt(pageIndex, 1);
     Member_AccountBLL member_AccountBLL = new Member_AccountBLL();
     List<Member_AccountBaseInfo> member_AccBaseInfoList = new List<Member_AccountBaseInfo>();
     int total = 0;
     string where = " Status='2' and Delflag='false' and OrganId=" + organId;
     if (!string.IsNullOrEmpty(searchName)) { where += " and Nickname like '%" + searchName + "'"; }
     //string where = " status=2 and delflag='false' and OrganId='" + OrganId + "'";
     member_AccBaseInfoList = member_AccountBLL.GetMABListPractice(9, i, where, "Id", out total);
     ViewBag.pageIndex = i;
     ViewBag.totalPage = total;
     return View(member_AccBaseInfoList);
 }
        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 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);
        }
 /// <summary>
 /// 学校--教师选择list
 /// </summary>
 /// <param name="pageIndex"></param>
 /// <param name="OrganId"></param>
 /// <returns></returns>
 public ActionResult ChooseTeachersList(int? pageIndex, int ClassId, int Type)
 {
     Class_DetailBLL class_DetailBLL = new Class_DetailBLL();
     Class_Detail ClassModel = class_DetailBLL.GetModel(ClassId);
     int TrainingId = ClassModel.TraningId;
     int OrganId = Code.SiteCache.Instance.ManageOrganId;
     int Groupid = Code.SiteCache.Instance.GroupId;
     int i = TypeConverter.ObjectToInt(pageIndex, 1);
     Member_AccountBLL member_AccountBLL = new Member_AccountBLL();
     List<Member_AccountBaseInfo> member_AccBaseInfoList = new List<Member_AccountBaseInfo>();
     int total = 0;
     member_AccBaseInfoList = member_AccountBLL.GetMarketMemberList(12, i, Type, ClassModel, TrainingId, OrganId, Groupid, "Id", out total);
     ViewBag.pageIndex = i;
     ViewBag.totalPage = total;
     ViewBag.Type = Type;
     ViewBag.ClassId = ClassId;
     return View(member_AccBaseInfoList);
 }
示例#8
0
        //
        // GET: /Learn/MyTest/
        public ActionResult Index(int? id)
        {
            //id = id == null ? 0 : id;
            //ViewBag.Id = id;

            Member_Account member = new Member_AccountBLL().GetModel(Code.SiteCache.Instance.LoginInfo.UserId, "Delflag=0 and Status=2");
            int outId = 0;
            if (member != null)
            {
                if (member.OutSourceId != null)
                    outId = Convert.ToInt32(member.OutSourceId);
            }
            ViewBag.OutId = outId;

            MyTestRound mode = null;
            List<MyTestRound> round = new List<MyTestRound>();
            string score1 = "";
            string score2 = "";
            string tick1 = "";
            string tick2 = "";

            if (outId != 0)
            {
                LearnMyTestBLL bll = new LearnMyTestBLL();

                round = bll.V_GetRoundList(outId, "uploaddatetime desc");

                if (id == null)
                {
                    mode = round.FirstOrDefault();
                }
                else
                {
                    mode = round.FirstOrDefault(t => t.Id == id);
                }

                id = 0;
                if (mode != null)
                {
                    id = mode.Id;
                    List<MyTestScore> score = bll.GetScoreList(Convert.ToInt32(id), "dimensionid");
                    StringBuilder sbScore1 = new StringBuilder();
                    if (score.Count >= 10)
                    {
                        for (int i = 0; i < 5; i++)
                        {
                            sbScore1.Append(score[i].Score + ",");
                        }
                        sbScore1.Remove(sbScore1.Length - 1, 1);
                    }
                    score1 = sbScore1.ToString();
                    StringBuilder sbScore2 = new StringBuilder();
                    if (score.Count >= 10)
                    {
                        for (int i = 5; i < 10; i++)
                        {
                            sbScore2.Append(score[i].Score + ",");
                        }
                        sbScore2.Remove(sbScore2.Length - 1, 1);
                    }
                    score2 = sbScore2.ToString();

                    string[] tick = new string[] { "I技术素养", "I计划与准备", "I组织与管理", "I评论与诊断", "I学习与发展", "II技术素养", "II计划与准备", "II组织与管理", "II评论与诊断", "II学习与发展" };
                    StringBuilder sbTick1 = new StringBuilder();
                    for (int i = 0; i < 5; i++)
                    {
                        sbTick1.Append("\"" + tick[i] + "\",");
                    }
                    sbTick1.Remove(sbTick1.Length - 1, 1);
                    tick1 = sbTick1.ToString();
                    StringBuilder sbTick2 = new StringBuilder();
                    for (int i = 5; i < 10; i++)
                    {
                        sbTick2.Append("\"" + tick[i] + "\",");
                    }
                    sbTick2.Remove(sbTick2.Length - 1, 1);
                    tick2 = sbTick2.ToString();
                }
            }

            ViewBag.Id = id;
            ViewBag.RoundData = round;
            ViewBag.Score1 = score1;
            ViewBag.Score2 = score2;
            ViewBag.Tick1 = tick1;
            ViewBag.Tick2 = tick2;
            return View(mode);
        }
 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);
 }