Ejemplo n.º 1
0
        protected void DlstStudentGradeCheckDataBind()
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
            //DataView dv = dal.GetUpdateTimeByStudentNo(studentNo).Tables[0].DefaultView;

            //this.dlstStudentGradeCheck.DataSource = dv;
            //this.dlstStudentGradeCheck.DataBind();

            DataTable dt = dal.GetGradeCheckNotify().Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["notifyTitle"].ToString().Trim().Length > 0)
                {

                    notifyTitle.NavigateUrl = "~/Common/ViewGradeCheckNotify.aspx?keepThis=true&TB_iframe=true&height=500&width=800";
                    notifyTitle.CssClass = "thickbox";
                    notifyTitle.Text = dt.Rows[i]["notifyTitle"].ToString().Trim() + "(点击查看重修重考详细通知)";

                    notifyTitle.ToolTip = dt.Rows[i]["notifyTitle"].ToString().Trim();
                }
            }

            //dlstStudentGradeCheckDataBind();
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
                DataTable dt = dal.GetStudentGradeCheckApplyById(gradeCheckApplyId).Tables[0];

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ltlTermTag.Text = CommonUtility.ChangeTermToString(dt.Rows[i]["termTag"].ToString().Trim());
                    ltlCourseName.Text = dt.Rows[i]["courseName"].ToString().Trim() + "(" + dt.Rows[i]["ClassID"].ToString().Trim() + ")";

                    if (dt.Rows[i]["gradeCheckApplyType"].ToString().Trim() == "重修")
                    {
                        ddlGradeCheckApplyType.Items.Add(new ListItem("重修", "重修"));
                        ddlGradeCheckApplyType.Items.Add(new ListItem("重考", "重考"));
                    }
                    else
                    {
                        ddlGradeCheckApplyType.Items.Add(new ListItem("重考", "重考"));
                        ddlGradeCheckApplyType.Items.Add(new ListItem("重修", "重修"));
                    }
                    txtapplyChecKSuggestion.Text = dt.Rows[i]["applyChecKSuggestion"].ToString().Trim();
                }
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DalOperationAboutGradeCheck doan = new DalOperationAboutGradeCheck();

                //检测是否有重名规则
                string _name = txtGradeCheckItemName.Text.Trim();
                if (doan.CheckIsExistGradeCheckItemName(_name).Tables[0].Rows.Count > 0)
                {
                    Javascript.GoHistory(-1, "已经存在此名称的规则,请更换规则名或者在已有规则上修改所应用的学年即可!", Page);
                    return;
                }

                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()));
                //}
                if (dt.Rows[0]["termYear"].ToString().Trim().Length > 0)
                {

                    dt.Columns.Add("termYearFormat", typeof(string), "'20'+termYear+'学年'");
                    ddlTermYears.DataSource = dt;
                    ddlTermYears.DataTextField = "termYearFormat";
                    ddlTermYears.DataValueField = "termYear";
                    ddlTermYears.DataBind();
                }
            }
        }
Ejemplo n.º 4
0
    //绑定搜索的课程信息
    public void DataBindSearchCourse()
    {
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

        // Response.Write(ddlCourses.SelectedValue);

        DataTable dt = dal.GetAllStudentGradeCheckApply(ddlCourses.SelectedValue == "all" ? "all_" + ddlTermTags.SelectedValue : ddlCourses.SelectedValue, ddlApplyResult.SelectedValue, ddlApplyLocale.SelectedValue).Tables[0];
        DataView dv = dt.DefaultView;
        this.AspNetPager1.RecordCount = dv.Count;
        PagedDataSource pds = new PagedDataSource();    //定义一个PagedDataSource类来执行分页功
        pds.DataSource = dv;
        pds.AllowPaging = true;
        pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize = CommonUtility.pageSize;

        this.dlstGradeCheckApply.DataSource = pds;
        this.dlstGradeCheckApply.DataBind();

        if (dt.Rows.Count == 0)
        {
            this.dlstGradeCheckApply.ShowFooter = true;
        }
        else
        {
            this.dlstGradeCheckApply.ShowFooter = false;
        }
    }
