Ejemplo n.º 1
0
    /// <summary>
    /// 先删除学生表中的毕业学生,再删除Ftp用户中的记录,再删除Signin表中的记录, 最后删除Web用户
    /// 学年升级(只是年级改变)不影响Ftp账号使用(因为Ftp账号是根据Syear,Sclass,Snum入学年份、班级、学号创建
    /// Ftp目录也是根据Syear,Sclass,Snum入学年份、班级、学号创建)
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Btnupgrade_Click(object sender, EventArgs e)
    {
        LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
        if (rm.GradeCount() > 0)
        {
            DateTime nowtime1         = DateTime.Now;
            LearnSite.BLL.Students st = new LearnSite.BLL.Students();
            if (st.GetCounts() > 0)
            {
                st.Upgrade();    //所有年级升一级,并删除班级表中不存在班级的学生
                System.Threading.Thread.Sleep(1000);
                LearnSite.BLL.Signin sg = new LearnSite.BLL.Signin();
                sg.Upgrade();    // 在签到表中删除学生表中不存在班级的学生

                DateTime nowtime2 = DateTime.Now;
                Labelmsg.Text      = "学年升级成功! 用时" + LearnSite.Common.Computer.Datagone(nowtime1, nowtime2) + "秒";
                Btnupgrade.Enabled = false;
                LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
                rbll.UpdateRhidNone(); //清除班级选择
                LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
                bll.HideCourse();      //将所有发布的学案收回,处于未发布状态
                LearnSite.Common.WordProcess.Alert("请给任课老师重新选择新学期任教班级!", this.Page);
                Session["Upgraded"] = "Done";
            }
            else
            {
                Labelmsg.Text = "没有学生";
            }
        }
        else
        {
            Labelmsg.Text = "班级未设置!";
        }
    }
Ejemplo n.º 2
0
 protected void BtnCreate_Click(object sender, EventArgs e)
 {
     if (Request.Cookies["TeacherCookies"] != null)
     {
         if (Texttitle.Text != "")
         {
             string ctitle = Texttitle.Text.Trim();
             LearnSite.Model.Courses course = new LearnSite.Model.Courses();
             course.Ctitle = Texttitle.Text;
             course.Cclass = DDLclass.SelectedValue;
             course.Cobj = Int32.Parse(DDLcobj.SelectedValue);
             course.Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
             course.Cks = Int32.Parse(DDLCks.SelectedValue);
             course.Chid = Int32.Parse(Request.Cookies["TeacherCookies"].Values["Hid"].ToString());//教师编号
             course.Cdate = DateTime.Now;
             course.Cpublish = Checkcpublish.Checked;
             LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
             int GetCid = cbll.Create(course);
             Labelmsg.Text = GetCid.ToString();
             if (GetCid > 0)
             {
                 string urlstr = "~/Teacher/courseedit.aspx?Cid=" + GetCid;
                 Response.Redirect(urlstr, false);
             }
             else
             {
                 Labelmsg.Text = "创建新课程失败!";
             }
         }
         else
         {
             Labelmsg.Text = "请输入新建课程名称!";
         }
     }
 }
Ejemplo n.º 3
0
    /// <summary>
    /// 显示本班级已学和未学学案
    /// </summary>
    private void Showkc()
    {
        int Rhid   = tcook.Hid;
        int Rgrade = Int32.Parse(DDLgrade.SelectedValue);
        int Rclass = Int32.Parse(DDLclass.SelectedValue);

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        int Syear = sbll.GetYear(Rgrade, Rclass);

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        int    Wterm             = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        string Wcids             = wbll.ShowDoneWorkCids(Rgrade, Rclass, Wterm, Syear);

        LearnSite.BLL.TopicReply Tbll = new LearnSite.BLL.TopicReply();
        string Tcids = Tbll.ShowDoneReplyCids(Rgrade, Rclass, Wterm, Syear);

        LearnSite.BLL.SurveyFeedback fbll = new LearnSite.BLL.SurveyFeedback();
        string Fcids   = fbll.ShowFeedbackCids(Rgrade, Rclass, Wterm, Syear);
        string allCids = Wcids + Tcids + Fcids;

        allCids = LearnSite.Common.WordProcess.SimpleWords(allCids);
        LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
        DLdonekc.DataSource = cs.ShowClassDoneCourse(Rgrade, Rhid, allCids);
        DLdonekc.DataBind();
        DLnewkc.DataSource = cs.ShowClassnewCourse(Rgrade, Rhid, allCids);
        DLnewkc.DataBind();
    }
