Ejemplo n.º 1
0
        public void Bind_Data()
        {
            BLL.CCOM.Teach_week week_bll = new BLL.CCOM.Teach_week();
            List <university.Model.CCOM.Teach_week> week_models = week_bll.GetModelList("");
            string ht = "";

            foreach (university.Model.CCOM.Teach_week week_model in week_models)
            {
                if (week_model != null)
                {
                    ht += "<li id=\"section-1\" class=\"mainTab\">";
                    ht += "<hr style=\"height:10px;border:none;border-top:10px groove skyblue;\" />";
                    ht += "<div class=\"content\">";
                    ht += "<div class=\"span4\">";
                    ht += "<h3 class=\"sectionname\"><span>" + GetDateString(week_model.Start_time) + " - " + GetDateString(week_model.End_time) + "</span></h3><hr /></div>";
                    ht += "<div class=\"span6\" style=\"padding:22px 0;\">";
                    ht += "<a href=\"WeeklyAdd.aspx?weeklyId=" + week_model.TeachWeek_id + "&action=" + MyEnums.ActionEnum.Edit.ToString() + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><i class=\"icon-pencil\"></i>修改</a>&nbsp;";
                    ht += "<a onclick=\"javascript:DeleteWeekly(" + week_model.TeachWeek_id + ")\"><i class=\"icon-remove\"></i>删除</a></div>";
                    ht += "<ul class=\"span12\">";
                    BLL.CCOM.Homework work_bll = new BLL.CCOM.Homework();
                    List <university.Model.CCOM.Homework> work_models = work_bll.GetModelList(" Week_id=" + week_model.TeachWeek_id);
                    foreach (university.Model.CCOM.Homework work_model in work_models)
                    {
                        ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">";
                        ht += "<a><img src=\"/images/sendfile.png\"/>  提交" + (new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name) + "</a>";
                        ht += "</div></div></div></div></li>";
                    }
                    ht += "</ul></div></li>";
                }
            }
            this.week_list.InnerHtml = ht;
        }
        public void Bind_Data()
        {
            BLL.CCOM.Teach_week week_bll = new BLL.CCOM.Teach_week();
            List <university.Model.CCOM.Teach_week> week_models = week_bll.GetModelList("");
            string ht = "";

            foreach (university.Model.CCOM.Teach_week week_model in week_models)
            {
                if (week_model != null)
                {
                    ht += "<li id=\"section-1\" class=\"mainTab\">";
                    ht += "<hr style=\"height:10px;border:none;border-top:10px groove skyblue;\" />";
                    ht += "<div class=\"content\">";
                    ht += "<div class=\"span4\">";
                    ht += "<h3 class=\"sectionname\"><span>" + GetDateString(week_model.Start_time) + " - " + GetDateString(week_model.End_time) + "</span></h3><hr /></div>";
                    ht += "<div class=\"span6\" style=\"padding:22px 0;\">";
                    ht += "</div><ul class=\"span12\">";
                    BLL.CCOM.Homework work_bll = new BLL.CCOM.Homework();
                    List <university.Model.CCOM.Homework> work_models = work_bll.GetModelList(" Week_id=" + week_model.TeachWeek_id);
                    foreach (university.Model.CCOM.Homework work_model in work_models)
                    {
                        if (work_model.DatumType_id == 2)//如果类型是提交开题报告
                        {
                            ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">";
                            ht += "<a href=\"StudentSubmit.aspx?homeworkId=" + work_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/>  提交" + (new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name) + "</a>";
                            ht += "</div></div></div></div></li>";
                        }
                        else
                        {
                            ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">";
                            ht += "<a href=\"StudentSubmit.aspx?homeworkId=" + work_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/>  提交" + (new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name) + "</a>";
                            ht += "</div></div></div></div></li>";
                        }
                    }
                    ht += "</ul></div></li>";
                }
            }
            Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation();
            model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id + "and Accept_state=1");
            if (model == null)
            {
                ht = " <div class=\"content\" align=\"center\"><h3>您尚无选题<h3></div>";
            }
            this.week_list.InnerHtml = ht;
        }
Ejemplo n.º 3
0
        public void Bind_Data()
        {
            BLL.CCOM.Teach_week week_bll = new BLL.CCOM.Teach_week();
            List <university.Model.CCOM.Teach_week> week_models = week_bll.GetModelList("");
            string ht = "";

            foreach (university.Model.CCOM.Teach_week week_model in week_models)
            {
                if (week_model != null)
                {
                    ht += "<li id=\"section-1\" class=\"mainTab\">";
                    ht += "<hr style=\"height:10px;border:none;border-top:10px groove skyblue;\" />";
                    ht += "<div class=\"content\">";
                    ht += "<div class=\"span4\">";
                    ht += "<h3 class=\"sectionname\"><span>" + GetDateString(week_model.Start_time) + " - " + GetDateString(week_model.End_time) + "</span></h3><hr /></div>";
                    ht += "<div class=\"span6\" style=\"padding:22px 0;\">";
                    ht += "</div><ul class=\"span12\">";

                    BLL.CCOM.View_Weeklog weeklog_bll = new BLL.CCOM.View_Weeklog();
                    List <university.Model.CCOM.View_Weeklog> worklog_models = weeklog_bll.GetModelList(" TeachWeek_id=" + week_model.TeachWeek_id + " and Teacher_id=" + GetAdminInfo_CCOM().User_id);
                    foreach (university.Model.CCOM.View_Weeklog weeklog_model in worklog_models)
                    {
                        ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">";
                        ht += "<a href=\"TeacherCheck.aspx?CheckId=" + weeklog_model.Weeklog_id + "&Homework_id=" + weeklog_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/>  查看" + weeklog_model.User_realname + "提交的周志</a>";
                        ht += "</div></div></div></div></li>";
                    }

                    BLL.CCOM.View_Datum datum_bll = new BLL.CCOM.View_Datum();
                    List <university.Model.CCOM.View_Datum> datum_models = datum_bll.GetModelList(" TeachWeek_id=" + week_model.TeachWeek_id + " and Tutor_id=" + GetAdminInfo_CCOM().User_id);
                    foreach (university.Model.CCOM.View_Datum datum_model in datum_models)
                    {
                        ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">";
                        ht += "<a href=\"TeacherCheck.aspx?CheckId=" + datum_model.Datum_id + "&Homework_id=" + datum_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/>  查看" + new BLL.CCOM.User_information().GetModel(datum_model.Student_id).User_realname + "提交的" + datum_model.DatumType_name + "</a>";
                        ht += "</div></div></div></div></li>";
                    }

                    ht += "</ul></div></li>";
                }
            }
            this.week_list.InnerHtml = ht;
        }