Ejemplo n.º 5
0
        public void DataBindSearchTermNormTagList()
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
            DataTable dt = dal.GetTermYear().Tables[0];

            string termTag = null;
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                termTag = dt.Rows[i]["termYear"].ToString().Trim();
                ListItem li = new ListItem("20" + termTag, termTag);
                this.ddltNormTerm.Items.Add(li);
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
                DataTable dt = dal.GetGradeCheckNotify().Tables[0];

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ltlNotifyTitle.Text = dt.Rows[i]["notifyTitle"].ToString().Trim();
                    ltlNotifyContent.Text = dt.Rows[i]["notifyContent"].ToString().Trim();
                    attachmentIds = dt.Rows[i]["attachmentIds"].ToString().Trim();
                }
            }
        }
Ejemplo n.º 7
0
        protected void btnNotAccord_Click(object sender, EventArgs e)
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

            try
            {
                dal.UpdateStudentGradeCheckApplyState("不符合", txtapplyChecKSuggestion.Text.Trim(), gradeCheckApplyId);
                Javascript.RefreshParentWindow("修改重修重考申请状态成功!", "/Administrator/StudentManager.aspx?fragment=2", Page);
            }
            catch (Exception ex)
            {
                MongoDBLog.LogRecord(ex);
                Javascript.GoHistory(-1, "修改重修重考申请状态失败,请检查格式是否有误!", Page);
            }
        }
Ejemplo n.º 8
0
        protected void deleteGradeCheckApplyById()
        {
            DalOperationAboutGradeCheck doan = new DalOperationAboutGradeCheck();

            int _gradeCheckApplyId = -1;
            if (Request["action"] != null && Request["action"].Trim() == "delete" && CommonUtility.SafeCheckByParams<string>(Request["gradeCheckApplyId"],ref _gradeCheckApplyId))
            {
                if (!this.isAllowTime())
                {
                    Javascript.GoHistory(-1, "当前暂未开放办理重修重考", Page);
                    return;
                }
                doan.DeleteStudentGradeCheckApplyById(_gradeCheckApplyId, studentNo);
                Javascript.AlertAndRedirect("删除成功!", "/Student/MyGradeCheckManage.aspx", Page);
            }
        }
Ejemplo n.º 9
0
        //修改
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
            string _name = txtGradeCheckItemName.Text.Trim();
            if (dalOperationAboutGradeCheck.CheckIsExistGradeCheckItemName(_name, gradeCheckId).Tables[0].Rows.Count > 0)
            {
                Javascript.GoHistory(-1, "已经存在此名称的规则,请更换规则名或者在已有规则上修改所应用的学年即可!", Page);
                return;
            }

            if (txtGradeCheckItemName.Text.Trim().Length == 0)
            {
                Javascript.GoHistory(-1, "请输入成绩审核单项名称!", Page);
            }
            else
            {
                StudentsGradeCheck model = new StudentsGradeCheck();
                model.gradeCheckItemName = txtGradeCheckItemName.Text.Trim();
                model.gradeCheckItemDefaultValue = txtGradeCheckItemDefaultValue.Text.Trim();
                model.gradeCheckId = gradeCheckId;
                model.displayOrder = int.Parse(txtDisplayOrder.Text.Trim());

                List<string> items = new List<string>();
                for (int i = 0; i < ddlTermYears.Items.Count; i++)
                {
                    ListItem _item = ddlTermYears.Items[i];
                    if (_item.Selected)
                    {
                        items.Add(_item.Value);
                    }
                }

                model.termYears = string.Join(",", items).Trim();

                try
                {
                    dalOperationAboutGradeCheck.UpdateGradeCheckItemById(model);//修改
                    Javascript.RefreshParentWindow("修改成绩审核单项成功!", "/Administrator/StudentManager.aspx?fragment=5", Page);
                }
                catch (Exception ex)
                {
                    MongoDBLog.LogRecord(ex);
                    Javascript.GoHistory(-1, "修改失败,请检查格式是否有误!", Page);
                }

            }
        }