Ejemplo n.º 4
0
 protected void Btnedit_Click(object sender, EventArgs e)
 {
     string fckstr = FCKeditor1.Value;
         if (fckstr != "")
         {
             if (Request.Cookies["TeacherCookies"] != null)
             {
                 string serverUrl=LearnSite.Common.WordProcess.ServerUrl();
                 fckstr = fckstr.Replace(serverUrl, "");
                 LearnSite.Model.Courses course = new LearnSite.Model.Courses();
                 course.Cid = GetCid;
                 course.Ctitle = Texttitle.Text.Trim();
                 course.Cclass = DDLclass.SelectedValue;
                 course.Ccontent = HttpUtility.HtmlEncode(fckstr);
                 course.Cdate = DateTime.Now;
                 course.Cks = Int32.Parse(DDLCks.SelectedValue);
                 course.Cobj = Int32.Parse(DDLcobj.SelectedValue);
                 course.Cterm = Int32.Parse(DDLCterm.SelectedValue);
                 course.Chid = Int32.Parse(Request.Cookies["TeacherCookies"].Values["Hid"].ToString());
                 course.Cpublish = CheckPublish.Checked;
                 LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses();
                 coursebll.UpdateCourse(course);
                 System.Threading.Thread.Sleep(1500);
                 string msg = "更新课程内容成功!";
                 LearnSite.Common.MessageBox.Alert(msg, this.Page);
                 string Cid = Request.QueryString["Cid"].ToString();
                 string url = "~/Teacher/courseshow.aspx?Cid=" + Cid;
                 Response.Redirect(url, false);
             }
        }
 }
Ejemplo n.º 5
0
    private void ShowCourse()
    {
        string Cid = Request.QueryString["Cid"].ToString();

        if (LearnSite.Common.WordProcess.IsNum(Cid))
        {
            LearnSite.Model.Courses model = new LearnSite.Model.Courses();
            LearnSite.BLL.Courses   cs    = new LearnSite.BLL.Courses();
            model = cs.GetModel(Int32.Parse(Cid));
            if (model != null)
            {
                LabelCtitle.Text   = model.Ctitle;
                LabelCdate.Text    = model.Cdate.ToString();
                LabelCclass.Text   = model.Cclass;
                LabelCobj.Text     = model.Cobj.ToString();
                LabelCterm.Text    = model.Cterm.ToString();
                LabelCks.Text      = model.Cks.ToString();
                Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
            }
            else
            {
                Ccontent.InnerHtml = "此学案不存在!";
            }
            LabelWelcome.Text = "您好,欢迎开始本课旅程!";
        }
    }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LearnSite.Common.CookieHelp.JudgeTeacherCookies();
     ImageBtnDel.Attributes["OnClick"] = "return confirm('您确定要删除该作品吗?');";
     if (!IsPostBack)
     {
         if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
         {
             if (Request.QueryString["Cid"] != null)
             {
                 int Wcid = Int32.Parse(Request.QueryString["Cid"].ToString());
                 LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
                 string ctitle = cbll.GetTitle(Wcid);
                 LabeCtitle.Text   = "《" + ctitle + "》";
                 Master.Page.Title = LearnSite.Common.CookieHelp.SetMainPageTitle() + "《" + ctitle + "》未评作品列表页面";
                 ShowClass();
                 Readwork();
                 showflash();
             }
             else
             {
                 Response.Redirect("~/Teacher/works.aspx", false);
             }
         }
     }
 }
Ejemplo n.º 7
0
    private void showtopic()
    {
        if (Request.QueryString["Tid"] != null)
        {
            int tid = Int32.Parse(Request.QueryString["Tid"].ToString());
            LearnSite.BLL.TopicDiscuss   tbll   = new LearnSite.BLL.TopicDiscuss();
            LearnSite.Model.TopicDiscuss tmodel = new LearnSite.Model.TopicDiscuss();
            tmodel              = tbll.GetModel(tid);//获取主题讨论实体
            Labeltopic.Text     = tmodel.Ttitle;
            TcloseCheck.Checked = tmodel.Tclose;

            Topics.InnerHtml = "<br/>&nbsp;讨论内容:" + HttpUtility.HtmlDecode(tmodel.Tcontent);
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            Labelcourse.Text = cbll.GetTitle(tmodel.Tcid.Value);//获取学案名称

            LearnSite.BLL.TopicReply rbll = new LearnSite.BLL.TopicReply();

            TopicsResult.InnerHtml = "<br/>&nbsp;老师总结:";

            if (tmodel.Tclose)
            {
                Btnword.Enabled   = false;//不可发表讨论
                Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "当前主题讨论关闭!";
            }
            else
            {
                Btnword.Enabled   = true;//可发表讨论
                Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "当前主题讨论开启!";
            }
        }
    }
