private void button1_Click(object sender, EventArgs e)
        {
            string d_year  = this.comboBox_years.Text.Trim();
            int    d_years = Convert.ToInt32(d_year);
            string termno  = "";

            if (this.comboBox_term.Text.Trim() != "")
            {
                termno = termlist[this.comboBox_term.Text.Trim()];
            }
            else
            {
                return;
            }
            bool d_flag = ScoreRecord_Class.InsertByUpdate(termno, Convert.ToString(d_years - 2) + "级", Convert.ToString(d_years - 1) + "级", d_year + "级");

            if (d_flag == true)
            {
                MessageBox.Show("生成成功!");
            }
            else
            {
                MessageBox.Show("生成失败!");
            }
        }
Example #2
0
        private void button_search_Click(object sender, EventArgs e)
        {
            string termno = "";

            if (this.comboBox_term.Text.Trim() != "")
            {
                termno = termlist[this.comboBox_term.Text.Trim()];
            }
            string classtudentNo = "";

            if (this.comboBox_classname.Text.Trim() != "")
            {
                classtudentNo = ClassStudentlist[this.comboBox_classname.Text.Trim()];
            }
            DataTable dt = new DataTable();

            dt = ScoreRecord_Class.GetRecordList(classtudentNo, termno, this.textBox_studentname.Text.Trim(), this.textBox_studentno.Text.Trim(), this.comboBox_printstatus.Text.Trim(), comboBox_Recordstatus.Text.Trim(), this.comboBox_yeargrade.Text.Trim());
            this.gridControl_RecordList.DataSource = dt;
            this.gridView_RecordList.RefreshData();
        }
Example #3
0
        private void gridControl_RecordList_DoubleClick(object sender, EventArgs e)
        {
            DataTable d_DTable = new DataTable();

            d_DTable = (DataTable)gridControl_RecordList.DataSource;
            if (d_DTable == null)
            {
                MessageBox.Show("请先查出要操作的记录", "错误");
                return;
            }

            if (d_DTable.Rows.Count == 0)
            {
                MessageBox.Show("请先查出要操作的记录", "错误");
                return;
            }

            string temp_id = d_DTable.Rows[gridView_RecordList.GetDataSourceRowIndex(gridView_RecordList.FocusedRowHandle)]["ID"].ToString();

            if (temp_id == "")
            {
                MessageBox.Show("请先查出要操作的记录", "错误");
                return;
            }
            int p_id = Convert.ToInt32(temp_id);
            ScoreRecord_Class d_class = new ScoreRecord_Class(p_id);

            if (d_class.ID == 0)
            {
                MessageBox.Show("无效选择,请重新选择", "错误");
                return;
            }
            ScoreReport_Form d_from = new ScoreReport_Form(p_id);

            d_from.MdiParent = this.MdiParent;
            d_from.Show();
        }
Example #4
0
 public ScoreReport_Form(int p_id)
 {
     InitializeComponent();
     CurRecordClass = new ScoreRecord_Class(p_id);
 }
Example #5
0
 public ScoreReport_Form()
 {
     InitializeComponent();
     CurRecordClass = new ScoreRecord_Class(1);
 }