Ejemplo n.º 10
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
            string dtime = DateTime.Now.ToString();

            using (TransactionScope scope = new TransactionScope())
            {
                try
                {
                    foreach (Control ctlTable in PlaceHolder1.Controls)
                    {
                        foreach (Control ctlTableRow in ctlTable.Controls)
                        {
                            foreach (Control ctlTableCell in ctlTableRow.Controls)
                            {
                                foreach (Control ctl in ctlTableCell.Controls)
                                {
                                    if (ctl.GetType().ToString().Trim() == "System.Web.UI.WebControls.TextBox")
                                    {
                                        StudentsGradeCheckDetail model = new StudentsGradeCheckDetail();
                                        model.studentNo = studentNo;
                                        model.updateTime = Convert.ToDateTime(dtime);
                                        model.gradeCheckDetailValue = ((TextBox)ctl).Text.Trim();
                                        model.gradeCheckId = int.Parse(ctl.ID.Split("_".ToCharArray())[1]);
                                        dal.AddGradeCheckDetailByStudentNo(model);
                                    }
                                }
                            }
                        }
                    }

                    StudentsGradeCheckConfirm model1 = new StudentsGradeCheckConfirm { studentNo = studentNo, updateTime = Convert.ToDateTime(dtime), isAccord = int.Parse(ddlIsAccord.SelectedValue), remark = remark.Text.Trim() };
                    dal.AddStudentGradeCheckConfirm(model1);
                    scope.Complete();
                    Javascript.RefreshParentWindow("添加成绩审核记录成功!", "/Administrator/StudentManager.aspx?fragment=7&studentNo=" + studentNo, Page);
                }
                catch (Exception ex)
                {
                    MongoDBLog.LogRecord(ex);
                    Javascript.GoHistory(-1, "添加成绩审核记录失败!", Page);
                }
                finally
                {
                    dal.conn.Close();
                }
            }
        }
Ejemplo n.º 11
0
        //初始化编辑页面
        public void InitialNotifyEdit(int englishExamNotifyInfoId)
        {
            DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
            DataTable dt = dalOperationAboutGradeCheck.GetGradeCheckItemById(gradeCheckId).Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                txtGradeCheckItemName.Text = dt.Rows[i]["gradeCheckItemName"].ToString().Trim();

                txtGradeCheckItemDefaultValue.Text = dt.Rows[i]["gradeCheckItemDefaultValue"].ToString().Trim();
                txtDisplayOrder.Text = dt.Rows[i]["displayOrder"].ToString().Trim();
            }

            DataTable dt1 = dalOperationAboutGradeCheck.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()));
            //}

            string termYears = dt.Rows[0]["termYears"].ToString().Trim();

            dt1.Columns.Add("termYearFormat", typeof(string), "'20'+termYear+'学年'");
            ddlTermYears.DataSource = dt1;
            ddlTermYears.DataTextField = "termYearFormat";
            ddlTermYears.DataValueField = "termYear";
            ddlTermYears.DataBind();

            string[] items = termYears.Split(",".ToCharArray());
            for (int i = 0; i < ddlTermYears.Items.Count; i++)
            {
                ListItem _item = ddlTermYears.Items[i];
                for (int j = 0; j < items.Length; j++)
                {
                    if (_item.Value == items[j].Trim())
                    {
                        _item.Selected = true;
                        break;
                    }
                }
            }
        }
Ejemplo n.º 12
0
        //修改
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtGradeCheckItemName.Text.Trim().Length == 0)
            {
                Javascript.GoHistory(-1, "请输入成绩审核单项名称!", Page);
            }
            else
            {
                DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
                StudentsGradeCheck model = new StudentsGradeCheck();
                model.gradeCheckItemName = txtGradeCheckItemName.Text.Trim();
                model.gradeCheckItemDefaultValue = txtGradeCheckItemDefaultValue.Text.Trim();
                model.displayOrder = int.Parse(txtDisplayOrder.Text.Trim());

                List<string> items = new List<string>();
                for (int i = 0; i < ddlTermYears.Items.Count; i++)
                {
                    ListItem _item = ddlTermYears.Items[i];
                    if (_item.Selected)
                    {
                        items.Add(_item.Value);
                    }
                }

                model.termYears = string.Join(",", items).Trim();

                try
                {

                    dalOperationAboutGradeCheck.AddGradeCheckItems(model);//修改
                    Javascript.RefreshParentWindow("添加成绩审核单项成功!", "/Administrator/StudentManager.aspx?fragment=5", Page);
                }
                catch (Exception ex)
                {
                    MongoDBLog.LogRecord(ex);
                    Javascript.GoHistory(-1, "添加成绩审核单项失败,请检查格式是否有误!", Page);
                }

            }
        }