Ejemplo n.º 8
0
    private void showSummary()
    {
        if (Request.QueryString["Scid"] != null)
        {
            int Sgrade = cook.Sgrade;
            int Sclass = cook.Sclass;
            int Scid   = Int32.Parse(Request.QueryString["Scid"].ToString());
            LearnSite.Model.Summary smodel = new LearnSite.Model.Summary();
            LearnSite.BLL.Summary   sbll   = new LearnSite.BLL.Summary();
            int hid = cook.Rhid;
            smodel = sbll.GetModelByClass(Scid, hid, Sgrade, Sclass);
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            Label1.Text = cbll.GetTitle(Scid);
            if (smodel != null)
            {
                contentstr         = HttpUtility.HtmlDecode(smodel.Scontent);
                Label6.Text        = smodel.Sdate.ToString();
                ButtonEdit.Text    = "保存修改";
                ButtonEdit.ToolTip = smodel.Sid.ToString();//临时保存要修改的总结ID
            }
            else
            {
                ButtonEdit.Text    = "添加总结";
                ButtonEdit.ToolTip = "";
            }
            int    Syear = cook.Syear;
            string Snum  = cook.Snum;

            string teasnum = "s" + hid + Syear.ToString() + Sgrade.ToString() + Sclass.ToString();
            if (teasnum == Snum)
            {
                ButtonEdit.Enabled = true;
            }
        }
    }
Ejemplo n.º 9
0
    protected void Btnedit_Click(object sender, EventArgs e)
    {
        string fckstr = mcontent.InnerText;

        if (fckstr != "")
        {
            if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
            {
                string Mcidstr = Request.QueryString["Cid"].ToString();
                int    myCid   = Int32.Parse(Mcidstr);
                LearnSite.Model.Courses course = new LearnSite.Model.Courses();
                course.Cid      = myCid;
                course.Ctitle   = Texttitle.Text.Trim();
                course.Cclass   = DDLclass.SelectedValue;
                course.Ccontent = HttpUtility.HtmlEncode(fckstr);
                course.Cdate    = DateTime.Now;
                course.Cks      = Int32.Parse(DDLCks.SelectedValue);
                course.Cobj     = Int32.Parse(DDLcobj.SelectedValue);
                course.Cterm    = Int32.Parse(DDLCterm.SelectedValue);
                course.Chid     = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString());
                course.Cpublish = CheckPublish.Checked;
                LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses();
                coursebll.UpdateCourse(course);
                System.Threading.Thread.Sleep(500);
                string msg = "更新学案内容成功!";
                LearnSite.Common.MessageBox.Alert(msg, this.Page);
                string url = "~/Teacher/courseshow.aspx?Cid=" + myCid.ToString();
                Response.Redirect(url, false);
            }
        }
    }
Ejemplo n.º 10
0
 private void showold()
 {
     if (LearnSite.Common.CookieHelp.IsStudentLogin())
     {
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         GridViewdonekc.DataSource = cs.ShowDoneCourseNew(LabelCids.Text);
         GridViewdonekc.DataBind();
     }
 }
Ejemplo n.º 11
0
    private void ListImportCourse()
    {
        string cids = LabelnewCids.Text;

        if (!string.IsNullOrEmpty(cids))
        {
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            GVCourse.DataSource = cbll.getCidsCourses(cids);
            GVCourse.DataBind();
        }
    }
Ejemplo n.º 12
0
 private void ShowLession()
 {
     if (DDLgrade.SelectedValue != ""&&DDLterm.SelectedValue!="")
     {
         int Cobj =int.Parse( DDLgrade.SelectedValue);
         int Cterm = int.Parse(DDLterm.SelectedValue);
         LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
         GVCourse.DataSource = bll.GetListLession(Cterm, Cobj);
         GVCourse.DataBind();
     }
 }
Ejemplo n.º 13
0
    private void shownew()
    {
        int    Cterm  = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        string Cnum   = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
        int    Cgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int    Chid   = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Rhid"].ToString());

        LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
        GridViewnewkc.DataSource = cs.ShowNewCourseNew(Cgrade, Cterm, Chid, LabelCids.Text);
        GridViewnewkc.DataBind();
    }
Ejemplo n.º 14
0
 protected void ButtonDel_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["Cid"] != null)
     {
         string Cid = Request.QueryString["Cid"];
         LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses();
         coursebll.Delete(Int32.Parse(Cid));
         System.Threading.Thread.Sleep(1000);
         Response.Redirect("~/Teacher/course.aspx", false);
     }
 }
Ejemplo n.º 15
0
    protected void GVCourse_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string pCid = e.CommandArgument.ToString();

        if (e.CommandName == "U")
        {
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            cbll.UpdateCold(Int32.Parse(pCid));
            CoursesOld();
        }
    }
