protected void Button3_Click(object sender, EventArgs e)
        {
            CourseManege bll = new CourseManege();

            Repeater1.DataSource = bll.showChecked();
            Repeater1.DataBind();
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int CourseId  = Convert.ToInt32(Request.Params["CourseId"]);
         int StuNumber = new CourseManege().QueryStuNum(CourseId);
         StuNum.Text = StuNumber.ToString();
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         List <Students> stulist = new StudentManage().queryStudentByCourseId(CourseId);
         Repeater1.DataSource = stulist;
         Repeater1.DataBind();
         int ScoreNum = new ScoreManage().queryCouseScoreNum(CourseId);
         //当前该课程只要有记录记录则无法在添加学生成绩,此处可扩展,
         if (ScoreNum > 0)
         {
             Button2.Enabled = false;
             Literal1.Text   = "该课程已完成成绩录入";
         }
     }
 }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CourseManege bll = new CourseManege();

            Repeater1.DataSource = bll.queryAllCourse();
            Repeater1.DataBind();
        }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int CourseId = Convert.ToInt32(Request.Params["CourseId"]);
         StuNum          = new CourseManege().QueryStuNum(CourseId);
         coursename.Text = (new CourseManege().queryCourseById(CourseId)).CourseName;
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         List <Students> stulist = new StudentManage().queryStudentByCourseId(CourseId);
         foreach (Students stu in stulist)
         {
             stu.KqNum = new KqManage().queryStuKqNum(stu.StuId, CourseId);
             stu.HwNum = new HomeworkManage().queryStuHwNum(stu.StuId, CourseId);
         }
         Repeater1.DataSource = stulist;
         Repeater1.DataBind();
         List <Homework> HwList = new HomeworkManage().queryAllHKByTea(CourseId);
         DataList2.DataSource = HwList;
         DataList2.DataBind();
         List <KQ> KqList = new KqManage().queryAllKq(CourseId);
         Repeater2.DataSource = KqList;
         Repeater2.DataBind();
         List <JXGG> gglist = new GGManage().LookJXGG(CourseId);
         Repeater3.DataSource = gglist;
         Repeater3.DataBind();
     }
 }
Exemplo n.º 5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string            name       = TextBox1.Text.Trim().ToString();
            List <CourseMana> courselist = new CourseManege().queryCourseByName(name);

            Repeater1.DataSource = courselist;
            Repeater1.DataBind();
        }
Exemplo n.º 6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int          stuid = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            CourseManege bll   = new CourseManege();

            Repeater1.DataSource = bll.showSelectCourse(stuid);
            Repeater1.DataBind();
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int StuId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            List <CourseMana> courseList = new CourseManege().queryAllCourseByStuId(StuId);

            DataList1.DataSource = courseList;
            DataList1.DataBind();
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int StuId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            List <CourseMana> courlist = new CourseManege().queryAllCourseByStuId(StuId);

            Repeater1.DataSource = courlist;
            Repeater1.DataBind();
            float Point = new CourseManege().queryPoint(StuId);

            point.Text = Point.ToString();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int state = new CourseManege().queryCourseState();
         if (state != 1)
         {
             Response.Write("<script type='text/javascript'>alert('请先开启选课!');history.go(-1)</script>");
         }
     }
 }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int FDYId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            List <Model.Class> courseList = new CourseManege().queryFDYClass(FDYId);

            foreach (Model.Class cla in courseList)
            {
                cla.StuNum = new StudentManage().queryStuNumByClassId(cla.ClassId);
            }
            DataList1.DataSource = courseList;
            DataList1.DataBind();
        }
Exemplo n.º 11
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            int res = new CourseManege().StopCourse();

            if (res == 1)
            {
                Response.Write("<script type='text/javascript'>alert('关闭选课成功!');</script>");
            }
            else
            {
                Response.Write("<script type='text/javascript'>alert('关闭选课失败!');</script>");
            }
        }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int state = new CourseManege().queryCourseState();
                if (state != 1)
                {
                    Response.Write("<script type='text/javascript'>alert('学生选课未开启!');history.go(-1)</script>");
                }
            }
            CourseManege bll = new CourseManege();

            Repeater1.DataSource = bll.queryAllCourse();
            Repeater1.DataBind();
        }
Exemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int state = new CourseManege().queryCourseState();
         if (state == 0)
         {
             Button2.Enabled = false;
         }
         else
         {
             Button1.Enabled = false;
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int state = new CourseManege().queryCourseState();
                if (state != 1)
                {
                    Response.Write("<script type='text/javascript'>alert('成绩录入未开启!');history.go(-2)</script>");
                }
            }
            int TeaId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            List <CourseMes> courseList = new CourseManege().queryTeaCourse(TeaId);

            DataList1.DataSource = courseList;
            DataList1.DataBind();
        }
Exemplo n.º 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //绑定下拉框
         int StuId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
         List <CourseMana> Seasonlist = new CourseManege().querySeason(StuId);
         foreach (CourseMana Season in Seasonlist)
         {
             ddlseason.Items.Add(Season.Season);
         }
         //显示数据
         List <Model.Score> sclist = new ScoreManage().queryScore(StuId);
         Repeater1.DataSource = sclist;
         Repeater1.DataBind();
     }
 }
Exemplo n.º 16
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            float matchratio = float.Parse(TextBox2.Text.Trim());
            float classratio = float.Parse(TextBox1.Text.Trim());
            int   CourseId   = Convert.ToInt32(Request.Params["CourseId"]);
            int   result     = new CourseManege().AddRatio(CourseId, matchratio, classratio);

            if (result == 1)
            {
                Response.Write("<script>window.alert('成功设置分数占比!');</script>");
                Button1.Enabled = false;
            }
            else
            {
                Response.Write("<script>window.alert('分数占比设置失败!');</script>");
            }
        }