Ejemplo n.º 13
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");
        }
    }
Ejemplo n.º 14
0
 //判断是否是规定的办理时间范围
 protected bool isAllowTime()
 {
     DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
     return dalOperationAboutGradeCheck.CheckGradeCheckAllowTime();
 }
Ejemplo n.º 15
0
    /// <summary>
    /// 获取动态表单元格
    /// </summary>
    /// <returns></returns>
    protected string GetTableTd(string studentNo, DateTime updateTime)
    {
        StringBuilder sb = new StringBuilder();
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

        foreach (int _key in listGradeCheckId)
        {
            DataTable dt = dal.GetGradeCheckDetailByGradeCheckIdAndStudentNoAndUpdateTime(_key, studentNo, updateTime).Tables[0];

            if (dt.Rows.Count == 0)
            {
                sb.Append("<td width=\"6%\">" + ht[_key.ToString()] + "</td>");
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    foreach (DictionaryEntry _item in ht)
                    {
                        if (_item.Key.ToString().Trim() == dt.Rows[i]["gradeCheckId"].ToString().Trim())
                        {
                            sb.Append(string.Format("<td width=\"6%\">{0}</td>", dt.Rows[i]["gradeCheckDetailValue"].ToString().Trim()));
                        }
                    }
                }
            }
        }

        return sb.ToString();
    }
Ejemplo n.º 16
0
    /// <summary>
    /// 获取动态表头
    /// </summary>
    /// <returns></returns>
    protected string GetTableHeader()
    {
        StringBuilder sb = new StringBuilder();
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

        DataTable dt = dal.GetGradeCheckItemsByTermYear(ddlSearchYear.SelectedValue).Tables[0];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append(string.Format("<th width=\"6%\">{0}</th>",dt.Rows[i]["gradeCheckItemName"].ToString().Trim()));
            listGradeCheckId.Add(int.Parse(dt.Rows[i]["gradeCheckId"].ToString().Trim()));
            ht.Add(dt.Rows[i]["gradeCheckId"].ToString().Trim(), dt.Rows[i]["gradeCheckItemDefaultValue"].ToString().Trim());
        }

        return sb.ToString();
    }
Ejemplo n.º 17
0
    //展现确认无疑问、确认有疑问等按钮
    protected string DisplayConfirmPanel(int itemIndex, DateTime updateTime)
    {
        StringBuilder sb = new StringBuilder();

        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
        DataTable dt = dal.GetStudentGradeCheckConfirmRecordNum(studentNo, updateTime).Tables[0];

        int recordNum = dt.Rows.Count;

        if (recordNum > 0)
        {
            sb.Append("<br />当前状态:确认无疑问&nbsp;&nbsp;");
        }
        else
        {
            sb.Append("<br />当前状态:暂未确认&nbsp;&nbsp;");
        }

        return sb.ToString();
    }
Ejemplo n.º 18
0
    protected string GetGradeCheckDetailByGradeCheckId(int gradeCheckId)
    {
        DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
        DataSet ds = dalOperationAboutGradeCheck.GetGradeCheckItemById(gradeCheckId);

        string gradeCheckItemName = string.Empty;

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            gradeCheckItemName = ds.Tables[0].Rows[i]["gradeCheckItemName"].ToString().Trim();
        }
        return gradeCheckItemName + ":";
    }
Ejemplo n.º 19
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        try
        {
            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

            dal.UpdateGradeCheckExcelTemplate(hidAttachmentId1.Value);

            Javascript.AlertAndRedirect("更新重修重考Excel模板成功:)", "/Administrator/StudentManager.aspx?fragment=8", Page);
        }
        catch (Exception ex)
        {
            MongoDBLog.LogRecord(ex);
            Javascript.GoHistory(-1, "更新重修重考Excel模板失败:(", Page);
            return;
        }
    }