Ejemplo n.º 16
0
 private void ShowCourseFiled()
 {
     if (Request.QueryString["Mcid"] != null)
     {
         int Mcid = Int32.Parse(Request.QueryString["Mcid"].ToString());
         LearnSite.BLL.Courses   cbll   = new LearnSite.BLL.Courses();
         LearnSite.Model.Courses cmodel = new LearnSite.Model.Courses();
         cmodel = cbll.GetModel(Mcid);
         DDLmfiletype.SelectedValue = cmodel.Cfiletype;
     }
 }
Ejemplo n.º 17
0
    private void shownew()
    {
        int    Cterm  = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        string Cnum   = cook.Snum;
        int    Cgrade = cook.Sgrade;
        int    Chid   = cook.Rhid;

        LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
        GridViewnewkc.DataSource = cs.ShowNewCourseNew(Cgrade, Cterm, Chid, LabelCids.Text);
        GridViewnewkc.DataBind();
    }
Ejemplo n.º 18
0
    private void showCid()
    {
        int Chid  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString());//教师编号
        int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
        int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());

        LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
        DDLCid.DataSource     = cbll.ShowCidCtitle(Chid, Cobj, Cterm);
        DDLCid.DataTextField  = "Ctitle";
        DDLCid.DataValueField = "Cid";
        DDLCid.DataBind();
    }
Ejemplo n.º 19
0
    private void showCid()
    {
        int Chid  = tcook.Hid;
        int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
        int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());

        LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
        DDLCid.DataSource     = cbll.ShowCidCtitle(Chid, Cobj, Cterm);
        DDLCid.DataTextField  = "Ctitle";
        DDLCid.DataValueField = "Cid";
        DDLCid.DataBind();
    }
Ejemplo n.º 20
0
 private void CoursesOld()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();
         LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
         int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
         int Cterm = Int32.Parse(DDLterm.SelectedValue);
         GVCourse.DataSource = course.GetOldHidList(Cobj, Cterm, Int32.Parse(Hid));
         GVCourse.DataBind();
     }
 }
Ejemplo n.º 21
0
 protected void ButtonDel_Click(object sender, EventArgs e)
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"] != null)
     {
         int Cid  = Int32.Parse(Request.QueryString["Cid"].ToString());
         int Chid = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString());
         LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses();
         coursebll.DeleteCourse(Cid, Chid);
         System.Threading.Thread.Sleep(500);
         Response.Redirect("~/Teacher/course.aspx", false);
     }
 }
Ejemplo n.º 22
0
    private void showWorks()
    {
        string midselect = Rblmission.SelectedValue;
        string cidselect = Rblcourse.SelectedValue;

        if (!string.IsNullOrEmpty(midselect) && !string.IsNullOrEmpty(cidselect))
        {
            string yearselect          = Rblyear.SelectedValue;
            string gradeselect         = Rblgrade.SelectedValue;
            string classselect         = Rblclass.SelectedValue;
            string termselect          = Rblterm.SelectedValue;
            string displaymodel        = Rbldisplay.SelectedValue;
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            string ctitle = cbll.GetTitle(Int32.Parse(cidselect));
            LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission();
            string mtitle = mbll.GetMissionTitle(Int32.Parse(midselect));
            LabelTitle.Text = "【" + ctitle + "】" + mtitle;
            LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
            switch (displaymodel)
            {
            case "1":
                DLworks.DataSource = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect));
                DLworks.DataBind();
                divlist.Visible  = true;
                divview.Visible  = false;
                Literal1.Visible = false;
                break;

            case "2":
                DDLstore.DataSource     = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect));
                DDLstore.DataTextField  = "Wname";
                DDLstore.DataValueField = "Wurl";
                DDLstore.DataBind();
                divlist.Visible  = false;
                divview.Visible  = true;
                Literal1.Visible = true;
                if (DDLstore.Items.Count > 0)
                {
                    DDLstore.SelectedIndex = 0;
                    showflash();
                }
                break;
            }
        }
        else
        {
            LabelTitle.Text  = "没有作品!";
            divlist.Visible  = false;
            divview.Visible  = false;
            Literal1.Visible = false;
        }
    }
Ejemplo n.º 23
0
    protected void DLnewkc_ItemCommand(object source, DataListCommandEventArgs e)
    {
        int Cid = Int32.Parse(DLnewkc.DataKeys[e.Item.ItemIndex].ToString());

        if (e.CommandName == "P" && Btnset.Enabled)
        {
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            cbll.UpdateCpublish(Cid);
            System.Threading.Thread.Sleep(200);
            Showkc();
            showCid();
        }
    }
