Beispiel #1
0
        public ActionResult TrainLevelAdjustTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 9);

            ViewBag.model = model;
            return(View());
        }
Beispiel #2
0
        public ActionResult AllDeptTrainSetTime()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 10);

            ViewBag.model = model;
            return(View());
        }
Beispiel #3
0
        public ActionResult CPATrainConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 8);

            ViewBag.model = model;
            return(View());
        }
Beispiel #4
0
        /// <summary>
        /// 5:违纪学时
        /// </summary>
        /// <returns></returns>
        public ActionResult DisciplineHoursConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 5);

            ViewBag.model = model;
            string chidao = "";

            if (model.ConfigValue != "")
            {
                for (int i = 0; i < model.ConfigValue.Split(';').Length; i++)
                {
                    if (model.ConfigValue.Split(';')[i].Split(',')[0] == "0")
                    {
                        chidao += "<tr type='chidao'>";
                        chidao += "<td>迟到</td>";
                    }
                    else
                    {
                        chidao += "<tr type='zaotui'>";
                        chidao += "<td>早退</td>";
                    }
                    chidao += "<td>" + model.ConfigValue.Split(';')[i].Split(',')[1] + "</td>";
                    chidao += "<td>" + model.ConfigValue.Split(';')[i].Split(',')[2] + "</td>";
                    chidao += "<td>" + model.ConfigValue.Split(';')[i].Split(',')[3] + "</td>";
                    chidao += "<td><a class='icon idel' title='删除' onclick='fdelete(this)'></a></td>";
                    chidao += "</tr>";
                }
            }
            ViewBag.chidao = chidao;

            return(View());
        }
Beispiel #5
0
        public ActionResult MessageConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 2);

            ViewBag.model = model;
            return(View());
        }
Beispiel #6
0
        public ActionResult TrainReportingTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 11);

            ViewBag.model = model;
            return(View());
        }
Beispiel #7
0
        public ActionResult CPATargetTrainCycleTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 17);

            ViewBag.model = model;
            return(View());
        }
Beispiel #8
0
        public ActionResult EvaluationRewardTimeLimitConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 30);

            ViewBag.model = model;
            return(View());
        }
Beispiel #9
0
        public ActionResult YearCourseFillUpNumberConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 20);

            ViewBag.model = model;
            return(View());
        }
Beispiel #10
0
        public ActionResult TestMaxNumberConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 27);

            ViewBag.model = model;
            return(View());
        }
Beispiel #11
0
        public ActionResult ClassOpingTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 29);

            ViewBag.model = model;
            return(View());
        }
Beispiel #12
0
        public ActionResult AfterVideoJoinTestConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 25);

            ViewBag.model = model;
            return(View());
        }
Beispiel #13
0
        public ActionResult TestAnswerTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 26);

            ViewBag.model = model;
            return(View());
        }
Beispiel #14
0
        public ActionResult FillUpTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 23);

            ViewBag.model = model;
            return(View());
        }
Beispiel #15
0
        public ActionResult ConcentrationTeachTimeConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 24);

            ViewBag.model = model;
            return(View());
        }
Beispiel #16
0
        public ActionResult ClassTemplateConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 31);

            ViewBag.model = model;
            return(View());
        }
Beispiel #17
0
        public ActionResult QueuechangeNormalNumberConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 21);

            ViewBag.model = model;
            return(View());
        }
Beispiel #18
0
        public ActionResult CourseUpperLimitConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 18);

            ViewBag.model = model;
            return(View());
        }
Beispiel #19
0
        public ActionResult CompletionOnlineTestTimes()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 33);

            ViewBag.model = model;
            return(View());
        }
Beispiel #20
0
        public ActionResult CPAYealTargetHoursConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 16);

            ViewBag.model = model;
            return(View());
        }
Beispiel #21
0
        public ActionResult TrainTimeLimitConfig()
        {
            var model = AllSystemConfigs.Find(p => p.ConfigType == 14);

            ViewBag.model = model;
            return(View());
        }
Beispiel #22
0
        public ActionResult EmailConfig()
        {
            //Sys_ParamConfig model = paramconfigBL.GetSys_ParamConfig(1);
            var model = AllSystemConfigs.Find(p => p.ConfigType == 1);

            ViewBag.model = model;
            return(View());
        }
