Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["studentNo"] != null)
            {
                studentNo = Request["studentNo"];

                //删除
                if (Request["del"]=="true" && Request["courseNo"] != null)
                {
                    DalOperationAboutStudent dalw = new DalOperationAboutStudent();
                    dalw.DelChooseCourse(studentNo, Request["courseNo"]);
                }

                //提交
                if (Request["add"] =="true" && Request["courseNo"] != null)
                {
                    DalOperationAboutStudent dala = new DalOperationAboutStudent();
                    dala.AddChooseCourse(studentNo, courseNo, termtag, classID);
                    Javascript.RefreshParentWindow("ViewChooseCourse.aspx?studentNo="+studentNo, Page);
                    return;
                }

                DalOperationAboutStudent dal = new DalOperationAboutStudent();
                lblstudentName.Text = dal.GetStudentById(Request["studentNo"]).studentName;
                DalOperationAboutStudent dal1= new DalOperationAboutStudent();
                DataSet ds = dal1.GetCoursesByStudentNo(Request["studentNo"]);
                dlstcourses.DataSource = ds.Tables[0];
                dlstcourses.DataBind();
            }
        }
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
         DalOperationAboutStudent dalOperationAboutStudent = new DalOperationAboutStudent();
         StudentsList student = dalOperationAboutStudent.GetStudentById(UserCookiesInfo.userNo);
         this.spanPhone.InnerText = student.mobileNo;
         this.spanEmail.InnerText = student.emailAddress;
     }
 }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //控制Tab的显示
            string fragmentFlag = "1";

            if (Request["fragment"] != null)
            {
                fragmentFlag = Request["fragment"];
            }

            CommonUtility.ShowLiControl(fragmentFlag, liFragment1, liFragment2, liFragment3
                , divFragment1, divFragment2, divFragment3);

            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
            DalOperationAboutStudent dalOperationAboutStudent = new DalOperationAboutStudent();
            StudentsList student = dalOperationAboutStudent.GetStudentById(UserCookiesInfo.userNo);
            ltlEmail.Text = student.emailAddress;
            ltlPhone.Text = student.mobileNo;
            ltlRemark.Text = student.remark.Trim().Length == 0 ? "暂无" : student.remark.Trim();
        }
    }