Ejemplo n.º 24
0
 protected void BtnPublish_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["Cid"] != null && Request.QueryString["Cpublish"] != null)
     {
         bool Cpublish = bool.Parse(Request.QueryString["Cpublish"].ToString());
         bool Setpublish = !Cpublish;//取反
         int Cid = Int32.Parse(Request.QueryString["Cid"].ToString());
         LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
         bll.UpdateCpublish(Cid, Setpublish);//修改课程发布状态
         System.Threading.Thread.Sleep(1000);
         Response.Redirect("~/Teacher/course.aspx", false);
     }
 }
Ejemplo n.º 25
0
 private void Showthink()
 {
     if (Request.QueryString["Cid"] != null)
     {
         string Fcid = Request.QueryString["Cid"].ToString();
         LearnSite.Model.Flection flection    = new LearnSite.Model.Flection();
         LearnSite.BLL.Flection   flectionbll = new LearnSite.BLL.Flection();
         flection = flectionbll.GetModel(Int32.Parse(Fcid));
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         Texttitle.Text     = cs.GetTitle(Int32.Parse(Fcid));
         mcontent.InnerText = HttpUtility.HtmlDecode(flection.Fcontent);
     }
 }
Ejemplo n.º 26
0
    protected void BtnZip_Click(object sender, EventArgs e)
    {
        CreatePackage();
        ShowPackage();
        showfilelist();
        BtnZip.Enabled = false;
        string xmlurl  = "~/Package/read.xml";
        string xmlpath = Server.MapPath(xmlurl);

        System.IO.File.Delete(xmlpath);     //先删除,不存在不引发异常
        LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
        cbll.CreatPackageNameList(xmlpath); //生成学案包目录对照表
    }
Ejemplo n.º 27
0
 private void Showthink()
 {
     if (Request.QueryString["Cid"] != null)
     {
         string Fcid = Request.QueryString["Cid"].ToString();
         LearnSite.Model.Flection flection = new LearnSite.Model.Flection();
         LearnSite.BLL.Flection flectionbll = new LearnSite.BLL.Flection();
         flection = flectionbll.GetModel(Int32.Parse(Fcid));
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         Texttitle.Text = cs.GetTitle(Int32.Parse(Fcid));
         FCKeditor1.Value = HttpUtility.HtmlDecode(flection.Fcontent);
     }
 }
Ejemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.Page.Title = "课后讨论";
     }
     if (Request.QueryString["Cid"] != null)
     {
         string Cid = Request.QueryString["Cid"].ToString();
         LearnSite.Store.CourseStore.FCKUserFilesPath(Cid);
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         Texttitle.Text = cs.GetTitle(Int32.Parse(Cid));
     }
 }
Ejemplo n.º 29
0
 private void ShowLession()
 {
     if (HttpContext.Current.Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         if (Session["lessongrade"] != null && Session["lessonterm"] != null && Session["lessonhid"] != null)
         {
             int Cobj  = int.Parse(Session["lessongrade"].ToString());
             int Cterm = int.Parse(Session["lessonterm"].ToString());
             int Chid  = int.Parse(Session["lessonhid"].ToString());
             LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
             GVCourse.DataSource = bll.GetListLession(Cterm, Cobj, Chid);
             GVCourse.DataBind();
         }
     }
 }
Ejemplo n.º 30
0
    private void ShowLessonDetails()
    {
        int Cid =Int32.Parse( Request.QueryString["Cid"].ToString());
        LearnSite.BLL.Courses csbll = new LearnSite.BLL.Courses();
        Repeater1.DataSource = csbll.GetCourseDetail(Cid);
        Repeater1.DataBind();

        LearnSite.BLL.Mission msbll = new LearnSite.BLL.Mission();
        Repeater2.DataSource = msbll.GetMissionDetails(Cid);
        Repeater2.DataBind();

        LearnSite.BLL.Flection fcbll = new LearnSite.BLL.Flection();
        Repeater3.DataSource = fcbll.GetListCid(Cid);
        Repeater3.DataBind();
    }
Ejemplo n.º 31
0
    private void Showcourse()
    {
        int myCid = Int32.Parse(Request.QueryString["Cid"].ToString());

        LearnSite.Model.Courses course = new LearnSite.Model.Courses();
        LearnSite.BLL.Courses   cbll   = new LearnSite.BLL.Courses();
        course                 = cbll.GetModel(myCid);
        Texttitle.Text         = course.Ctitle;
        DDLclass.SelectedValue = course.Cclass;
        DDLcobj.SelectedValue  = course.Cobj.ToString();
        DDLCterm.SelectedValue = course.Cterm.ToString();
        DDLCks.SelectedValue   = course.Cks.ToString();
        mcontent.InnerText     = HttpUtility.HtmlDecode(course.Ccontent);
        CheckPublish.Checked   = course.Cpublish;
    }