Beispiel #23
0
        /// <summary>
        /// 我的培训首页
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult MyTrainIndex()
        {
            var uid       = CurrentUser == null ? 0 : CurrentUser.UserId;
            var usermodel = InitSuper;
            //所内目标学时
            string result = "0";
            //CPA目标学时
            string CPAresult = "0";
            //个人总学时(除CPA)
            decimal userscore = 0;
            //全年补预定次数
            int ordercount = 0;

            if (uid != 0)
            {
                //CPA目标学时
                Sys_ParamConfig cpazq1 = AllSystemConfigs.Where(p => p.ConfigType == 16).FirstOrDefault();
                CPAresult = cpazq1.ConfigValue;

                //计算个人学时
                Sys_ParamConfig cpazq2 = AllSystemConfigs.Where(p => p.ConfigType == 14).FirstOrDefault();
                userscore = UserBL.GetUserScore(uid, cpazq2);

                usermodel = UserBL.GetmodelCAP(uid);
                Sys_ParamConfig cpazq   = AllSystemConfigs.Where(p => p.ConfigType == 13).FirstOrDefault();
                string          mianstr = cpazq.ConfigValue + ";";
                string          substr  = "(?<=" + usermodel.TrainGrade + "-).*?(?=;)";
                //string substr = "(?<=B-).*?(?=;)";
                result = Regex.Match(mianstr, substr).Value;



                //全年补预定次数
                Sys_ParamConfig cpazq3 = AllSystemConfigs.Where(p => p.ConfigType == 20).FirstOrDefault();
                ordercount = Convert.ToInt32(cpazq3.ConfigValue);
                if (usermodel.ordertimes > ordercount)
                {
                    usermodel.ordertimes = ordercount;
                }
            }
            ViewData["model"] = usermodel;
            ViewBag.PayGrade  = CurrentUser.PayGrade;

            var Sys_ParamConfig = AllSystemConfigs.Find(p => p.ConfigType == 33);

            //读参数配置获取全年在线测试完成次数
            ViewBag.ALLOnLineTestNum = Sys_ParamConfig.ConfigValue;

            ViewBag.PassOnLineTestNum = IAttendce.GetMyExamListPassCount(CurrentUser.UserId, CurrentUser.TrainGrade, CurrentUser.DeptId, " ((way=1 and PassStatus=1) or (way=2 and IsPass=1))");
            ViewBag.CourseLe          = result;
            ViewBag.UserScore         = userscore;
            ViewBag.CPACourseLe       = CPAresult;
            ViewBag.OrderCount        = ordercount;

            return(View());
        }
Beispiel #24
0
        public ActionResult AlllevelTrainTargetTimeConfig()
        {
            var list  = ISysTrainGradeBL.GetAllTrainGrade();
            var model = AllSystemConfigs.Find(p => p.ConfigType == 13);

            //list.Add(model);
            ViewBag.list = list;


            ViewBag.model = model;
            return(View());
        }
        /// <summary>
        /// 提交指定人员至 课程预定表
        /// </summary>
        /// <param name="courseId"></param>
        /// <param name="strUserIds"></param>
        /// <returns></returns>
        public JsonResult SubmitAssignUser(int courseId, string strUserIds)
        {
            int page = 1;

            if (Session["cdspage"] != null)
            {
                string   sess = Session["cdspage"].ToString();
                string[] att  = Regex.Split(sess, "㉿", RegexOptions.IgnoreCase);
                page = Convert.ToInt32(att[0]);
            }
            if (!string.IsNullOrEmpty(strUserIds))
            {
                var course = _courseBL.GetCo_Course(courseId);
                if (course != null)
                {
                    //课程【特殊人群/指定】报名
                    _courseOrderBL.AddSpecialCrowdUserToCourse(courseId, course.CourseName, course.StartTime, course.EndTime, 1, strUserIds, AllSystemConfigs.Find(p => p.ConfigType == 21).ConfigValue.GetDouble());

                    var content = GetFormworkContent(1);
                    if (!string.IsNullOrWhiteSpace(content))
                    {
                        var userList  = _userBL.GetList(" sys_user.userid in (select id from dbo.F_SplitIDs('" + strUserIds + "')) and sys_user.isteacher< 2 and sys_user.isdelete = 0 and (sys_user.realname is not null or sys_user.realname <> '')");
                        var messList  = new List <KeyValuePair <string, string> >();
                        var emailList = new List <KeyValuePair <string, string> >();
                        for (int i = 0; i < userList.Count; i++)
                        {
                            if (!string.IsNullOrWhiteSpace(userList[i].Realname))
                            {
                                var c = string.Format(content,
                                                      userList[i].Realname,
                                                      CurrentUser.Realname,
                                                      DateTime.Now.ToString("yyyy-MM-dd HH:mm"),
                                                      course.CourseName,
                                                      course.StartTime.ToString("yyyy-MM-dd HH:mm"));
                                if (!string.IsNullOrWhiteSpace(userList[i].MobileNum))
                                {
                                    messList.Add(new KeyValuePair <string, string>(userList[i].MobileNum, c));
                                }
                                if (!string.IsNullOrWhiteSpace(userList[i].Email))
                                {
                                    emailList.Add(new KeyValuePair <string, string>(userList[i].Email, c));
                                }
                            }
                        }
                        if (messList.Count > 0)
                        {
                            SendMessage(messList);
                        }
                        if (emailList.Count > 0)
                        {
                            SendEmail(emailList, "有人给代报了课程,快来看看吧!");
                        }
                    }
                }
                return(Json(new
                {
                    result = 1,
                    indexpage = page
                }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new
            {
                result = 0
            }, JsonRequestBehavior.AllowGet));
        }
Beispiel #26
0
        /// <summary>
        /// 根据配置文件和当前时间,获取本年度的开始时间和结束时间
        /// 如(startTime = 2012-10-01 0:00:00 ; endTime = 2012-12-31 23:59:59 )
        /// </summary>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        protected void GetYearStartAndEnd(out DateTime startTime, out DateTime endTime, int year)
        {
            Sys_ParamConfig yearConfig = AllSystemConfigs.Find(p => p.ConfigType == 7);

            new Tr_MonthPlanBL().GetYearStartAndEnd(out startTime, out endTime, yearConfig, year);
        }