Exemplo n.º 1
0
        public void InitControl(Class_Employer myClass_Employer, bool bool_Add)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.EmployerGroup.ToString()];

            Class_DataControlBind.InitializeComboBox(this.ComboBox_EmployerGroup, myClass_Data.myDataView, "EmployerGroup", "EmployerGroup");
            this.myClass_Employer = myClass_Employer;

            if (bool_Add == false)
            {
                this.MaskedTextBox_EmployerHPID.ReadOnly = true;
                this.MaskedTextBox_EmployerHPID.Text     = myClass_Employer.EmployerHPID;
                this.TextBox_Employer.Text                = myClass_Employer.Employer;
                this.textBox_EmployerAddress.Text         = myClass_Employer.EmployerAddress;
                this.textBox_EmployerAddressEnglish.Text  = myClass_Employer.EmployerAddressEnglish;
                this.textBox_EmployerEmail.Text           = myClass_Employer.EmployerEmail;
                this.TextBox_EmployerEnglish.Text         = myClass_Employer.EmployerEnglish;
                this.textBox_EmployerFax.Text             = myClass_Employer.EmployerFax;
                this.textBox_EmployerLinkman.Text         = myClass_Employer.EmployerLinkman;
                this.textBox_EmployerMobile.Text          = myClass_Employer.EmployerMobile;
                this.textBox_EmployerPostalcode.Text      = myClass_Employer.EmployerPostalcode;
                this.textBox_EmployerCity.Text            = myClass_Employer.EmployerCity;
                this.TextBox_EmployerRemark.Text          = myClass_Employer.EmployerRemark;
                this.textBox_EmployerTel.Text             = myClass_Employer.EmployerTel;
                this.TextBox_ShortenedEmployer.Text       = myClass_Employer.ShortenedEmployer;
                this.ComboBox_EmployerGroup.SelectedValue = myClass_Employer.EmployerGroup;
                this.NumericUpDown_EmployerIndex.Value    = myClass_Employer.EmployerIndex;
            }
            else
            {
            }
        }
Exemplo n.º 2
0
        public void InitControlStudent(Class_Student myClass_Student)
        {
            Class_Welder myClass_Welder = new Class_Welder(myClass_Student.IdentificationCard);

            this.TextBox_Welder.Text = string.Format("{0},{1},{2},{3}", myClass_Welder.WelderName, myClass_Welder.IdentificationCard, myClass_Welder.Sex, myClass_Welder.WelderEnglishName);
            Class_Employer         myClass_Employer         = new Class_Employer(myClass_Welder.myClass_BelongUnit.EmployerHPID);
            Class_Department       myClass_Department       = new Class_Department(myClass_Welder.myClass_BelongUnit.DepartmentHPID);
            Class_WorkPlace        myClass_WorkPlace        = new Class_WorkPlace(myClass_Welder.myClass_BelongUnit.WorkPlaceHPID);
            Class_LaborServiceTeam myClass_LaborServiceTeam = new Class_LaborServiceTeam(myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID);

            this.TextBox_Employer.Text         = string.Format("{0}->{1}->{2},{3}", myClass_Employer.Employer, myClass_Department.Department, myClass_WorkPlace.WorkPlace, myClass_LaborServiceTeam.LaborServiceTeam);
            this.TextBox_WorkerID.Text         = myClass_Welder.myClass_BelongUnit.WorkerID;
            this.TextBox_Schooling.Text        = myClass_Welder.Schooling;
            this.textBox_WeldingBeginning.Text = myClass_Welder.WeldingBeginning.ToShortDateString();

            Class_Issue          myClass_Issue          = new Class_Issue(myClass_Student.IssueNo);
            Class_WeldingSubject myClass_WeldingSubject = new Class_WeldingSubject(myClass_Student.SubjectID);

            this.textBox_ExaminingNo.Text      = myClass_Student.ExaminingNo;
            this.textBox_IssueNo.Text          = myClass_Student.IssueNo;
            this.textBox_TheoryResult.Text     = string.Format("{0}/{1}", myClass_Student.TheoryResult, myClass_Student.TheoryMakeupResult);
            this.textBox_SkillResult.Text      = string.Format("{0}/{1}", myClass_Student.SkillResult ? "√" : "×", myClass_Student.SkillMakeupResult ? "√" : "×");
            this.textBox_WeldingProcess.Text   = string.Format("{0}({1},{2},{3})", myClass_Issue.WeldingProcessAb, myClass_Student.myClass_WeldingParameter.Material, myClass_Student.myClass_WeldingParameter.WeldingConsumable, myClass_Student.myClass_WeldingParameter.Assemblage);
            this.TextBox_Subject.Text          = string.Format("{0},{1},{2},{3},{4}({5})", myClass_WeldingSubject.Subject, myClass_WeldingSubject.WeldingClass, myClass_WeldingSubject.JointType, myClass_WeldingSubject.WorkPieceType, myClass_WeldingSubject.WeldingProject, myClass_WeldingSubject.SubjectID);
            this.TextBox_Thickness.Text        = myClass_Student.myClass_WeldingParameter.Thickness.ToString();
            this.TextBox_ExternalDiameter.Text = myClass_Student.myClass_WeldingParameter.ExternalDiameter.ToString();
            this.TextBox_StudentRemark.Text    = myClass_Student.StudentRemark;

            this.myClass_QC = new Class_QC(myClass_Student.ExaminingNo);
            this.textBox_CertificateNo.Text = myClass_QC.CertificateNo;
            this.textBox_IssuedOn.Text      = myClass_QC.IssuedOn.ToShortDateString();
            if ((int)this.NumericUpDown_OriginalPeriod.Minimum <= myClass_QC.OriginalPeriod && (int)this.NumericUpDown_OriginalPeriod.Maximum >= myClass_QC.OriginalPeriod)
            {
                this.NumericUpDown_OriginalPeriod.Value = myClass_QC.OriginalPeriod;
            }
            if ((int)this.numericUpDown_PeriodofProlongation.Minimum <= myClass_QC.PeriodofProlongation && (int)this.numericUpDown_PeriodofProlongation.Maximum >= myClass_QC.PeriodofProlongation)
            {
                this.numericUpDown_PeriodofProlongation.Value = myClass_QC.PeriodofProlongation;
            }
            if ((int)this.numericUpDown_SupervisionCycle.Minimum <= myClass_QC.SupervisionCycle && (int)this.numericUpDown_SupervisionCycle.Maximum >= myClass_QC.SupervisionCycle)
            {
                this.numericUpDown_SupervisionCycle.Value = myClass_QC.SupervisionCycle;
            }
            this.TextBox_QCRemark.Text               = myClass_QC.QCRemark;
            this.checkBox_isQCValid.Checked          = myClass_QC.isQCValid;
            this.checkBox_SupervisionFirst.Checked   = myClass_QC.SupervisionFirst;
            this.checkBox_SupervisionSecond.Checked  = myClass_QC.SupervisionSecond;
            this.checkBox_SupervisionThird.Checked   = myClass_QC.SupervisionThird;
            this.checkBox_SupervisionFourth.Checked  = myClass_QC.SupervisionFourth;
            this.checkBox_SupervisionFifth.Checked   = myClass_QC.SupervisionFifth;
            this.checkBox_SupervisionSixth.Checked   = myClass_QC.SupervisionSixth;
            this.checkBox_SupervisionSeventh.Checked = myClass_QC.SupervisionSeventh;
            this.checkBox_SupervisionEighth.Checked  = myClass_QC.SupervisionEighth;
        }