Ejemplo n.º 32
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
         {
             if (Request.QueryString["Cid"] != null)
             {
                 string Cid = Request.QueryString["Cid"].ToString();
                 LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
                 Texttitle.Text = cs.GetTitle(Int32.Parse(Cid));
             }
         }
     }
 }
Ejemplo n.º 33
0
    private void ShowCid()
    {
        string Hid    = tcook.Hid.ToString();
        string cterm  = LearnSite.Common.XmlHelp.GetTerm();
        string dgrade = DDLgrade.SelectedValue;

        if (dgrade != "")
        {
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            DDLCid.DataSource     = cbll.ShowCidCtitle(Int32.Parse(Hid), Int32.Parse(dgrade), Int32.Parse(cterm));
            DDLCid.DataTextField  = "Ctitle";
            DDLCid.DataValueField = "Cid";
            DDLCid.DataBind();
        }
    }
Ejemplo n.º 34
0
 private void CoursesLimit()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string Hid = tcook.Hid.ToString();
         LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
         int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
         int Cterm = Int32.Parse(DDLterm.SelectedValue);
         GVCourse.DataSource = course.GetLimitHidList(Cobj, Cterm, Int32.Parse(Hid));
         if (Session[Hid + "pageindex"] != null)
         {
             GVCourse.PageIndex = Int32.Parse(Session[Hid + "pageindex"].ToString());
         }
         GVCourse.DataBind();
     }
 }
Ejemplo n.º 35
0
    private void ShowLessonDetails()
    {
        int Cid = Int32.Parse(Request.QueryString["Cid"].ToString());

        LearnSite.BLL.Courses csbll = new LearnSite.BLL.Courses();
        Repeater1.DataSource = csbll.GetCourseDetail(Cid);
        Repeater1.DataBind();

        LearnSite.BLL.Mission msbll = new LearnSite.BLL.Mission();
        Repeater2.DataSource = msbll.GetMissionDetails(Cid);
        Repeater2.DataBind();

        LearnSite.BLL.Flection fcbll = new LearnSite.BLL.Flection();
        Repeater3.DataSource = fcbll.GetListCid(Cid);
        Repeater3.DataBind();
    }
Ejemplo n.º 36
0
    private void showSummary()
    {
        if (Request.QueryString["Scid"] != null)
        {
            LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

            int Sgrade = cook.Sgrade;
            int Sclass = cook.Sclass;
            int Scid   = Int32.Parse(Request.QueryString["Scid"].ToString());
            LearnSite.Model.Summary smodel = new LearnSite.Model.Summary();
            LearnSite.BLL.Summary   sbll   = new LearnSite.BLL.Summary();
            int hid = cook.Rhid;

            if (hid != 0)
            {
                LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
                Label1.Text = cbll.GetTitle(Scid);
                smodel      = sbll.GetModelByClass(Scid, hid, Sgrade, Sclass);
                if (smodel != null)
                {
                    // LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission();
                    if (smodel.Sshow.Value)
                    {
                        contents.InnerHtml = HttpUtility.HtmlDecode(smodel.Scontent);
                    }
                    else
                    {
                        contents.InnerHtml = "隐藏内容!";
                    }
                    Label6.Text = smodel.Sdate.ToString();
                }
                else
                {
                    contents.InnerHtml = "老师还未填写总结!";
                }
            }
            int    Syear = cook.Syear;
            string Snum  = cook.Snum;

            string teasnum = "s" + hid + Syear.ToString() + Sgrade.ToString() + Sclass.ToString();
            if (teasnum == Snum)
            {
                BtnEdit.Enabled = true;
                BtnEdit.ToolTip = "修改或添加总结!";
            }
        }
    }
Ejemplo n.º 37
0
    private void showtopic()
    {
        if (Request.QueryString["Tid"] != null)
        {
            int tid = Int32.Parse(Request.QueryString["Tid"].ToString());
            LearnSite.BLL.TopicDiscuss   tbll   = new LearnSite.BLL.TopicDiscuss();
            LearnSite.Model.TopicDiscuss tmodel = new LearnSite.Model.TopicDiscuss();
            tmodel              = tbll.GetModel(tid);//获取主题讨论实体
            Labeltopic.Text     = tmodel.Ttitle;
            TcloseCheck.Checked = tmodel.Tclose;

            Topics.InnerHtml = "讨论内容:" + HttpUtility.HtmlDecode(tmodel.Tcontent);
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            string mynum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();

            int sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
            int sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
            int syear  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString());
            int hid    = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Rhid"].ToString());

            string teasnum = "s" + hid + syear.ToString() + sgrade.ToString() + sclass.ToString();
            LearnSite.BLL.TopicReply rbll = new LearnSite.BLL.TopicReply();
            string treply = rbll.getteareply(tid, teasnum);
            TopicsResult.InnerHtml = "老师总结:" + HttpUtility.HtmlDecode(treply);

            if (mynum == teasnum)
            {
                Btnclock.Enabled        = true;
                Btnword.Text            = "老师总结";
                ImageBtngoodall.Visible = true;
            }
            if (tmodel.Tclose)
            {
                Btnword.Enabled   = false;//不可发表讨论
                Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "主题讨论暂停!";
            }
            else
            {
                Btnword.Enabled   = true;//可发表讨论
                Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString();
                Btnclock.ToolTip  = "主题讨论开启!";
            }
        }
    }