Ejemplo n.º 20
0
    //绑定搜索到的学生数据到DataList
    protected void DataListBind()
    {
        tableHeader = this.GetTableHeader();
        DalOperationAboutGradeCheck dos = new DalOperationAboutGradeCheck();
        DataView dv = dos.SearchStudentsList(ddlSearchYear.SelectedValue, ddlSearchMajor.SelectedValue, ddlSearchSchoolClass.SelectedValue, txtKeyword.Text.Trim(),ddlGradeCheckLocale.SelectedValue,ddlGradeCheckDegree.SelectedValue).Tables[0].DefaultView;

        this.AspNetPager2.RecordCount = dv.Count;
        PagedDataSource pds = new PagedDataSource();    //定义一个PagedDataSource类来执行分页功
        pds.DataSource = dv;
        pds.AllowPaging = true;
        pds.CurrentPageIndex = pageIndex - 1;
        pds.PageSize = CommonUtility.pageSize;

        this.dlSearchStudent.DataSource = pds;
        this.dlSearchStudent.DataBind();

        if (pds.Count == 0)
        {
            this.dlSearchStudent.ShowFooter = true;
        }
        else
        {
            this.dlSearchStudent.ShowFooter = false;
        }
    }
Ejemplo n.º 21
0
    protected void dlstStudentGradeCheck_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            DataList dataList = (DataList)e.Item.FindControl("dlstStudentGradeCheckItem");
            DataRowView rowv = (DataRowView)e.Item.DataItem;
            string updateTime = rowv["updateTime"].ToString().Trim();
            DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
            //DataSet ds = dalOperationAboutGradeCheck.GetGradeCheckDetailByStudentNo(studentNo, updateTime);
            DataSet ds = dalOperationAboutGradeCheck.GetGradeCheckDetailByStudentNo(studentNo);
            dataList.DataSource = ds.Tables[0].DefaultView;
            dataList.DataBind();

            if (dataList.Items.Count == 0)
            {
                dataList.ShowFooter = true;
            }
            else
            {
                dataList.ShowFooter = false;
            }
        }
    }
Ejemplo n.º 22
0
    protected void dlstStudentGradeCheckDetail_Delete()
    {
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

        DateTime updateTime = DateTime.Now;

        if (!CommonUtility.SafeCheckByParams<string>(Request["updateTime"].ToString(), ref updateTime))
        {
            Javascript.GoHistory(-1, "参数有误", Page);
            return;
        }

        try
        {
            dal.DeleteGradeCheckDetailByStudentNoAndUpdateTime(studentNo, updateTime);
            Javascript.RefreshParentWindow("删除成绩审核记录成功!", "/Administrator/StudentManager.aspx?fragment=7&studentNo=" + studentNo, Page);
        }
        catch (Exception ex)
        {
            MongoDBLog.LogRecord(ex);
            Javascript.GoHistory(-1, "删除成绩审核记录失败!", Page);
        }
        finally
        {
            dal.conn.Close();
        }
    }
Ejemplo n.º 23
0
    protected void DlstStudentGradeCheckDataBind()
    {
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
        DataView dv = dal.GetUpdateTimeByStudentNo(studentNo).Tables[0].DefaultView;

        this.dlstStudentGradeCheck.DataSource = dv;
        this.dlstStudentGradeCheck.DataBind();
    }
Ejemplo n.º 24
0
    protected void dlstGradeCheck_ItemCommand(object source, DataListCommandEventArgs e)
    {
        DalOperationAboutGradeCheck dos = new DalOperationAboutGradeCheck();

        if (e.CommandName == "delete")
        {
            int gradeCheckId = int.Parse(dlstGradeCheck.DataKeys[e.Item.ItemIndex].ToString());//取选中行学生编号

            if (dos.DeleteGradeCheckItemById(gradeCheckId) > 0)
            {
                Javascript.AlertAndRedirect("删除成功!", "/Administrator/StudentManager.aspx?fragment=5", Page);
            }
            else
            {
                Javascript.GoHistory(-1, "删除失败!", Page);
            }
        }
    }
