Ejemplo n.º 1
0
        private void button_OnOK_Click(object sender, EventArgs e)
        {
            EventArgs_WelderFilter my_e = new EventArgs_WelderFilter(null);

            my_e.str_IdentificationCard = Class_DataValidateTool.CovertIdentificationCard(this.TextBox_IdentificationCardQuery.Text);
            my_e.str_WelderName         = this.TextBox_WelderNameQuery.Text;
            my_e.str_RegistrationNo     = this.TextBox_RegistrationNoQuery.Text;
            my_e.str_WelderWorkerID     = this.TextBox_WorkerIDQuery.Text;
            my_e.str_ExaminingNo        = this.TextBox_ExaminingNoQuery.Text;
            my_e.str_CertificateNo      = this.TextBox_CertificateNoQuery.Text;
            my_e.str_IssueNo            = this.textBox_IssueNoQuery.Text;
            Publisher_WelderFilter.OnEventName(my_e);
        }
        private void toolStripMenuItem_RowAddByExcel_Click(object sender, EventArgs e)
        {
            DataTable myDataTable = Class_DataControlBind.ImportExcelToDataTable();

            if (myDataTable != null)
            {
                if (!myDataTable.Columns.Contains("IdentificationCard"))
                {
                    MessageBox.Show("数据表中不存在 'IdentificationCard' 列!");
                    return;
                }
                DataRow[] myDataRow_Range;
                myDataRow_Range = myDataTable.Select("len(IdentificationCard)>0");
                StringBuilder myStringBuilder = new StringBuilder();
                myStringBuilder.Append("1=0");
                foreach (DataRow myDataRow in myDataRow_Range)
                {
                    myStringBuilder.Append(string.Format(" Or IdentificationCard='{0}'", Class_DataValidateTool.CovertIdentificationCard(myDataRow["IdentificationCard"].ToString())));
                }
                EventArgs_WelderFilter g = new EventArgs_WelderFilter(myStringBuilder.ToString());
                Publisher_WelderFilter.OnEventName(g);
            }
        }