Ejemplo n.º 38
0
    private void showSummary()
    {
        if (Request.QueryString["Scid"] != null)
        {
            int Sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
            int Sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
            int Scid   = Int32.Parse(Request.QueryString["Scid"].ToString());
            LearnSite.Model.Summary smodel = new LearnSite.Model.Summary();
            LearnSite.BLL.Summary   sbll   = new LearnSite.BLL.Summary();
            string hid = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Rhid"].ToString();

            if (!string.IsNullOrEmpty(hid))
            {
                LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
                Label1.Text = cbll.GetTitle(Scid);
                smodel      = sbll.GetModelByClass(Scid, Int32.Parse(hid), Sgrade, Sclass);
                if (smodel != null)
                {
                    // LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission();
                    if (smodel.Sshow.Value)
                    {
                        contents.InnerHtml = HttpUtility.HtmlDecode(smodel.Scontent);
                    }
                    else
                    {
                        contents.InnerHtml = "隐藏内容!";
                    }
                    Label6.Text = smodel.Sdate.ToString();
                }
                else
                {
                    contents.InnerHtml = "老师还未填写总结!";
                }
            }
            string Syear = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString();
            string Snum  = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();

            string teasnum = "s" + hid + Syear + Sgrade.ToString() + Sclass.ToString();
            if (teasnum == Snum)
            {
                BtnEdit.Enabled = true;
                BtnEdit.ToolTip = "修改或添加总结!";
            }
        }
    }
Ejemplo n.º 39
0
 private void CksMax()
 {
     int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
     int Cobj = Int32.Parse(DDLcobj.SelectedValue);
     LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
     int cksn = bll.CksMaxValue(Cterm, Cobj);
     int courseperiod = Int32.Parse(LearnSite.Common.XmlHelp.GetTypeName("CoursePeriod"));
     if (cksn > courseperiod)
     {
         BtnCreate.Enabled = false;
         Labelmsg.Text = "超过本学期设定的课时数! <br/>请到website.xml中修改CoursePeriod值!";
     }
     else
     {
         DDLCks.SelectedValue = bll.CksMaxValue(Cterm, Cobj).ToString();
         BtnCreate.Enabled = true;
         Labelmsg.Text = "";
     }
 }
Ejemplo n.º 40
0
 private void ShowThink()
 {
     if (Request.QueryString["Cid"] != null)
     {
         int Fcid =Int32.Parse( Request.QueryString["Cid"].ToString());
         LearnSite.BLL.Flection flection = new LearnSite.BLL.Flection();
         if (flection.ExistsFcid(Fcid))
         {
             Repeater1.DataSource = flection.GetListCid(Fcid);
             Repeater1.DataBind();
             LearnSite.BLL.Courses cs=new LearnSite.BLL.Courses();
             LabelTitle.Text = cs.GetTitle(Fcid);
         }
         else
         {
             string url = "~/Lessons/thinkadd.aspx?Cid=" + Fcid ;
             Response.Redirect(url, false);
         }
     }
 }
Ejemplo n.º 41
0
 private void showcourse(string Cid)
 {
     if (LearnSite.Common.WordProcess.IsNum(Cid))
     {
         LearnSite.Model.Courses model = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         model = cs.GetModel(Int32.Parse(Cid));
         if (model != null)
         {
             LabelCtitle.Text = model.Ctitle;
             LabelCdate.Text = model.Cdate.ToString();
             LabelCclass.Text = model.Cclass;
             LabelCobj.Text = model.Cobj.ToString();
             LabelCterm.Text = model.Cterm.ToString();
             LabelCks.Text = model.Cks.ToString();
             Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
             LearnSite.BLL.Mission mission = new LearnSite.BLL.Mission();
             GVmission.DataSource = mission.GetMissions(Int32.Parse(Cid));
             GVmission.DataBind();
         }
     }
 }
