private void button_WelderAdd_Click(object sender, EventArgs e)
        {
            Form_Welder_Query myForm = new Form_Welder_Query();

            myForm.bool_QueryBatch = true;
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                if (this.myDataTable == null)
                {
                    this.myDataTable = myForm.myDataTable;
                    this.dataGridView_Data.DataSource = new DataView(this.myDataTable);
                }
                else
                {
                    foreach (DataRow myDataRow in myForm.myDataTable.Rows)
                    {
                        if (this.myDataTable.Select(string.Format("IdentificationCard='{0}'", myDataRow["IdentificationCard"])).Length == 0)
                        {
                            this.myDataTable.ImportRow(myDataRow);
                        }
                    }
                }
                this.label_Data.Text = string.Format("学员,({0}):", this.myDataTable.Rows.Count);
            }
        }
        private void Button_WelderUpdate_Click(object sender, EventArgs e)
        {
            Form_Welder_Query myForm = new Form_Welder_Query();

            myForm.myClass_Welder = new Class_Welder();
            if (this.myClass_GXTheoryStudent.IdentificationCard != null)
            {
                myForm.myClass_Welder.IdentificationCard = this.myClass_GXTheoryStudent.IdentificationCard;
                myForm.myClass_Welder.FillData();
            }
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                Class_GXTheoryIssue myClass_GXTheoryIssue = new Class_GXTheoryIssue(this.myClass_GXTheoryStudent.IssueNo);
                string str_ReturnMessage = Class_Welder.CanSignUp(myForm.myClass_Welder.IdentificationCard, myClass_GXTheoryIssue.WeldingProcessAb, null, myClass_GXTheoryIssue.ShipClassificationAb, myClass_GXTheoryIssue.ShipboardNo, null, null, null, null, true);
                if (string.IsNullOrEmpty(str_ReturnMessage))
                {
                    this.myClass_GXTheoryStudent.IdentificationCard = myForm.myClass_Welder.IdentificationCard;
                    this.InitControlWelder(myForm.myClass_Welder);
                }
                else
                {
                    MessageBox.Show(str_ReturnMessage);
                }
            }
        }
Exemplo n.º 3
0
        private void Button_WelderUpdate_Click(object sender, EventArgs e)
        {
            Form_Welder_Query myForm = new Form_Welder_Query();

            myForm.myClass_Welder = new Class_Welder();
            if (!string.IsNullOrEmpty(this.myClass_Student.IdentificationCard))
            {
                myForm.myClass_Welder.IdentificationCard = this.myClass_Student.IdentificationCard;
                myForm.myClass_Welder.FillData();
            }
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                Class_Issue myClass_Issue = new Class_Issue(this.myClass_Student.IssueNo);
                if (this.myClass_Student.myClass_WeldingParameter.Material == null)
                {
                    this.myClass_Student.myClass_WeldingParameter = myClass_Issue.myClass_WeldingParameter;
                }
                string str_ReturnMessage = Class_Welder.CanSignUp(myForm.myClass_Welder.IdentificationCard, myClass_Issue.WeldingProcessAb, this.myClass_Student.SubjectID, myClass_Issue.ShipClassificationAb, myClass_Issue.ShipboardNo, this.myClass_Student.myClass_WeldingParameter.Material, this.myClass_Student.myClass_WeldingParameter.WeldingConsumable, this.myClass_Student.myClass_WeldingParameter.Thickness, this.myClass_Student.myClass_WeldingParameter.ExternalDiameter, false);
                if (string.IsNullOrEmpty(str_ReturnMessage))
                {
                    this.myClass_Student.IdentificationCard = myForm.myClass_Welder.IdentificationCard;
                    this.InitControlWelder(myForm.myClass_Welder);
                }
                else
                {
                    MessageBox.Show(str_ReturnMessage);
                }
            }
        }
        private void Button_WelderUpdate_Click(object sender, EventArgs e)
        {
            Form_Welder_Query myForm = new Form_Welder_Query();

            myForm.myClass_Welder = new Class_Welder();
            if (this.myClass_WelderBelong.IdentificationCard != null)
            {
                myForm.myClass_Welder.IdentificationCard = this.myClass_WelderBelong.IdentificationCard;
                myForm.myClass_Welder.FillData();
            }
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                this.myClass_WelderBelong.IdentificationCard = myForm.myClass_Welder.IdentificationCard;
                this.InitControlWelder(myForm.myClass_Welder);
            }
        }