Exemplo n.º 3
0
        private void InitstatusStrip(object sender, EventArgs_Unit e)
        {
            Class_WorkPlace  myClass_WorkPlace  = new Class_WorkPlace();
            Class_Department myClass_Department = new Class_Department();
            Class_Employer   myClass_Employer   = new Class_Employer();

            if (string.IsNullOrEmpty(e.WorkPlaceHPID))
            {
                if (string.IsNullOrEmpty(e.DepartmentHPID))
                {
                    if (string.IsNullOrEmpty(e.EmployerHPID))
                    {
                        if (string.IsNullOrEmpty(e.EmployerGroup))
                        {
                            myClass_Employer.EmployerGroup = "全部";
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        myClass_Employer.EmployerHPID = e.EmployerHPID;
                        myClass_Employer.FillData();
                        e.EmployerGroup = myClass_Employer.EmployerGroup;
                    }
                }
                else
                {
                    myClass_Department.DepartmentHPID = e.DepartmentHPID;
                    myClass_Department.FillData();
                    myClass_Employer.EmployerHPID = myClass_Department.EmployerHPID;
                    myClass_Employer.FillData();
                    e.EmployerGroup = myClass_Employer.EmployerGroup;
                }
            }
            else
            {
                myClass_WorkPlace.WorkPlaceHPID = e.WorkPlaceHPID;
                myClass_WorkPlace.FillData();
                myClass_Department.DepartmentHPID = myClass_WorkPlace.DepartmentHPID;
                myClass_Department.FillData();
                myClass_Employer.EmployerHPID = myClass_Department.EmployerHPID;
                myClass_Employer.FillData();
                e.EmployerGroup = myClass_Employer.EmployerGroup;
            }
            this.toolStripStatusLabel_EmployerGroup.Text = string.Format("公司组:{0}", e.EmployerGroup);
            this.toolStripStatusLabel_Employer.Text      = string.Format("公司:{0}", myClass_Employer.Employer);
            this.toolStripStatusLabel_Department.Text    = string.Format("部门:{0}", myClass_Department.Department);
            this.toolStripStatusLabel_WorkPlace.Text     = string.Format("作业区:{0}", myClass_WorkPlace.WorkPlace);
        }
Exemplo n.º 4
0
        private void button_OnOK_Click(object sender, EventArgs e)
        {
            this.userControl_EmployerBase1.FillClass();
            String str_ErrMessage;

            str_ErrMessage = myClass_Employer.CheckField();
            if (str_ErrMessage != null)
            {
                this.DialogResult          = DialogResult.None;
                this.label_ErrMessage.Text = str_ErrMessage;
                return;
            }
            if (this.bool_Add)
            {
                if (Class_Employer.ExistSecond(this.myClass_Employer.Employer, null, Enum_zwjKindofUpdate.Add))
                {
                    this.DialogResult          = DialogResult.None;
                    this.label_ErrMessage.Text = "公司名称不能重复!";
                    return;
                }
                else
                {
                    if (!this.myClass_Employer.AddAndModify(Enum_zwjKindofUpdate.Add))
                    {
                        this.label_ErrMessage.Text = "添加不成功!";
                        this.DialogResult          = DialogResult.None;
                        return;
                    }
                }
            }
            else
            {
                if (Class_Employer.ExistSecond(this.myClass_Employer.Employer, this.myClass_Employer.EmployerHPID, Enum_zwjKindofUpdate.Modify))
                {
                    this.DialogResult          = DialogResult.None;
                    this.label_ErrMessage.Text = "公司名称不能重复!";
                    return;
                }
                else
                {
                    this.myClass_Employer.AddAndModify(Enum_zwjKindofUpdate.Modify);
                }
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Exemplo n.º 5
0
 public void InitControlWelder(Class_Welder myClass_Welder)
 {
     this.TextBox_WelderName.Text = myClass_Welder.WelderName;
     this.MaskedTextBox_IdentificationCard.Text = myClass_Welder.IdentificationCard;
     this.TextBox_Schooling.Text               = myClass_Welder.Schooling;
     this.TextBox_WelderEnglishName.Text       = myClass_Welder.WelderEnglishName;
     this.DateTimePicker_WeldingBeinning.Value = myClass_Welder.WeldingBeginning;
     this.TextBox_WorkerID.Text = myClass_Welder.myClass_BelongUnit.WorkerID;
     if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.EmployerHPID))
     {
         this.TextBox_Employer.Text = "";
     }
     else
     {
         Class_Employer myClass_Employer = new Class_Employer(myClass_Welder.myClass_BelongUnit.EmployerHPID);
         this.TextBox_Employer.Text = myClass_Employer.Employer;
     }
     if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.DepartmentHPID))
     {
         this.TextBox_Department.Text = "";
     }
     else
     {
         Class_Department myClass_Department = new Class_Department(myClass_Welder.myClass_BelongUnit.DepartmentHPID);
         this.TextBox_Department.Text = myClass_Department.Department;
     }
     if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.WorkPlaceHPID))
     {
         this.TextBox_WorkPlace.Text = "";
     }
     else
     {
         Class_WorkPlace myClass_WorkPlace = new Class_WorkPlace(myClass_Welder.myClass_BelongUnit.WorkPlaceHPID);
         this.TextBox_WorkPlace.Text = myClass_WorkPlace.WorkPlace;
     }
     if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID))
     {
         this.TextBox_LaborServiceTeam.Text = "";
     }
     else
     {
         Class_LaborServiceTeam myClass_LaborServiceTeam = new Class_LaborServiceTeam(myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID);
         this.TextBox_LaborServiceTeam.Text = myClass_LaborServiceTeam.LaborServiceTeam;
     }
     this.CheckBox_Sex.Checked = myClass_Welder.Sex == "男";
 }
Exemplo n.º 6
0
        private string GetstrUnit()
        {
            string str_Unit = "统计单位:全部";

            if (string.IsNullOrEmpty(this.myEventArgs_Unit.WorkPlaceHPID))
            {
                if (string.IsNullOrEmpty(this.myEventArgs_Unit.DepartmentHPID))
                {
                    if (string.IsNullOrEmpty(this.myEventArgs_Unit.EmployerHPID))
                    {
                        if (string.IsNullOrEmpty(this.myEventArgs_Unit.EmployerGroup))
                        {
                            str_Unit = "统计单位:全部公司";
                        }
                        else
                        {
                            str_Unit = string.Format("统计单位:{0}", this.myEventArgs_Unit.EmployerGroup);
                        }
                    }
                    else
                    {
                        Class_Employer myClass_Employer = new Class_Employer(this.myEventArgs_Unit.EmployerHPID);
                        str_Unit = string.Format("统计单位:{0}", myClass_Employer.Employer);
                    }
                }
                else
                {
                    Class_Department myClass_Department = new Class_Department(this.myEventArgs_Unit.DepartmentHPID);
                    Class_Employer   myClass_Employer   = new Class_Employer(myClass_Department.EmployerHPID);
                    str_Unit = string.Format("统计单位:{0} -> {1}", myClass_Employer.Employer, myClass_Department.Department);
                }
            }
            else
            {
                Class_WorkPlace  myClass_WorkPlace  = new Class_WorkPlace(this.myEventArgs_Unit.WorkPlaceHPID);
                Class_Department myClass_Department = new Class_Department(myClass_WorkPlace.DepartmentHPID);
                Class_Employer   myClass_Employer   = new Class_Employer(myClass_Department.EmployerHPID);
                str_Unit = string.Format("统计单位:{0} -> {1} -> {2}", myClass_Employer.Employer, myClass_Department.Department, myClass_WorkPlace.WorkPlace);
            }
            return(str_Unit);
        }