Ejemplo n.º 42
0
 private void ShowCourse()
 {
     string Cid = Request.QueryString["Cid"].ToString();
     if (LearnSite.Common.WordProcess.IsNum(Cid))
     {
         LearnSite.Model.Courses model = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
         model = cs.GetModel(Int32.Parse(Cid));
         if (model != null)
         {
             LabelCtitle.Text = model.Ctitle;
             LabelCdate.Text = model.Cdate.ToString();
             LabelCclass.Text = model.Cclass;
             LabelCobj.Text = model.Cobj.ToString();
             LabelCterm.Text = model.Cterm.ToString();
             LabelCks.Text = model.Cks.ToString();
             Ccontent.InnerHtml = HttpUtility.HtmlDecode(model.Ccontent);
         }
         else
         {
             Ccontent.InnerHtml = "此课程不存在!";
         }
     }
 }
Ejemplo n.º 43
0
 private void ShowGrade()
 {
     LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
     DDLgrade.DataSource = cbll.GetHtmlGrade();
     DDLgrade.DataTextField = "Cobj";
     DDLgrade.DataValueField = "Cobj";
     DDLgrade.DataBind();
 }
Ejemplo n.º 44
0
 private void Showcourse()
 {
     LearnSite.Model.Courses course = new LearnSite.Model.Courses();
         LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
         course = cbll.GetModel(GetCid);
         Texttitle.Text = course.Ctitle;
         DDLclass.SelectedValue = course.Cclass;
         DDLcobj.SelectedValue = course.Cobj.ToString();
         DDLCterm.SelectedValue = course.Cterm.ToString();
         DDLCks.SelectedValue = course.Cks.ToString();
         FCKeditor1.Value =HttpUtility.HtmlDecode( course.Ccontent);
         CheckPublish.Checked = course.Cpublish;
 }
Ejemplo n.º 45
0
    private void ShowKc()
    {
        int Cterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        string Cnum = Request.Cookies["StudentCookies"].Values["Snum"].ToString();
        int Cgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
        LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
        GridViewnewkc.DataSource = cs.ShowNewCourse(Cnum, Cgrade, Cterm);
        GridViewnewkc.DataBind();
        GridViewnewkc.AllowPaging = true;

        GridViewdonekc.DataSource = cs.ShowDoneCourse(Cnum);
        GridViewdonekc.DataBind();
        GridViewdonekc.AllowPaging = true;
    }
Ejemplo n.º 46
0
 private void ShowCid()
 {
     string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
     if (Session[Hid+"Setgrade"] != null && Session[Hid+"Setclass"] != null)
     {
         Labelshow.Text = Session[Hid+"Setgrade"].ToString() + "年级" + Session[Hid+"Setclass"].ToString()+"班---作品展示";
         int Sgrade = Int32.Parse(Session[Hid+"Setgrade"].ToString());
         int Sclass = Int32.Parse(Session[Hid+"Setclass"].ToString());
         LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
         string myCid = wbll.GetTodayCid(Sgrade, Sclass);//获得今天本班课程Cid
         LabelCid.Text = myCid;
         if (myCid != "")
         {
             LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
             LabelCtitle.Text = cbll.GetTitle(Int32.Parse(myCid));//获得课程标题
         }
     }
 }
Ejemplo n.º 47
0
 /// <summary>
 /// 显示本班级已学和未学课程
 /// </summary>
 private void Showkc()
 {
     int Rgrade = Int32.Parse(DDLgrade.SelectedValue);
     int Rclass = Int32.Parse(DDLclass.SelectedValue);
     LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
     DLdonekc.DataSource = cs.ShowClassDoneCourse(Rgrade, Rclass);
     DLdonekc.DataBind();
     DLnewkc.DataSource = cs.ShowClassnewCourse(Rgrade, Rclass);
     DLnewkc.DataBind();
 }
Ejemplo n.º 48
0
 private void ShowCourseFiled()
 {
     if (Request.QueryString["Mcid"] != null)
     {
         int Mcid = Int32.Parse(Request.QueryString["Mcid"].ToString());
         LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
         LearnSite.Model.Courses cmodel = new LearnSite.Model.Courses();
         cmodel = cbll.GetModel(Mcid);
         DDLmfiletype.SelectedValue = cmodel.Cfiletype;
     }
 }
Ejemplo n.º 49
0
 private void CourseList()
 {
     LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
     int grade = Int32.Parse(DDLgrade.SelectedValue);
     int term = Int32.Parse(Session["term"].ToString());
     GVCourse.DataSource = course.GetLimitList(grade, term);
     string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
     if (Session[Hid+"pageindex"] != null)
         GVCourse.PageIndex = Int32.Parse(Session[Hid+"pageindex"].ToString());
     GVCourse.DataBind();
 }