Ejemplo n.º 25
0
    protected string GetStudentGradeCheckConfirm(DateTime updateTime)
    {
        DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
        DataSet ds = dalOperationAboutGradeCheck.GetStudentGradeCheckConfirm(studentNo, updateTime);

        string isAccord = string.Empty;

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            isAccord = ds.Tables[0].Rows[i]["isAccord"].ToString().Trim();
        }
        return isAccord;
    }
Ejemplo n.º 26
0
    protected string GetStudentGradeCheckConfirmAboutRemark(DateTime updateTime)
    {
        DalOperationAboutGradeCheck dalOperationAboutGradeCheck = new DalOperationAboutGradeCheck();
        DataSet ds = dalOperationAboutGradeCheck.GetStudentGradeCheckConfirm(studentNo, updateTime);

        string remark = string.Empty;

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            remark = ds.Tables[0].Rows[i]["remark"].ToString().Trim();
        }
        return remark;
    }
Ejemplo n.º 27
0
    protected void DlstStudentSchoolClassNameDataBind()
    {
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
        DataView dv = dal.GetTermYearByStudentNo(studentNo).Tables[0].DefaultView;

        this.dlstStudentSchoolClassName.DataSource = dv;
        this.dlstStudentSchoolClassName.DataBind();
    }
Ejemplo n.º 28
0
 protected void DataListBindGradeCheck()
 {
     DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
     if (ddlTermYear.SelectedValue.Trim() == "all")
     {
         dlstGradeCheck.DataSource = dal.GetAllGradeCheckItems().Tables[0];
         dlstGradeCheck.DataBind();
     }
     else
     {
         dlstGradeCheck.DataSource = dal.GetGradeCheckItemsByTermYear(ddlTermYear.SelectedValue).Tables[0];
         dlstGradeCheck.DataBind();
     }
 }
        public void ProcessRequest(HttpContext context)
        {
            CommonFunction.CheckUser();

            context.Response.CacheControl = "no-cache";

            string termTagCourseNoClassID = context.Server.UrlDecode(context.Request["termTagCourseNoClassID"]);
            string termTag = (context.Request["termTag"] == null ? string.Empty : context.Request["termTag"]);
            string courseName = (context.Request["courseName"] == null ? string.Empty : context.Server.UrlDecode(context.Request["courseName"]));

            string gradeCheckApplyExcel = System.Configuration.ConfigurationManager.AppSettings["GradeCheckApplyExcel"];

            //StringBuilder sb = new StringBuilder();

            HSSFWorkbook workbook = new HSSFWorkbook();

            DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();

            //// Response.Write(ddlCourses.SelectedValue);

            DataTable dt = dal.GetAllStudentGradeCheckApply(termTagCourseNoClassID, "all","all").Tables[0];

            //创建WorkSheet
            HSSFSheet sheet1 = workbook.CreateSheet(CommonUtility.ChangeTermToString(termTag) + "_" + courseName);

            sheet1.CreateRow(0).CreateCell(0).SetCellValue("序号");
            sheet1.CreateRow(0).CreateCell(1).SetCellValue("学号");
            sheet1.CreateRow(0).CreateCell(2).SetCellValue("姓名");
            sheet1.CreateRow(0).CreateCell(3).SetCellValue("专业");
            sheet1.CreateRow(0).CreateCell(4).SetCellValue("班级");
            sheet1.CreateRow(0).CreateCell(5).SetCellValue("手机号");
            sheet1.CreateRow(0).CreateCell(6).SetCellValue("邮件地址");
            sheet1.CreateRow(0).CreateCell(7).SetCellValue("所属学期");
            sheet1.CreateRow(0).CreateCell(8).SetCellValue("课程名称");
            sheet1.CreateRow(0).CreateCell(9).SetCellValue("重修重考类型");
            sheet1.CreateRow(0).CreateCell(10).SetCellValue("审核结果");
            sheet1.CreateRow(0).CreateCell(11).SetCellValue("备注");

            int drRowCount = dt.Rows.Count;

            for (int i = 0; i < drRowCount; i++)
            {
                sheet1.CreateRow(i + 1).CreateCell(0).SetCellValue(i + 1);
                sheet1.CreateRow(i + 1).CreateCell(1).SetCellValue(dt.Rows[i]["studentNo"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(2).SetCellValue(dt.Rows[i]["studentName"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(3).SetCellValue(dt.Rows[i]["studentSpeciality"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(4).SetCellValue(dt.Rows[i]["SchoolClassName"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(5).SetCellValue(dt.Rows[i]["mobileNo"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(6).SetCellValue(dt.Rows[i]["emailAddress"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(7).SetCellValue(CommonUtility.ChangeTermToString(termTag));
                sheet1.CreateRow(i + 1).CreateCell(8).SetCellValue(courseName);
                sheet1.CreateRow(i + 1).CreateCell(9).SetCellValue(dt.Rows[i]["gradeCheckApplyType"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(10).SetCellValue(dt.Rows[i]["applyResult"].ToString().Trim());
                sheet1.CreateRow(i + 1).CreateCell(11).SetCellValue(dt.Rows[i]["applyChecKSuggestion"].ToString().Trim());
            }

            string fileName = CommonUtility.ChangeTermToString(termTag) + "_" + courseName + UploadFiles.DateTimeString();

            if (!Directory.Exists(context.Server.MapPath(gradeCheckApplyExcel)))
            {
                Directory.CreateDirectory(context.Server.MapPath(gradeCheckApplyExcel));
            }

            System.IO.FileStream file = new System.IO.FileStream(HttpContext.Current.Server.MapPath(gradeCheckApplyExcel + fileName + ".xls"), System.IO.FileMode.Create);
            workbook.Write(file);
            file.Dispose();

            ////插入值
            FileInfo DownloadFile = new FileInfo(context.Server.MapPath(gradeCheckApplyExcel + fileName + ".xls"));

            context.Response.Clear();
            context.Response.ClearHeaders();
            context.Response.Buffer = false;
            Encoding code = Encoding.GetEncoding("gb2312");
            context.Response.ContentEncoding = Encoding.UTF8;
            context.Response.HeaderEncoding = code;//这句很重要
            context.Response.ContentType = "application/octet-stream";
            context.Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls");
            context.Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
            context.Response.WriteFile(DownloadFile.FullName);

            if (File.Exists(context.Server.MapPath(gradeCheckApplyExcel + fileName + ".xls")))
            {
                File.Delete(context.Server.MapPath(gradeCheckApplyExcel + fileName + ".xls"));
            }
            context.Response.Flush();
        }
Ejemplo n.º 30
0
    protected string GetGradeCheckApplyInfo(DateTime updateTime)
    {
        StringBuilder sb = new StringBuilder();
        DalOperationAboutGradeCheck dal = new DalOperationAboutGradeCheck();
        //DataTable dt = dal.GetStudentGradeCheckApplyByStudentNoAndUpdateTime(studentNo, updateTime).Tables[0];
        DataTable dt = dal.GetStudentGradeCheckApplyByStudentNo(studentNo).Tables[0];

        if (dt.Rows.Count > 0)
        {
            sb.Append("<br /><b>当前已申请的重修重考记录:</b><br />");
        }

        int rowsCount = dt.Rows.Count;

        for (int i = 0; i < rowsCount; i++)
        {
            sb.Append("<table class=\"datagrid2\"><th>详细信息</th>");
            sb.Append("<tr><td>所属学期:" + CommonUtility.ChangeTermToString(dt.Rows[i]["termTag"].ToString().Trim()) + "</td></tr><tr><td>课程名称:" + dt.Rows[i]["courseName"].ToString().Trim() + "</td></tr><tr><td>申请时间:" + dt.Rows[i]["updateTime"].ToString().Trim() + "</td></tr><tr><td>审核结果:" + (string.IsNullOrEmpty(dt.Rows[i]["applyResult"].ToString().Trim()) ? "未处理" : dt.Rows[i]["applyResult"].ToString().Trim()) + "</td></tr><tr><td>审核意见:" + dt.Rows[i]["applyChecKSuggestion"].ToString().Trim() + "</td></tr>");
            sb.Append("</table>");
        }

        return sb.ToString();
    }