Exemplo n.º 7
0
        public void InitDataGridView(string str_IssueNo, DataTable myDataTable)
        {
            Class_Public.InitializeComboBox(this.ComboBox_Assemblage, Enum_DataTable.Assemblage.ToString(), "Assemblage", "Assemblage");
            Class_Public.InitializeComboBox(this.ComboBox_KindofExam, Enum_DataTable.KindofExam.ToString(), "KindofExam", "KindofExam");
            Class_Public.InitializeComboBox(this.ComboBox_WeldingProcess, Enum_DataTable.WeldingProcess.ToString(), "WeldingProcessAb", "WeldingProcess");

            this.str_IssueNo = str_IssueNo;
            this.myDataTable = myDataTable;
            Class_Issue myClass_Issue = new Class_Issue(this.str_IssueNo);

            this.MaskedTextBox_IssueNo.Text      = myClass_Issue.IssueNo;
            this.DateTimePicker_SignUpDate.Value = myClass_Issue.SignUpDate;
            this.textBox_KindofEmployer.Text     = myClass_Issue.KindofEmployer;
            Class_Employer myClass_Employer = new Class_Employer(myClass_Issue.EmployerHPID);

            this.textBox_Employer.Text = string.Format("{0}:{1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
            this.ComboBox_WeldingProcess.SelectedValue = myClass_Issue.WeldingProcessAb;
            this.textBox_ShipClassificationAb.Text     = myClass_Issue.ShipClassificationAb;
            this.TextBox_ShipboardNo.Text = myClass_Issue.ShipboardNo;

            this.InitControlWeldingParameter(myClass_Issue.myClass_WeldingParameter);
        }
Exemplo n.º 8
0
        public void InitControlWelder(Class_KindofEmployerWelder myClass_KindofEmployerWelder)
        {
            this.TextBox_WelderName.Text = myClass_KindofEmployerWelder.WelderName;
            this.MaskedTextBox_IdentificationCard.Text = myClass_KindofEmployerWelder.IdentificationCard;
            this.TextBox_Schooling.Text = myClass_KindofEmployerWelder.Schooling;
            this.TextBox_KindofEmployerWelderID.Text  = myClass_KindofEmployerWelder.KindofEmployerWelderID.ToString();
            this.DateTimePicker_WeldingBeinning.Value = myClass_KindofEmployerWelder.WeldingBeginning;
            this.TextBox_WorkerID.Text = myClass_KindofEmployerWelder.myClass_BelongUnit.WorkerID;
            Class_Employer myClass_Employer = new Class_Employer(myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID);

            this.TextBox_Employer.Text = myClass_Employer.Employer;
            Class_Department myClass_Department = new Class_Department(myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID);

            this.TextBox_Department.Text = myClass_Department.Department;
            Class_WorkPlace myClass_WorkPlace = new Class_WorkPlace(myClass_KindofEmployerWelder.myClass_BelongUnit.WorkPlaceHPID);

            this.TextBox_WorkPlace.Text = myClass_WorkPlace.WorkPlace;
            Class_LaborServiceTeam myClass_LaborServiceTeam = new Class_LaborServiceTeam(myClass_KindofEmployerWelder.myClass_BelongUnit.LaborServiceTeamHPID);

            this.TextBox_LaborServiceTeam.Text = myClass_LaborServiceTeam.LaborServiceTeam;
            this.CheckBox_Sex.Checked          = myClass_KindofEmployerWelder.Sex == "男";
        }
Exemplo n.º 9
0
        public void InitDataGridView(string str_EmployerHPID, string str_DepartmentHPID, string str_WorkPlaceHPID, DataTable myDataTable)
        {
            Class_Employer   myClass_Employer;
            Class_Department myClass_Department;
            Class_WorkPlace  myClass_WorkPlace;

            this.str_EmployerHPID   = str_EmployerHPID;
            this.str_DepartmentHPID = str_DepartmentHPID;
            this.str_WorkPlaceHPID  = str_WorkPlaceHPID;
            this.myDataTable        = myDataTable;
            if (string.IsNullOrEmpty(this.str_WorkPlaceHPID))
            {
                if (string.IsNullOrEmpty(this.str_DepartmentHPID))
                {
                    myClass_Employer           = new Class_Employer(this.str_EmployerHPID);
                    this.TextBox_Employer.Text = string.Format("{0} : {1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                }
                else
                {
                    myClass_Department           = new Class_Department(this.str_DepartmentHPID);
                    this.TextBox_Department.Text = string.Format("{0} : {1}", myClass_Department.DepartmentHPID, myClass_Department.Department);
                    myClass_Employer             = new Class_Employer(myClass_Department.EmployerHPID);
                    this.TextBox_Employer.Text   = string.Format("{0} : {1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                    this.str_EmployerHPID        = myClass_Employer.EmployerHPID;
                }
            }
            else
            {
                myClass_WorkPlace            = new Class_WorkPlace(this.str_WorkPlaceHPID);
                this.TextBox_WorkPlace.Text  = string.Format("{0} : {1}", myClass_WorkPlace.WorkPlaceHPID, myClass_WorkPlace.WorkPlace);
                myClass_Department           = new Class_Department(myClass_WorkPlace.DepartmentHPID);
                this.TextBox_Department.Text = string.Format("{0} : {1}", myClass_Department.DepartmentHPID, myClass_Department.Department);
                myClass_Employer             = new Class_Employer(myClass_Department.EmployerHPID);
                this.TextBox_Employer.Text   = string.Format("{0} : {1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                this.str_DepartmentHPID      = myClass_Department.DepartmentHPID;
                this.str_EmployerHPID        = myClass_Employer.EmployerHPID;
            }
        }
        private void toolStripMenuItem_RowStatisticWelderQC_Click(object sender, EventArgs e)
        {
            DataView          myDataView_Temp;
            DataTable         myDataTable_Temp = new DataTable();
            Class_Data        myClass_Data;
            string            str_Unit = "统计单位:";
            Form_ReportSelect myForm   = new Form_ReportSelect();

            myForm.myClass_Report             = new Class_Report();
            myForm.myClass_Report.ReportGroup = "在册焊工持证统计";
            Form_CrystalReport myForm_Report = new Form_CrystalReport();
            string             str_FileName;

            if (myForm.ShowDialog() == DialogResult.OK)
            {
                str_FileName = string.Format("{0}\\CrystalReports\\{1}", System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), myForm.myClass_Report.ReportLocation);
                //myForm_Report.myDataView = this.myDataView;
                //myForm_Report.ShowDialog();
            }
            else
            {
                return;
            }

            if (string.IsNullOrEmpty(this.myEventArgs_Unit.WorkPlaceHPID))
            {
                if (string.IsNullOrEmpty(this.myEventArgs_Unit.DepartmentHPID))
                {
                    if (string.IsNullOrEmpty(this.myEventArgs_Unit.EmployerHPID))
                    {
                        if (string.IsNullOrEmpty(this.myEventArgs_Unit.EmployerGroup))
                        {
                            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Employer.ToString()];
                            myClass_Data.RefreshData(false, myDataTable_Temp);
                            myDataView_Temp = new DataView(myDataTable_Temp);
                            foreach (DataRowView myDataRowView in myDataView_Temp)
                            {
                                Class_Employer.StatisticWelderQC(myDataRowView["EmployerHPID"].ToString(), null, null);
                            }
                            myClass_Data.RefreshData(true, myDataTable_Temp);
                            myDataTable_Temp = myDataView_Temp.ToTable();
                            str_Unit         = "统计单位:全部公司";
                        }
                        else
                        {
                            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Employer.ToString()];
                            myClass_Data.RefreshData(false, myDataTable_Temp);
                            myDataView_Temp           = new DataView(myDataTable_Temp);
                            myDataView_Temp.RowFilter = string.Format("EmployerGroup='{0}'", this.myEventArgs_Unit.EmployerGroup);
                            foreach (DataRowView myDataRowView in myDataView_Temp)
                            {
                                Class_Employer.StatisticWelderQC(myDataRowView["EmployerHPID"].ToString(), null, null);
                            }
                            myClass_Data.RefreshData(true, myDataTable_Temp);
                            myDataTable_Temp = myDataView_Temp.ToTable();
                            str_Unit         = string.Format("统计单位:{0}", this.myEventArgs_Unit.EmployerGroup);
                        }
                    }
                    else
                    {
                        myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Department.ToString()];
                        myClass_Data.RefreshData(false, myDataTable_Temp);
                        myDataView_Temp           = new DataView(myDataTable_Temp);
                        myDataView_Temp.RowFilter = string.Format("EmployerHPID='{0}'", this.myEventArgs_Unit.EmployerHPID);
                        foreach (DataRowView myDataRowView in myDataView_Temp)
                        {
                            Class_Department.StatisticWelderQC(myDataRowView["DepartmentHPID"].ToString(), null, null);
                        }
                        Class_Employer myClass_Employer = new Class_Employer(this.myEventArgs_Unit.EmployerHPID);
                        myClass_Data.RefreshData(true, myDataTable_Temp);
                        myDataTable_Temp = myDataView_Temp.ToTable();
                        myDataTable_Temp.Columns.Remove("Employer");
                        myDataTable_Temp.Columns["Department"].ColumnName = "Employer";
                        str_Unit = string.Format("统计单位:{0}", myClass_Employer.Employer);
                    }
                }
                else
                {
                    myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WorkPlace.ToString()];
                    myClass_Data.RefreshData(false, myDataTable_Temp);
                    myDataView_Temp           = new DataView(myDataTable_Temp);
                    myDataView_Temp.RowFilter = string.Format("DepartmentHPID='{0}'", this.myEventArgs_Unit.DepartmentHPID);
                    foreach (DataRowView myDataRowView in myDataView_Temp)
                    {
                        Class_WorkPlace.StatisticWelderQC(myDataRowView["WorkPlaceHPID"].ToString(), null, null);
                    }
                    Class_Department myClass_Department = new Class_Department(this.myEventArgs_Unit.DepartmentHPID);
                    Class_Employer   myClass_Employer   = new Class_Employer(myClass_Department.EmployerHPID);
                    myClass_Data.RefreshData(true, myDataTable_Temp);
                    myDataTable_Temp = myDataView_Temp.ToTable();
                    myDataTable_Temp.Columns.Remove("Employer");
                    myDataTable_Temp.Columns["WorkPlace"].ColumnName = "Employer";
                    str_Unit = string.Format("统计单位:{0} -> {1}", myClass_Employer.Employer, myClass_Department.Department);
                }
            }
            else
            {
                return;
            }
            myForm_Report.InitCrystalReport(str_FileName, null, null, new DataView(myDataTable_Temp), null);
            CrystalDecisions.CrystalReports.Engine.TextObject myTextbox;
            myTextbox      = (CrystalDecisions.CrystalReports.Engine.TextObject)myForm_Report.myReportDocument.ReportDefinition.ReportObjects["TextFirst"];
            myTextbox.Text = str_Unit;
            myTextbox      = (CrystalDecisions.CrystalReports.Engine.TextObject)myForm_Report.myReportDocument.ReportDefinition.ReportObjects["TextSecond"];
            myTextbox.Text = string.Format("统计级别:全部");
            myForm_Report.ShowDialog();
        }