Exemplo n.º 17
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            float matchratio = float.Parse(context.Request.Params["matchratio"]);
            float classratio = float.Parse(context.Request.Params["classratio"]);
            int   CourseId   = Convert.ToInt32(context.Request.Params["CourseId"]);
            int   result     = new CourseManege().AddRatio(CourseId, matchratio, classratio);

            if (result == 1)
            {
                context.Response.Write(1);
            }
            else
            {
                context.Response.Write(0);
            }
        }
Exemplo n.º 18
0
        //对课程进行审批
        //protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        //{
        //    CourseManege bll = new CourseManege();
        //    int id = Convert.ToInt32(e.CommandArgument);
        //    if (e.CommandName.Equals("past"))
        //    {
        //        //bll.checkCourseToY(id,);
        //    }
        //    else if (e.CommandName.Equals("nopast"))
        //    {
        //        bll.checkCourseToN(id);
        //    }
        //}

        //添加到课程信息表中
        protected void btn_save_Click(object sender, EventArgs e)
        {
            int          CourseId = Convert.ToInt32(Request.Form["courseId"]);
            CourseMana   course   = new CourseMana();
            CourseManege bll      = new CourseManege();

            course.Season    = season.SelectedItem.Text.Trim();
            course.Time      = Day.SelectedItem.Text.Trim() + Time.SelectedItem.Text.Trim();
            course.CourseAdd = Request.Form["txt_add"];
            if (bll.checkCourseToY(CourseId, course) == 1)
            {
                Response.Write("<script>alert('审核课程成功');</script>");
            }
            else
            {
                Response.Write("<script>alert('成功');</script>");
            }
        }
Exemplo n.º 19
0
        protected void btn_Del_Click(object sender, EventArgs e)
        {
            int CourseId = Convert.ToInt32(((LinkButton)sender).CommandArgument);
            int StuId    = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            int res      = new CourseManege().DeleteSelectedCourse(CourseId, StuId);

            if (res > 0)
            {
                Response.Write("<script>alert('删除成功');</Script>");
            }
            else if (res == -1)
            {
                Response.Write("<script>alert('必修课无法删除');</Script>");
            }
            else
            {
                Response.Write("<script>alert('删除失败');</Script>");
            }
        }
Exemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string ClassId = Convert.ToString(Request.Params["ClassId"]);

            classid.Text = ClassId.ToString();
            List <Students> stulist = new StudentManage().queryStudentByClassId(ClassId);

            foreach (Students stu in stulist)
            {
                stu.GKNum = new ScoreManage().queryGKNum(stu.StuId);
                stu.YXNum = new ScoreManage().queryYXNum(stu.StuId);
            }
            Repeater1.DataSource = stulist;
            Repeater1.DataBind();

            List <CourseMana> courseList = new CourseManege().queryCourseInfoByClassId(ClassId);

            DataList2.DataSource = courseList;
            DataList2.DataBind();
        }
Exemplo n.º 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int             CourseId = Convert.ToInt32(Request.Params["CourseId"]);
         List <ScoreExt> sclist   = new ScoreManage().queryScorebyCourseId(CourseId);
         Repeater1.DataSource = sclist;
         Repeater1.DataBind();
         //绑定下拉框
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         //显示计分比例
         CourseMana course = new ScoreManage().queryRatio(CourseId);
         MatchRatio.Text = course.MatchRatio.ToString();
         ClassRatio.Text = course.ClassRatio.ToString();
     }
 }
Exemplo n.º 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int CourseId = Convert.ToInt32(Request.Params["CourseId"]);
         int HwId     = Convert.ToInt32(Request.Params["HwId"]);
         StuNum = new CourseManege().QueryStuNum(CourseId);
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         List <Answer_Stu> ansList = new HomeworkManage().querySubmitedStu(HwId);
         Repeater1.DataSource = ansList;
         Repeater1.DataBind();
         List <Students> stulist = new HomeworkManage().queryUnsubmitStuId(HwId, CourseId);
         Repeater2.DataSource = stulist;
         Repeater2.DataBind();
     }
 }
Exemplo n.º 23
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            int StuId    = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            int CourseId = Convert.ToInt32(((LinkButton)sender).CommandArgument);
            int result   = new CourseManege().chooseCourse(CourseId, StuId);

            if (result > 0)
            {
                Itamsg.Text = "<script>alert('添加成功!')</script>";
            }
            else if (result == -1)
            {
                Itamsg.Text = "<script>alert('该课程已添加!')</script>";
            }
            else if (result == -2)
            {
                Itamsg.Text = "<script>alert('学分超过上限!')</script>";
            }
            else
            {
                Itamsg.Text = "<script>alert('添加失败!')</script>";
            }
        }
Exemplo n.º 24
0
        protected void btn_save_Click(object sender, EventArgs e)
        {
            CourseMes    course = new CourseMes();
            CourseManege bll    = new CourseManege();

            //course.CourseID= Convert.ToInt32(Request.Form["txt_id"]);
            course.CourseName = Request.Form["txt_name"];
            //course.TeaId= Convert.ToInt32(Request.Form["txt_tid"]);
            course.Xuefen         = Convert.ToSingle(Request.Form["txt_xuefen"]);
            course.courseproperty = Request.Form["ddl_coursexingzhi"];
            course.CourseNum      = Convert.ToInt32(Request.Form["txt_number"]);
            //course.SStatus= Request.Form["txt_zhuangtai"];
            course.TeaId       = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            course.CollegeName = Request.Form["ddl_college"];
            if (bll.AddCourseByTea(course) == 1)
            {
                Response.Write("<script>alert('添加成功');</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败');</script>");
            }
        }