Exemplo n.º 4
0
    //========
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //控制Tab的显示

            if (Request["fragment"] != null)
            {
                fragmentFlag = Request["fragment"];
            }

            CommonUtility.ShowLiControl(fragmentFlag, liFragment1, liFragment2, liFragment3, liFragment4
                , liFragment5, liFragment6, liFragment7, liFragment8, liFragment9, divFragment1, divFragment2, divFragment3, divFragment4, divFragment5, divFragment6, divFragment7, divFragment8, divFragment9);

            if (fragmentFlag.Equals("1"))
            {
                startTime.Attributes.Remove("class");
                endTime.Attributes.Remove("class");
                DalOperationAboutGradeCheck doan = new DalOperationAboutGradeCheck();
                DataTable dt = doan.GetTermYear().Tables[0];

                ddlSearchYear.Items.Add(new ListItem("所有", "all"));

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ddlSearchYear.Items.Add(new ListItem("20" + dt.Rows[i]["termYear"].ToString().Trim() + "学年", dt.Rows[i]["termYear"].ToString().Trim()));
                }

                if (!string.IsNullOrEmpty(_ddlSearchYear))
                {
                    for (int i = 0; i < ddlSearchYear.Items.Count; i++)
                    {
                        if (ddlSearchYear.Items[i].Value == _ddlSearchYear.Trim())
                        {
                            ddlSearchYear.SelectedIndex = i;
                            break;
                        }
                    }
                }

                DalOperationStudentSpecility doss = new DalOperationStudentSpecility();

                dt = doss.FindAllStudentSpecilitye().Tables[0];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ddlSearchMajor.Items.Add(new ListItem(dt.Rows[i]["specilityName"].ToString().Trim(), dt.Rows[i]["MajorTypeID"].ToString().Trim()));
                }

                if (!string.IsNullOrEmpty(_ddlSearchMajor))
                {
                    for (int i = 0; i < ddlSearchMajor.Items.Count; i++)
                    {
                        if (ddlSearchMajor.Items[i].Value == _ddlSearchMajor.Trim())
                        {
                            ddlSearchMajor.SelectedIndex = i;
                            break;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(_ddlSearchYear) || (!string.IsNullOrEmpty(_ddlSearchMajor)))
                {
                    GetSchoolClassList();
                }

                if (!string.IsNullOrEmpty(_ddlSearchSchoolClass))
                {
                    for (int i = 0; i < ddlSearchSchoolClass.Items.Count; i++)
                    {
                        if (ddlSearchSchoolClass.Items[i].Value == _ddlSearchSchoolClass.Trim())
                        {
                            ddlSearchSchoolClass.SelectedIndex = i;
                            break;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(_ddlGradeCheckDegree))
                {
                    for (int i = 0; i < ddlGradeCheckDegree.Items.Count; i++)
                    {
                        if (ddlGradeCheckDegree.Items[i].Value == _ddlGradeCheckDegree.Trim())
                        {
                            ddlGradeCheckDegree.SelectedIndex = i;
                            break;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(_ddlGradeCheckLocale))
                {
                    for (int i = 0; i < ddlGradeCheckLocale.Items.Count; i++)
                    {
                        if (ddlGradeCheckLocale.Items[i].Value == _ddlGradeCheckLocale.Trim())
                        {
                            ddlGradeCheckLocale.SelectedIndex = i;
                            break;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(_keyword))
                {
                    txtKeyword.Text = _keyword;
                }

                DataListBind();
            }

            if (fragmentFlag.Equals("2"))
            {
                startTime.Attributes.Remove("class");
                endTime.Attributes.Remove("class");
                DataBindTermTagList(); DataBindSearchCourse();
            }

            if (fragmentFlag.Equals("3"))
            {
                //txtKeyword.Attributes.Add("class", "required");
                DataListBindGradeCheckApplyReason();
            }

            if (fragmentFlag.Equals("5"))
            {
                DalOperationAboutGradeCheck doan = new DalOperationAboutGradeCheck();
                DataTable dt = doan.GetTermYear().Tables[0];

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ddlTermYear.Items.Add(new ListItem("20" + dt.Rows[i]["termYear"].ToString().Trim() + "学年", dt.Rows[i]["termYear"].ToString().Trim()));
                }

                DataListBindGradeCheck();
            }

            if (fragmentFlag.Equals("6"))
            {
                DalOperationAboutGradeCheck doan = new DalOperationAboutGradeCheck();
                DataTable dt = doan.GetTermYear().Tables[0];

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ddlTermYearImportExcelData.Items.Add(new ListItem("20" + dt.Rows[i]["termYear"].ToString().Trim() + "学年", dt.Rows[i]["termYear"].ToString().Trim()));
                }
            }

            if (Request["studentNo"] != null && fragmentFlag.Equals("4"))
            {
                liFragment4.Visible = true;
                studentNo = Request["studentNo"];

                //删除
                if (Request["del"] == "true" && Request["courseNo"] != null && Request["coursesStudentsCorrelationId"] != null)
                {
                    DalOperationAboutStudent dalw = new DalOperationAboutStudent();
                    string coursesStudentsCorrelationId = Request["coursesStudentsCorrelationId"].ToString().Trim();
                    dalw.DelChooseCourseByCoursesStudentsCorrelationId(coursesStudentsCorrelationId);
                }

                DalOperationAboutStudent dal = new DalOperationAboutStudent();
                lblstudentName.Text = dal.GetStudentById(Request["studentNo"]).studentName;
                DalOperationAboutStudent dal1 = new DalOperationAboutStudent();
                DataSet ds = dal1.GetCoursesByStudentNo(Request["studentNo"].ToString().Trim());
                dlstcourses.DataSource = ds.Tables[0];
                dlstcourses.DataBind();
            }

            if (fragmentFlag.Equals("6"))
            {
                BindGradeCheckExcelTemplate(spanAttachment2, false);
            }

            if (Request["studentNo"] != null && fragmentFlag.Equals("7"))
            {
                liFragment7.Visible = true;
                studentNo = Request["studentNo"];
                DlstStudentSchoolClassNameDataBind();
                DlstStudentGradeCheckDataBind();

                if (Request["action"] != null && Request["action"].ToString().Trim() == "delete")
                {
                    dlstStudentGradeCheckDetail_Delete();
                }
            }

            if (fragmentFlag.Equals("8"))
            {
                BindGradeCheckExcelTemplate(spanExcelTemplate, true);

                if (!IsPostBack)
                {
                    Javascript.ExcuteJavascriptCode("initBeforeUnloadEvent('温馨提示:当前页面相关操作必须点击提交才能生效~(此为提示,并不代表您真正未保存数据),确定离开吗?');", Page);
                }
            }

            if (fragmentFlag.Equals("9"))
            {

                BindGradeCheckAllowTime();

                BindGradeCheckNotify();

                if (!IsPostBack)
                {
                    txtNotifyTitle.CssClass = "required";
                    Javascript.ExcuteJavascriptCode("initBeforeUnloadEvent('温馨提示:当前页面数据可能未保存哟~(此为提示,并不代表您真正未保存数据),确定离开吗?');", Page);
                }
            }
        }

        if (fragmentFlag.Equals("1") || fragmentFlag.Equals("2") || fragmentFlag.Equals("6") || fragmentFlag.Equals("8") || fragmentFlag.Equals("9"))
        {
            startTime.Attributes.Remove("class");
            endTime.Attributes.Remove("class");
        }
    }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

            DalOperationAboutStudent stu = new DalOperationAboutStudent();

            StudentsList model = stu.GetStudentById(studentNo);

            DataSet ds = dal.GetAllGradeCheckDetailByStudentNoAndUpdateTime(studentNo, updateTime);

            List<string> listColumn = new List<string>();

            //for (int i=0;i<ds.Tables[0].Rows.Count;i++)
            //{
            //    listColumn.Add(ds.Tables[0].Columns[i].ToString());
            //}

            //for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            //{
            //    LiteralControl ltl = new LiteralControl();
            //    ltl.Text = "<br />" + ds.Tables[0].Rows[i]["gradeCheckItemName"];
            //    PlaceHolder1.Controls.Add(ltl);
            //    TextBox txt = new TextBox();
            //    txt.ID = "txt_" + ds.Tables[0].Rows[i]["gradeCheckId"];
            //    txt.Text = ds.Tables[0].Rows[i]["gradeCheckDetailValue"].ToString().Trim();
            //    PlaceHolder1.Controls.Add(txt);
            //}
            Table tb = new Table();
            tb.CssClass = "tableAddStyleNone";
            tb.Width = Unit.Percentage(100);

            TableRow tr1 = new TableRow();
            TableCell td1 = new TableCell();
            td1.HorizontalAlign = HorizontalAlign.Left;
            td1.CssClass = "border";
            td1.Width = Unit.Percentage(25);
            td1.Text = "当前学生所属班级:";
            tr1.Cells.Add(td1);
            td1 = new TableCell();
            td1.CssClass = "border";
            td1.Text = model.SchoolClassName + "&nbsp;&nbsp;所应用的成绩审核规则为:20"+ model.SchoolClassName.Trim().Substring(0,2) +"学年成绩审核规则";
            tr1.Cells.Add(td1);

            tb.Rows.Add(tr1);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                TableRow tr = new TableRow();
                TableCell td = new TableCell();
                td.HorizontalAlign = HorizontalAlign.Left;
                td.CssClass = "border";
                td.Width = Unit.Percentage(25);

                LiteralControl ltl = new LiteralControl();
                ltl.Text = "<br />" + ds.Tables[0].Rows[i]["gradeCheckItemName"].ToString().Trim();

                td.Controls.Add(ltl);
                tr.Cells.Add(td);

                td = new TableCell();
                td.HorizontalAlign = HorizontalAlign.Left;
                td.CssClass = "border";

                TextBox txt = new TextBox();
                txt.ID = "txt_" + ds.Tables[0].Rows[i]["gradeCheckId"].ToString().Trim();
                txt.Text = ds.Tables[0].Rows[i]["gradeCheckDetailValue"].ToString().Trim();
                td.Controls.Add(txt);
                tr.Cells.Add(td);

                tb.Rows.Add(tr);
            }
            PlaceHolder1.Controls.Add(tb);

            if (!IsPostBack)
            {
                ds = dal.GetStudentGradeCheckConfirm(studentNo, Convert.ToDateTime(updateTime));

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    while (ddlIsAccord.Items.Count > 0)
                    {
                        ddlIsAccord.Items.RemoveAt(0);
                    }

                    if (ds.Tables[0].Rows[i]["isAccord"].ToString().Trim() == "1")
                    {
                        ddlIsAccord.Items.Add(new ListItem("符合", "1"));
                        ddlIsAccord.Items.Add(new ListItem("不符合", "0"));
                    }
                    else
                    {
                        ddlIsAccord.Items.Add(new ListItem("不符合", "0"));
                        ddlIsAccord.Items.Add(new ListItem("符合", "1"));
                    }

                    remark.Text = ds.Tables[0].Rows[i]["remark"].ToString().Trim();
                }
            }
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

            DalOperationAboutStudent stu = new DalOperationAboutStudent();

            StudentsList model = stu.GetStudentById(studentNo);

            DataSet ds = dal.GetGradeCheckItemsByTermYear(model.SchoolClassName.Trim().Substring(0, 2));

            if (ds.Tables[0].Rows.Count == 0)
            {
                Javascript.ExcuteJavascriptCode("alert('未找到20" + model.SchoolClassName.Trim().Substring(0, 2) + "学年成绩审核规则,请先添加:)');parent.tb_remove();", Page);
                return;
            }

            List<string> listColumn = new List<string>();

            //for (int i=0;i<ds.Tables[0].Rows.Count;i++)
            //{
            //    listColumn.Add(ds.Tables[0].Columns[i].ToString());
            //}
            Table tb = new Table();
            tb.CssClass = "tableAddStyleNone";
            tb.Width = Unit.Percentage(100);

            TableRow tr1 = new TableRow();
            TableCell td1 = new TableCell();
            td1.HorizontalAlign = HorizontalAlign.Left;
            td1.CssClass = "border";
            td1.Width = Unit.Percentage(25);
            td1.Text = "当前学生所属班级:";
            tr1.Cells.Add(td1);
            td1 = new TableCell();
            td1.CssClass = "border";
            td1.Text = model.SchoolClassName + "&nbsp;&nbsp;所应用的成绩审核规则为:20" + model.SchoolClassName.Trim().Substring(0, 2) + "学年成绩审核规则";
            tr1.Cells.Add(td1);

            tb.Rows.Add(tr1);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                TableRow tr = new TableRow();
                TableCell td = new TableCell();
                td.HorizontalAlign = HorizontalAlign.Left;
                td.CssClass = "border";
                td.Width = Unit.Percentage(25);

                LiteralControl ltl = new LiteralControl();
                ltl.Text = "<br />" + ds.Tables[0].Rows[i]["gradeCheckItemName"].ToString().Trim();

                td.Controls.Add(ltl);
                tr.Cells.Add(td);

                td = new TableCell();
                td.HorizontalAlign = HorizontalAlign.Left;
                td.CssClass = "border";

                TextBox txt = new TextBox();
                txt.ID = "txt_" + ds.Tables[0].Rows[i]["gradeCheckId"].ToString().Trim();
                txt.Text = ds.Tables[0].Rows[i]["gradeCheckItemDefaultValue"].ToString().Trim();
                td.Controls.Add(txt);
                tr.Cells.Add(td);

                tb.Rows.Add(tr);
            }
            PlaceHolder1.Controls.Add(tb);
        }