Exemplo n.º 11
0
        private void toolStripMenuItem_RowSynchronizationhdhr_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确认同步用友数据吗?", "确认窗口", MessageBoxButtons.OKCancel) != DialogResult.OK)
            {
                return;
            }
            string         str_SQL           = "SELECT docname FROM [hdhr].[dbo].[v_defdoc_xueli]";
            SqlDataAdapter myAdapter         = new SqlDataAdapter(str_SQL, Properties.Settings.Default.zwjConnhdhr);
            DataTable      myDataTable_xueli = new DataTable();

            myAdapter.Fill(myDataTable_xueli);
            Class_Schooling myClass_Schooling = new Class_Schooling();

            foreach (DataRow myDataRow in myDataTable_xueli.Rows)
            {
                if (!Class_Schooling.ExistAndCanDeleteAndDelete(myDataRow["docname"].ToString(), Enum_zwjKindofUpdate.Exist))
                {
                    myClass_Schooling.Schooling = myDataRow["docname"].ToString();
                    myClass_Schooling.AddAndModify(Enum_zwjKindofUpdate.Add);
                }
            }

            str_SQL = "SELECT [ryid],[ryxm],[ryxb],[xlmc],[rygh],[jcrq],[gsmc],[bmmc],[kscj],[lwgs] FROM [hdhr].[dbo].[v_psninfo_to_hangong]";
            Class_KindofEmployer myClass_KindofEmployer = new Class_KindofEmployer(this.myEventArgs_KindofEmployer.str_KindofEmployer);
            Class_Employer       myClass_Employer       = new Class_Employer(myClass_KindofEmployer.KindofEmployerEmployerHPID);
            Class_Department     myClass_Department     = new Class_Department(myClass_KindofEmployer.KindofEmployerDepartmentHPID);
            Class_WorkPlace      myClass_WorkPlace      = new Class_WorkPlace(myClass_KindofEmployer.KindofEmployerWorkPlaceHPID);

            switch (myClass_KindofEmployer.KindofEmployerLevel)
            {
            case 1:
                str_SQL += string.Format(" where gsmc='{0}'", myClass_Employer.Employer);
                break;

            case 2:
                str_SQL += string.Format(" where gsmc='{0}' and bmmc='{1}'", myClass_Employer.Employer, myClass_Department.Department);
                break;

            case 3:
                str_SQL += string.Format(" where gsmc='{0}' and bmmc='{1}' and kscj='{2}'", myClass_Employer.Employer, myClass_Department.Department, myClass_WorkPlace.WorkPlace);
                break;

            default:
                return;
            }
            myAdapter = new SqlDataAdapter(str_SQL, Properties.Settings.Default.zwjConnhdhr);
            DataTable myDataTable_hdhrhangong = new DataTable();

            myAdapter.Fill(myDataTable_hdhrhangong);
            Class_KindofEmployerWelder myClass_KindofEmployerWelder = new Class_KindofEmployerWelder();

            myClass_KindofEmployerWelder.KindofEmployer = myClass_KindofEmployer.KindofEmployer;
            string        str_Err;
            int           i_success           = 0;
            int           i_success_add       = 0;
            int           i_success_modify    = 0;
            int           i_success_delete    = 0;
            int           i_fail              = 0;
            StringBuilder myStringBuilder_err = new StringBuilder();

            foreach (DataRow myDataRow in this.myDataTable.Rows)
            {
                if (myDataTable_hdhrhangong.Select(string.Format("ryid='{0}'", myDataRow["IdentificationCard"])).GetLength(0) == 0)
                {
                    Class_KindofEmployerWelder.ExistAndCanDeleteAndDelete((int)myDataRow["KindofEmployerWelderID"], Enum_zwjKindofUpdate.Delete);
                    i_success_delete++;
                }
            }

            foreach (DataRow myDataRow in myDataTable_hdhrhangong.Rows)
            {
                myClass_KindofEmployerWelder.IdentificationCard = myDataRow["ryid"].ToString();
                myClass_KindofEmployerWelder.WelderName         = myDataRow["ryxm"].ToString();
                myClass_KindofEmployerWelder.Sex       = myDataRow["ryxb"].ToString();
                myClass_KindofEmployerWelder.Schooling = myDataRow["xlmc"].ToString();
                if (!DateTime.TryParse(myDataRow["jcrq"].ToString(), out myClass_KindofEmployerWelder.WeldingBeginning))
                {
                    myClass_KindofEmployerWelder.WeldingBeginning = DateTime.Now;
                }
                myClass_KindofEmployerWelder.myClass_BelongUnit.WorkerID     = myDataRow["rygh"].ToString();
                myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID = Class_Employer.GetEmployerHPID(myDataRow["gsmc"].ToString());
                if (string.IsNullOrEmpty(myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID))
                {
                    i_fail++;
                    myStringBuilder_err.Append(string.Format("\n身份证号码:{0}, 错误信息:公司名称不符", myClass_KindofEmployerWelder.IdentificationCard));
                    continue;
                }
                else
                {
                    myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID = Class_Department.GetDepartmentHPID(myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID, myDataRow["bmmc"].ToString());
                    if (string.IsNullOrEmpty(myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID))
                    {
                        myClass_KindofEmployerWelder.myClass_BelongUnit.WorkPlaceHPID = null;
                    }
                    else
                    {
                        myClass_KindofEmployerWelder.myClass_BelongUnit.WorkPlaceHPID = Class_WorkPlace.GetWorkPlaceHPID(myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID, myDataRow["kscj"].ToString());
                    }
                    myClass_KindofEmployerWelder.myClass_BelongUnit.LaborServiceTeamHPID = Class_LaborServiceTeam.GetLaborServiceTeamHPID(myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID, myDataRow["lwgs"].ToString());
                }
                str_Err = myClass_KindofEmployerWelder.CheckField();
                if (string.IsNullOrEmpty(str_Err))
                {
                    if (Class_KindofEmployerWelder.ExistSecond(myClass_KindofEmployerWelder.KindofEmployer, myClass_KindofEmployerWelder.IdentificationCard, 0, Enum_zwjKindofUpdate.Add))
                    {
                        myClass_KindofEmployerWelder.KindofEmployerWelderID = Class_KindofEmployerWelder.GetKindofEmployerWelderID(myClass_KindofEmployerWelder.KindofEmployer, myClass_KindofEmployerWelder.IdentificationCard);
                        myClass_KindofEmployerWelder.AddAndModify(Enum_zwjKindofUpdate.Modify);
                        i_success_modify++;
                        i_success++;
                    }
                    else
                    {
                        myClass_KindofEmployerWelder.AddAndModify(Enum_zwjKindofUpdate.Add);
                        i_success_add++;
                        i_success++;
                        if (!Class_Welder.ExistAndCanDeleteAndDelete(myClass_KindofEmployerWelder.IdentificationCard, Enum_zwjKindofUpdate.Exist))
                        {
                            Class_Welder myClass_Welder = new Class_Welder();
                            myClass_Welder.IdentificationCard = myClass_KindofEmployerWelder.IdentificationCard;
                            myClass_Welder.Schooling          = myClass_KindofEmployerWelder.Schooling;
                            myClass_Welder.Sex                = myClass_KindofEmployerWelder.Sex;
                            myClass_Welder.WelderName         = myClass_KindofEmployerWelder.WelderName;
                            myClass_Welder.WeldingBeginning   = myClass_KindofEmployerWelder.WeldingBeginning;
                            myClass_Welder.myClass_BelongUnit = myClass_KindofEmployerWelder.myClass_BelongUnit;
                            myClass_Welder.AddAndModify(Enum_zwjKindofUpdate.Add);
                        }
                    }
                }
                else
                {
                    i_fail++;
                    myStringBuilder_err.Append(string.Format("\n身份证号码:{0}, 错误信息:{1}", myClass_KindofEmployerWelder.IdentificationCard, str_Err));
                }
            }
            this.RefreshData(false);
            MessageBox.Show(string.Format("操作完成,其中同步成功{0}条,添加{1}条,删除{2}条,失败{3}条,失败原因如下:\n{4}", i_success, i_success_add, i_success_delete, i_fail, myStringBuilder_err.ToString()));
        }
