/// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitDataGridView(object sender, EventArgs_Welder e)
        {
            this.myEventArgs_Welder = e;
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Data, Enum_DataTable.IssueStudentQCRegistrationNo.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.ExamAll.ToString()];

            myClass_Data.SetFilter(string.Format("IdentificationCard='{0}'", this.myEventArgs_Welder.str_IdentificationCard));
            this.dataGridView_Data.DataSource = null;
            myClass_Data.RefreshData(false);
            this.dataGridView_Data.DataSource = new DataView(myClass_Data.myDataTable.Copy());
            if (string.IsNullOrEmpty(((DataView)this.dataGridView_Data.DataSource).Sort))
            {
                ((DataView)this.dataGridView_Data.DataSource).Sort = myClass_Data.myDataView.Sort;
            }
            if (this.checkBox_QC.Checked)
            {
                ((DataView)this.dataGridView_Data.DataSource).RowFilter = string.Format("ValidUntil >= '{0}' And isQCValid=1", DateTime.Today.ToShortDateString());
            }
            else
            {
                ((DataView)this.dataGridView_Data.DataSource).RowFilter = null;
            }
            this.label_Data.Text = string.Format("考试记录,({0}):", this.dataGridView_Data.RowCount);

            this.pictureBox_Welder.Image = Class_Welder.GetWelderPicture(this.myEventArgs_Welder.str_IdentificationCard);

            this.userControl_WelderTestCommitteeRegistrationNoBase1.InitDataGridView(this.myEventArgs_Welder.str_IdentificationCard);

            if (this.dataGridView_Data.RowCount == 0)
            {
                EventArgs_StudentSecond my_e = new EventArgs_StudentSecond(null);
                Publisher_StudentSecond.OnEventName(my_e);
            }
        }
        private void dataGridView_Data_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            EventArgs_StudentSecond my_e = new EventArgs_StudentSecond(this.dataGridView_Data.Rows[e.RowIndex].Cells["ExaminingNo"].Value.ToString());

            Publisher_StudentSecond.OnEventName(my_e);
        }
Esempio n. 3
0
        /// <summary>
        /// 刷新数据
        /// </summary>
        /// <param name="bool_JustFill">true-只添加和修改数据,false-刷新全部数据</param>
        private void RefreshData(bool bool_JustFill)
        {
            EventArgs_StudentSecond my_e = new EventArgs_StudentSecond(this.str_ExaminingNo);

            Publisher_StudentSecond.OnEventName(my_e);
        }