Exemplo n.º 12
0
        private void CheckData_DataTable()
        {
            Class_Welder myClass_Welder;
            string       str_ErrMessage;

            foreach (DataRow myDataRow in this.myDataTable.Rows)
            {
                myDataRow["ErrMessage"] = "";
                str_ErrMessage          = "";

                myClass_Welder = new Class_Welder();
                myClass_Welder.IdentificationCard = myDataRow["IdentificationCard"].ToString().Trim();
                myClass_Welder.WelderName         = myDataRow["WelderName"].ToString().Trim();
                myClass_Welder.Schooling          = myDataRow["Schooling"].ToString().Trim();
                myClass_Welder.Sex = myDataRow["Sex"].ToString().Trim();
                DateTime.TryParse(myDataRow["WeldingBeginning"].ToString().Trim(), out myClass_Welder.WeldingBeginning);
                myClass_Welder.myClass_BelongUnit.WorkerID = myDataRow["WelderBelongWorkerID"].ToString().Trim();

                //myClass_Welder.myClass_BelongUnit.EmployerHPID = Class_Employer.GetEmployerHPID(myDataRow["WelderBelongEmployer"].ToString());
                myClass_Welder.myClass_BelongUnit.EmployerHPID = Class_Employer.GetEmployerHPIDbyDataTable(myDataRow["WelderBelongEmployer"].ToString().Trim());
                myDataRow["WelderBelongEmployerHPID"]          = myClass_Welder.myClass_BelongUnit.EmployerHPID;
                if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.EmployerHPID))
                {
                    str_ErrMessage = "公司数据有误!";
                }
                else
                {
                    if (!string.IsNullOrEmpty(myDataRow["WelderBelongDepartment"].ToString()))
                    {
                        //myClass_Welder.myClass_BelongUnit.DepartmentHPID = Class_Department.GetDepartmentHPID(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongDepartment"].ToString());
                        myClass_Welder.myClass_BelongUnit.DepartmentHPID = Class_Department.GetDepartmentHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongDepartment"].ToString().Trim());
                        myDataRow["WelderBelongDepartmentHPID"]          = myClass_Welder.myClass_BelongUnit.DepartmentHPID;
                        if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.DepartmentHPID))
                        {
                            str_ErrMessage = "部门数据有误!";
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(myDataRow["WelderBelongWorkPlace"].ToString()))
                            {
                                //myClass_Welder.myClass_BelongUnit.WorkPlaceHPID = Class_WorkPlace.GetWorkPlaceHPID(myClass_Welder.myClass_BelongUnit.DepartmentHPID, myDataRow["WelderBelongWorkPlace"].ToString());
                                myClass_Welder.myClass_BelongUnit.WorkPlaceHPID = Class_WorkPlace.GetWorkPlaceHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.DepartmentHPID, myDataRow["WelderBelongWorkPlace"].ToString().Trim());
                                myDataRow["WelderBelongWorkPlaceHPID"]          = myClass_Welder.myClass_BelongUnit.WorkPlaceHPID;
                                if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.WorkPlaceHPID))
                                {
                                    str_ErrMessage = "作业区数据有误!";
                                }
                            }
                        }
                    }
                    if (!string.IsNullOrEmpty(myDataRow["WelderBelongLaborServiceTeam"].ToString()))
                    {
                        //myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID = Class_LaborServiceTeam.GetLaborServiceTeamHPID(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongLaborServiceTeam"].ToString());
                        myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID = Class_LaborServiceTeam.GetLaborServiceTeamHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongLaborServiceTeam"].ToString().Trim());
                        myDataRow["WelderBelongLaborServiceTeamHPID"]          = myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID;
                        if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID))
                        {
                            str_ErrMessage = "劳务队数据有误!";
                        }
                    }
                }

                if (!string.IsNullOrEmpty(str_ErrMessage))
                {
                    myDataRow["ErrMessage"] = str_ErrMessage;
                    continue;
                }
                else
                {
                    str_ErrMessage = myClass_Welder.CheckField();
                    if (!string.IsNullOrEmpty(str_ErrMessage))
                    {
                        myDataRow["ErrMessage"] = str_ErrMessage;
                        continue;
                    }
                    string str_WelderName_Temp = Class_Welder.GetWelderName(myClass_Welder.IdentificationCard);
                    if (!string.IsNullOrEmpty(str_WelderName_Temp) && str_WelderName_Temp != myClass_Welder.WelderName)
                    {
                        myDataRow["ErrMessage"] = "姓名与数据库中该焊工不符!";
                        continue;
                    }
                }

                if (!Class_Schooling.ExistAndCanDeleteAndDelete(myClass_Welder.Schooling, Enum_zwjKindofUpdate.Exist))
                {
                    myDataRow["ErrMessage"] = "学历有误!";
                    continue;
                }

                if (!string.IsNullOrEmpty(this.str_WorkPlaceHPID))
                {
                    if (myClass_Welder.myClass_BelongUnit.WorkPlaceHPID != this.str_WorkPlaceHPID)
                    {
                        myDataRow["ErrMessage"] = "作业区超出导入数据范围,请重新选择导入单位!";
                        continue;
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(this.str_DepartmentHPID))
                    {
                        if (myClass_Welder.myClass_BelongUnit.DepartmentHPID != this.str_DepartmentHPID)
                        {
                            myDataRow["ErrMessage"] = "部门超出导入数据范围,请重新选择导入单位!";
                            continue;
                        }
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(this.str_EmployerHPID))
                        {
                            if (myClass_Welder.myClass_BelongUnit.EmployerHPID != this.str_EmployerHPID)
                            {
                                myDataRow["ErrMessage"] = "公司超出导入数据范围,请重新选择导入单位!";
                                continue;
                            }
                        }
                    }
                }
                //if (Class_WelderBelong.GetWelderBelong(myClass_Welder.IdentificationCard, this.str_EmployerHPID, this.str_DepartmentHPID, this.str_WorkPlaceHPID).Rows.Count > 1)
                //{
                //    myDataRow["ErrMessage"] = "数据库中该单位下该焊工有两条记录!";
                //    continue;
                //}
                //if (Class_WelderBelong.GetWelderBelong(myClass_Welder.IdentificationCard, this.str_EmployerHPID, this.str_DepartmentHPID, this.str_WorkPlaceHPID).Rows.Count > 0)
                //{
                //    myDataRow["ErrMessage"] = "数据库中该单位下已存在该焊工!";
                //    continue;
                //}
            }
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_GXTheoryIssue"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_GXTheoryIssue myClass_GXTheoryIssue, bool bool_Add)
        {
            this.myClass_GXTheoryIssue = myClass_GXTheoryIssue;
            Class_Public.InitializeComboBox(this.ComboBox_KindofExam, Enum_DataTable.KindofExam.ToString(), "KindofExam", "KindofExam");
            Class_Public.InitializeComboBox(this.ComboBox_WeldingProcess, Enum_DataTable.WeldingProcess.ToString(), "WeldingProcessAb", "WeldingProcessAb");
            this.textBox_ShipClassificationAb.Text = this.myClass_GXTheoryIssue.ShipClassificationAb;
            this.TextBox_ShipboardNo.Text          = this.myClass_GXTheoryIssue.ShipboardNo;

            if (bool_Add)
            {
                Class_Ship myClass_Ship = new Class_Ship(this.myClass_GXTheoryIssue.ShipboardNo);
                this.MaskedTextBox_IssueNo.Text = myClass_Ship.NextTheoryIssueNo;

                if (myClass_GXTheoryIssueDefault != null)
                {
                    this.ComboBox_WeldingProcess.SelectedValue = myClass_GXTheoryIssueDefault.WeldingProcessAb;
                    this.ComboBox_KindofExam.SelectedValue     = myClass_GXTheoryIssueDefault.KindofExam;
                    this.TextBox_PlaceofTest.Text    = myClass_GXTheoryIssueDefault.PlaceofTest;
                    this.textBox_KindofEmployer.Text = myClass_GXTheoryIssueDefault.KindofEmployer;
                    Class_Employer myClass_Employer = new Class_Employer(myClass_GXTheoryIssueDefault.EmployerHPID);
                    this.textBox_Employer.Text = string.Format("{0}:{1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                    this.myClass_GXTheoryIssue.KindofEmployer = myClass_GXTheoryIssueDefault.KindofEmployer;
                    this.myClass_GXTheoryIssue.EmployerHPID   = myClass_GXTheoryIssueDefault.EmployerHPID;
                }

                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                if (!string.IsNullOrEmpty(Properties.Settings.Default.TheoryTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.TheoryTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_TheoryTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
                if (!string.IsNullOrEmpty(Properties.Settings.Default.ArchiveTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.ArchiveTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_ArchiveTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
            }
            else
            {
                this.MaskedTextBox_IssueNo.Text      = myClass_GXTheoryIssue.IssueNo;
                this.TextBox_IssueRemark.Text        = myClass_GXTheoryIssue.IssueRemark;
                this.DateTimePicker_SignUpDate.Value = myClass_GXTheoryIssue.SignUpDate;
                this.textBox_KindofEmployer.Text     = myClass_GXTheoryIssue.KindofEmployer;
                Class_Employer myClass_Employer = new Class_Employer(myClass_GXTheoryIssue.EmployerHPID);
                this.textBox_Employer.Text = string.Format("{0}:{1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                this.ComboBox_WeldingProcess.SelectedValue = myClass_GXTheoryIssue.WeldingProcessAb;
                this.ComboBox_KindofExam.SelectedValue     = myClass_GXTheoryIssue.KindofExam;

                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                myClass_CustomUser.UserGUID = myClass_GXTheoryIssue.TheoryTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_TheoryTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                myClass_CustomUser.UserGUID = myClass_GXTheoryIssue.ArchiveTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_ArchiveTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                this.TextBox_PlaceofTest.Text = myClass_GXTheoryIssue.PlaceofTest;


                if (myClass_GXTheoryIssue.TheoryExamDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_TheoryExamDate.Text = myClass_GXTheoryIssue.TheoryExamDate.ToString("yyyy-MM-dd");
                }
                if (myClass_GXTheoryIssue.TheoryMakeupDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_TheoryMakeupDate.Text = myClass_GXTheoryIssue.TheoryMakeupDate.ToString("yyyy-MM-dd");
                }
                if (myClass_GXTheoryIssue.DateBeginningofTrain != DateTime.MinValue)
                {
                    this.MaskedTextBox_DateBeginningofTrain.Text = myClass_GXTheoryIssue.DateBeginningofTrain.ToString("yyyy-MM-dd");
                }
                if (myClass_GXTheoryIssue.DateEndingofTrain != DateTime.MinValue)
                {
                    this.MaskedTextBox_DateEndingofTrain.Text = myClass_GXTheoryIssue.DateEndingofTrain.ToString("yyyy-MM-dd");
                }

                this.CheckBox_TheoryTrained.Checked    = Class_DataValidateTool.CheckUintBit(this.myClass_GXTheoryIssue.IssueStatus, 0);
                this.CheckBox_TheoryExam.Checked       = Class_DataValidateTool.CheckUintBit(this.myClass_GXTheoryIssue.IssueStatus, 1);
                this.CheckBox_TheoryExamMakeup.Checked = Class_DataValidateTool.CheckUintBit(this.myClass_GXTheoryIssue.IssueStatus, 4);
                this.CheckBox_Finished.Checked         = Class_DataValidateTool.CheckUintBit(this.myClass_GXTheoryIssue.IssueStatus, 31);
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_Issue"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_Issue myClass_Issue, bool bool_Add)
        {
            Class_Public.InitializeComboBox(this.ComboBox_Assemblage, Enum_DataTable.Assemblage.ToString(), "Assemblage", "Assemblage");
            Class_Public.InitializeComboBox(this.ComboBox_KindofExam, Enum_DataTable.KindofExam.ToString(), "KindofExam", "KindofExam");
            Class_Public.InitializeComboBox(this.ComboBox_WeldingProcess, Enum_DataTable.WeldingProcess.ToString(), "WeldingProcessAb", "WeldingProcessAb");
            this.myClass_Issue = myClass_Issue;
            this.textBox_ShipClassificationAb.Text = this.myClass_Issue.ShipClassificationAb;
            this.TextBox_ShipboardNo.Text          = this.myClass_Issue.ShipboardNo;
            if (bool_Add)
            {
                Class_ShipClassification myClass_ShipClassification = new Class_ShipClassification(this.myClass_Issue.ShipClassificationAb);
                if (myClass_ShipClassification.ShipRestrict)
                {
                    Class_Ship myClass_Ship = new Class_Ship(this.myClass_Issue.ShipboardNo);
                    this.MaskedTextBox_IssueNo.Text = myClass_Ship.NextSkillIssueNo;
                }
                else
                {
                    this.MaskedTextBox_IssueNo.Text = myClass_ShipClassification.NextIssueNo;
                }
                if (myClass_IssueDefault != null)
                {
                    this.InitControlWeldingParameter(myClass_IssueDefault.myClass_WeldingParameter);
                    this.ComboBox_WeldingProcess.SelectedValue = myClass_IssueDefault.WeldingProcessAb;
                    this.TextBox_PlaceofTest.Text           = myClass_IssueDefault.PlaceofTest;
                    this.TextBox_SupervisionPlace.Text      = myClass_IssueDefault.SupervisionPlace;
                    this.NumericUpDown_OriginalPeriod.Value = myClass_IssueDefault.PeriodofValidity;
                    this.textBox_KindofEmployer.Text        = myClass_IssueDefault.KindofEmployer;
                    if (!string.IsNullOrEmpty(myClass_IssueDefault.EmployerHPID))
                    {
                        Class_Employer myClass_Employer = new Class_Employer(myClass_IssueDefault.EmployerHPID);
                        this.textBox_Employer.Text = string.Format("{0}:{1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                    }
                    this.myClass_Issue.KindofEmployer = myClass_IssueDefault.KindofEmployer;
                    this.myClass_Issue.EmployerHPID   = myClass_IssueDefault.EmployerHPID;
                }

                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                if (!string.IsNullOrEmpty(Properties.Settings.Default.TheoryTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.TheoryTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_TheoryTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
                if (!string.IsNullOrEmpty(Properties.Settings.Default.SkillTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.SkillTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_SkillTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
                if (!string.IsNullOrEmpty(Properties.Settings.Default.SupervisorID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.SupervisorID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_SupervisorID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
                if (!string.IsNullOrEmpty(Properties.Settings.Default.IssueQCTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.IssueQCTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_IssueQCTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
                if (!string.IsNullOrEmpty(Properties.Settings.Default.ArchiveTeacherID))
                {
                    myClass_CustomUser.UserGUID = new Guid(Properties.Settings.Default.ArchiveTeacherID);
                    if (myClass_CustomUser.FillData())
                    {
                        this.textBox_ArchiveTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                    }
                }
            }
            else
            {
                this.MaskedTextBox_IssueNo.Text      = myClass_Issue.IssueNo;
                this.TextBox_IssueRemark.Text        = myClass_Issue.IssueRemark;
                this.DateTimePicker_SignUpDate.Value = myClass_Issue.SignUpDate;
                this.textBox_KindofEmployer.Text     = myClass_Issue.KindofEmployer;
                Class_Employer myClass_Employer = new Class_Employer(myClass_Issue.EmployerHPID);
                this.textBox_Employer.Text = string.Format("{0}:{1}", myClass_Employer.EmployerHPID, myClass_Employer.Employer);
                this.ComboBox_WeldingProcess.SelectedValue = myClass_Issue.WeldingProcessAb;

                this.InitControlWeldingParameter(this.myClass_Issue.myClass_WeldingParameter);

                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                myClass_CustomUser.UserGUID = myClass_Issue.TheoryTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_TheoryTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                myClass_CustomUser.UserGUID = myClass_Issue.ArchiveTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_ArchiveTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                myClass_CustomUser.UserGUID = myClass_Issue.SkillTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_SkillTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                myClass_CustomUser.UserGUID = myClass_Issue.SupervisorID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_SupervisorID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                myClass_CustomUser.UserGUID = myClass_Issue.IssueQCTeacherID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_IssueQCTeacherID.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                this.TextBox_PlaceofTest.Text = myClass_Issue.PlaceofTest;


                if (myClass_Issue.TheoryExamDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_TheoryExamDate.Text = myClass_Issue.TheoryExamDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.TheoryMakeupDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_TheoryMakeupDate.Text = myClass_Issue.TheoryMakeupDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.SkillExamDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_SkillExamDate.Text = myClass_Issue.SkillExamDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.SkillMakeupDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_SkillMakeupDate.Text = myClass_Issue.SkillMakeupDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.DateBeginningofTrain != DateTime.MinValue)
                {
                    this.MaskedTextBox_DateBeginningofTrain.Text = myClass_Issue.DateBeginningofTrain.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.DateEndingofTrain != DateTime.MinValue)
                {
                    this.MaskedTextBox_DateEndingofTrain.Text = myClass_Issue.DateEndingofTrain.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.VisualTestDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_VisualTestDate.Text = myClass_Issue.VisualTestDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.BendTestDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_BendTestDate.Text = myClass_Issue.BendTestDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.RTTestDate != DateTime.MinValue)
                {
                    this.MaskedTextBox_RTTestDate.Text = myClass_Issue.RTTestDate.ToString("yyyy-MM-dd");
                }
                if (myClass_Issue.IssueIssuedOn != DateTime.MinValue)
                {
                    this.MaskedTextBox_IssuedOn.Text = myClass_Issue.IssueIssuedOn.ToString("yyyy-MM-dd");
                }
                this.TextBox_SupervisionPlace.Text = myClass_Issue.SupervisionPlace;
                if (myClass_Issue.PeriodofValidity >= this.NumericUpDown_OriginalPeriod.Minimum && myClass_Issue.PeriodofValidity <= this.NumericUpDown_OriginalPeriod.Maximum)
                {
                    this.NumericUpDown_OriginalPeriod.Value = myClass_Issue.PeriodofValidity;
                }

                this.CheckBox_TheoryTrained.Checked    = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 0);
                this.CheckBox_TheoryExam.Checked       = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 1);
                this.CheckBox_TheoryExamMakeup.Checked = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 4);
                this.CheckBox_SkillTrained.Checked     = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 6);
                this.CheckBox_SkillExam.Checked        = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 7);
                this.CheckBox_SkillExamMakeup.Checked  = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 10);
                this.CheckBox_Certificated.Checked     = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 14);
                this.CheckBox_Finished.Checked         = Class_DataValidateTool.CheckUintBit(this.myClass_Issue.IssueStatus, 31);
            }
        }
Exemplo n.º 15
0
        private void  CheckData_DataTable()
        {
            Class_Welder  myClass_Welder;
            Class_Student myClass_Student;
            Class_Issue   myClass_Issue = new Class_Issue(this.str_IssueNo);
            string        str_ErrMessage;

            foreach (DataRow myDataRow in this.myDataTable.Rows)
            {
                myDataRow["ErrMessage"] = "";
                str_ErrMessage          = "";

                myClass_Welder = new Class_Welder();
                myClass_Welder.IdentificationCard = myDataRow["IdentificationCard"].ToString().Trim();
                myClass_Welder.WelderName         = myDataRow["WelderName"].ToString().Trim();
                myClass_Welder.Schooling          = myDataRow["Schooling"].ToString().Trim();
                myClass_Welder.Sex = myDataRow["Sex"].ToString().Trim();
                DateTime.TryParse(myDataRow["WeldingBeginning"].ToString().Trim(), out myClass_Welder.WeldingBeginning);
                myClass_Welder.myClass_BelongUnit.WorkerID = myDataRow["WelderWorkerID"].ToString().Trim();

                //myClass_Welder.myClass_BelongUnit.EmployerHPID = Class_Employer.GetEmployerHPID(myDataRow["WelderBelongEmployer"].ToString());
                myClass_Welder.myClass_BelongUnit.EmployerHPID = Class_Employer.GetEmployerHPIDbyDataTable(myDataRow["WelderEmployer"].ToString().Trim());
                myDataRow["WelderEmployerHPID"] = myClass_Welder.myClass_BelongUnit.EmployerHPID;
                if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.EmployerHPID))
                {
                    str_ErrMessage = "公司数据有误!";
                }
                else
                {
                    if (!string.IsNullOrEmpty(myDataRow["WelderDepartment"].ToString().Trim()))
                    {
                        //myClass_Welder.myClass_BelongUnit.DepartmentHPID = Class_Department.GetDepartmentHPID(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongDepartment"].ToString());
                        myClass_Welder.myClass_BelongUnit.DepartmentHPID = Class_Department.GetDepartmentHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderDepartment"].ToString().Trim());
                        myDataRow["WelderDepartmentHPID"] = myClass_Welder.myClass_BelongUnit.DepartmentHPID;
                        if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.DepartmentHPID))
                        {
                            str_ErrMessage = "部门数据有误!";
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(myDataRow["WelderWorkPlace"].ToString().Trim()))
                            {
                                //myClass_Welder.myClass_BelongUnit.WorkPlaceHPID = Class_WorkPlace.GetWorkPlaceHPID(myClass_Welder.myClass_BelongUnit.DepartmentHPID, myDataRow["WelderBelongWorkPlace"].ToString());
                                myClass_Welder.myClass_BelongUnit.WorkPlaceHPID = Class_WorkPlace.GetWorkPlaceHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.DepartmentHPID, myDataRow["WelderWorkPlace"].ToString().Trim());
                                myDataRow["WelderWorkPlaceHPID"] = myClass_Welder.myClass_BelongUnit.WorkPlaceHPID;
                                if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.WorkPlaceHPID))
                                {
                                    str_ErrMessage = "作业区数据有误!";
                                }
                            }
                        }
                    }
                    if (!string.IsNullOrEmpty(myDataRow["WelderLaborServiceTeam"].ToString().Trim()))
                    {
                        //myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID = Class_LaborServiceTeam.GetLaborServiceTeamHPID(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderBelongLaborServiceTeam"].ToString());
                        myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID = Class_LaborServiceTeam.GetLaborServiceTeamHPIDbyDataTable(myClass_Welder.myClass_BelongUnit.EmployerHPID, myDataRow["WelderLaborServiceTeam"].ToString().Trim());
                        myDataRow["WelderLaborServiceTeamHPID"] = myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID;
                        if (string.IsNullOrEmpty(myClass_Welder.myClass_BelongUnit.LaborServiceTeamHPID))
                        {
                            str_ErrMessage = "劳务队数据有误!";
                        }
                    }
                }

                if (!string.IsNullOrEmpty(str_ErrMessage))
                {
                    myDataRow["ErrMessage"] = str_ErrMessage;
                    continue;
                }
                else
                {
                    str_ErrMessage = myClass_Welder.CheckField();
                    if (!string.IsNullOrEmpty(str_ErrMessage))
                    {
                        myDataRow["ErrMessage"] = str_ErrMessage;
                        continue;
                    }
                    string str_WelderName_Temp = Class_Welder.GetWelderName(myClass_Welder.IdentificationCard);
                    if (!string.IsNullOrEmpty(str_WelderName_Temp) && str_WelderName_Temp != myClass_Welder.WelderName)
                    {
                        myDataRow["ErrMessage"] = "姓名与数据库中该焊工不符!";
                        continue;
                    }
                }

                myClass_Student = new Class_Student();
                myClass_Student.IdentificationCard       = myClass_Welder.IdentificationCard;
                myClass_Student.IssueNo                  = this.str_IssueNo;
                myClass_Student.SubjectID                = myDataRow["ExamSubjectID"].ToString().Trim();
                myClass_Student.ExamStatus               = "顺利考试";
                myClass_Student.myClass_WeldingParameter = myClass_Issue.myClass_WeldingParameter;
                str_ErrMessage = myClass_Student.CheckField();
                if (!string.IsNullOrEmpty(str_ErrMessage))
                {
                    myDataRow["ErrMessage"] = str_ErrMessage;
                    continue;
                }
            }
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_WelderBelong"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_WelderBelong myClass_WelderBelong, bool bool_Add)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.LaborServiceTeam.ToString()];

            this.myDataView_LaborServiceTeam      = new DataView(myClass_Data.myDataTable);
            this.myDataView_LaborServiceTeam.Sort = myClass_Data.myDataView.Sort;
            Class_DataControlBind.InitializeComboBox(this.ComboBox_LaborServiceTeam, this.myDataView_LaborServiceTeam, "LaborServiceTeamHPID", "LaborServiceTeam");
            this.CheckBox_Sex.Enabled = false;
            this.DateTimePicker_WeldingBeinning.Enabled = false;
            this.myClass_WelderBelong = myClass_WelderBelong;

            if (string.IsNullOrEmpty(myClass_WelderBelong.myClass_BelongUnit.WorkPlaceHPID))
            {
                if (string.IsNullOrEmpty(myClass_WelderBelong.myClass_BelongUnit.DepartmentHPID))
                {
                    Class_Employer myClass_Employer = new Class_Employer(myClass_WelderBelong.myClass_BelongUnit.EmployerHPID);
                    this.TextBox_Employer.Text = myClass_Employer.Employer;
                }
                else
                {
                    Class_Department myClass_Department = new Class_Department(myClass_WelderBelong.myClass_BelongUnit.DepartmentHPID);
                    this.TextBox_Department.Text = myClass_Department.Department;
                    Class_Employer myClass_Employer = new Class_Employer(myClass_Department.EmployerHPID);
                    this.TextBox_Employer.Text = myClass_Employer.Employer;
                    this.myClass_WelderBelong.myClass_BelongUnit.EmployerHPID = myClass_Employer.EmployerHPID;
                }
            }
            else
            {
                Class_WorkPlace myClass_WorkPlace = new Class_WorkPlace(myClass_WelderBelong.myClass_BelongUnit.WorkPlaceHPID);
                this.TextBox_WorkPlace.Text = myClass_WorkPlace.WorkPlace;
                Class_Department myClass_Department = new Class_Department(myClass_WorkPlace.DepartmentHPID);
                this.TextBox_Department.Text = myClass_Department.Department;
                Class_Employer myClass_Employer = new Class_Employer(myClass_Department.EmployerHPID);
                this.TextBox_Employer.Text = myClass_Employer.Employer;
                this.myClass_WelderBelong.myClass_BelongUnit.DepartmentHPID = myClass_Department.DepartmentHPID;
                this.myClass_WelderBelong.myClass_BelongUnit.EmployerHPID   = myClass_Employer.EmployerHPID;
            }

            this.myDataView_LaborServiceTeam.RowFilter = string.Format("EmployerHPID='{0}'", this.myClass_WelderBelong.myClass_BelongUnit.EmployerHPID);

            if (bool_Add)
            {
                if (myClass_WelderBelongDefault != null)
                {
                }
            }
            else
            {
                myDataView_LaborServiceTeam.RowFilter = string.Format("EmployerHPID='{0}'", this.myClass_WelderBelong.myClass_BelongUnit.EmployerHPID);
                this.textBox_WelderBelongID.Text      = this.myClass_WelderBelong.WelderBelongID.ToString();
                this.textBox_WelderBelongRemark.Text  = myClass_WelderBelong.WelderBelongRemark;

                this.InitControlWelder(new Class_Welder(this.myClass_WelderBelong.IdentificationCard));


                if (string.IsNullOrEmpty(myClass_WelderBelong.myClass_BelongUnit.LaborServiceTeamHPID))
                {
                    this.CheckBox_LaborServiceTeam.Checked = false;
                }
                else
                {
                    this.CheckBox_LaborServiceTeam.Checked       = true;
                    this.ComboBox_LaborServiceTeam.SelectedValue = myClass_WelderBelong.myClass_BelongUnit.LaborServiceTeamHPID;
                }
                this.TextBox_WorkerID.Text = myClass_WelderBelong.myClass_BelongUnit.WorkerID;
            }
        }
        private void InitDataGridView()
        {
            string           str_Unit;
            string           str_WelderBelongFilter;
            Class_Employer   myClass_Employer;
            Class_Department myClass_Department;
            Class_WorkPlace  myClass_WorkPlace;

            switch (this.myClass_KindofEmployer.KindofEmployerLevel)
            {
            case 1:
                myClass_Employer       = new Class_Employer(this.myClass_KindofEmployer.KindofEmployerEmployerHPID);
                str_Unit               = myClass_Employer.Employer;
                str_WelderBelongFilter = string.Format("WelderBelongEmployerHPID='{0}'", myClass_Employer.EmployerHPID);
                break;

            case 2:
                myClass_Department     = new Class_Department(this.myClass_KindofEmployer.KindofEmployerDepartmentHPID);
                myClass_Employer       = new Class_Employer(myClass_Department.EmployerHPID);
                str_Unit               = string.Format("{0} , {1}", myClass_Employer.Employer, myClass_Department.Department);
                str_WelderBelongFilter = string.Format("WelderBelongDepartmentHPID='{0}'", myClass_Department.DepartmentHPID);
                break;

            case 3:
                myClass_WorkPlace      = new Class_WorkPlace(this.myClass_KindofEmployer.KindofEmployerWorkPlaceHPID);
                myClass_Department     = new Class_Department(myClass_WorkPlace.DepartmentHPID);
                myClass_Employer       = new Class_Employer(myClass_Department.EmployerHPID);
                str_Unit               = string.Format("{0} , {1} , {2}", myClass_Employer.Employer, myClass_Department.Department, myClass_WorkPlace.WorkPlace);
                str_WelderBelongFilter = string.Format("WelderBelongWorkPlaceHPID='{0}'", myClass_WorkPlace.WorkPlaceHPID);
                break;

            default:
                return;
            }

            Class_DataControlBind.InitializeDataGridView(this.dataGridView_WelderBelong, Enum_DataTable.WelderBelong.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WelderBelong.ToString()];

            myClass_Data.SetFilter(str_WelderBelongFilter);
            myClass_Data.RefreshData(false);
            this.myDataTable_WelderBelong             = myClass_Data.myDataTable.Copy();
            this.dataGridView_WelderBelong.DataSource = new DataView(this.myDataTable_WelderBelong);
            ((DataView)this.dataGridView_WelderBelong.DataSource).Sort = myClass_Data.myDataView.Sort;
            this.label_WelderBelong.Text = string.Format("本系统:  {0},({1})", str_Unit, this.dataGridView_WelderBelong.RowCount);

            Class_DataControlBind.InitializeDataGridView(this.dataGridView_KindofEmployerWelder, Enum_DataTable.KindofEmployerWelder.ToString(), false);
            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.KindofEmployerWelder.ToString()];
            myClass_Data.SetFilter(string.Format("KindofEmployer='{0}'", this.myClass_KindofEmployer.KindofEmployer));
            myClass_Data.RefreshData(false);
            this.myDataTable_KindofEmployerWelder             = myClass_Data.myDataTable.Copy();
            this.dataGridView_KindofEmployerWelder.DataSource = new DataView(this.myDataTable_KindofEmployerWelder);
            ((DataView)this.dataGridView_KindofEmployerWelder.DataSource).Sort = myClass_Data.myDataView.Sort;
            this.label_KindofEmployerWelder.Text = string.Format("报考单位:  {0},({1})", this.myClass_KindofEmployer.KindofEmployer, this.dataGridView_KindofEmployerWelder.RowCount);

            if (this.comboBox_KindofSynchronization.SelectedIndex == 0)
            {
                this.label_KindofSynchronization.Text = string.Format("同步数据类型:{0} -> {1}", this.myClass_KindofEmployer.KindofEmployer, str_Unit);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Add, Enum_DataTable.KindofEmployerWelder.ToString(), false);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Modify, Enum_DataTable.KindofEmployerWelder.ToString(), false);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Delete, Enum_DataTable.WelderBelong.ToString(), false);
                this.myDataTable_Add    = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Add, true, false);
                this.myDataTable_Modify = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Modify, true, false);
                this.myDataTable_Delete = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Delete, true, false);
            }
            else
            {
                this.label_KindofSynchronization.Text = string.Format("同步数据类型:{1} -> {0}", this.myClass_KindofEmployer.KindofEmployer, str_Unit);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Add, Enum_DataTable.WelderBelong.ToString(), false);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Modify, Enum_DataTable.WelderBelong.ToString(), false);
                Class_DataControlBind.InitializeDataGridView(this.dataGridView_Delete, Enum_DataTable.KindofEmployerWelder.ToString(), false);
                this.myDataTable_Add    = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Add, false, false);
                this.myDataTable_Modify = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Modify, false, false);
                this.myDataTable_Delete = myClass_KindofEmployer.GetDataTable_Synchronization(Enum_zwjKindofUpdate.Delete, false, false);
            }
            this.dataGridView_Add.DataSource = new DataView(this.myDataTable_Add);
            this.label_Add.Text = string.Format("添加后的数据,({0}):", this.dataGridView_Add.RowCount);
            this.dataGridView_Modify.DataSource = new DataView(this.myDataTable_Modify);
            this.label_Modify.Text = string.Format("修改后的数据,({0}):", this.dataGridView_Modify.RowCount);
            this.dataGridView_Delete.DataSource = new DataView(this.myDataTable_Delete);
            this.label_Delete.Text = string.Format("删除前的数据,({0}):", this.dataGridView_Delete.RowCount);
        }