Пример #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
            {
            }
        }
Пример #2
0
        public void InitControl(Class_Material myClass_Material, bool bool_Add)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingStandardAndGroup.ToString()];
            DataView   myDataView_WeldingStandardAndGroup = new DataView(myClass_Data.myDataTable);

            myDataView_WeldingStandardAndGroup.RowFilter = "WeldingStandardGroup='½ðÊô²ÄÁϱê×¼'";
            Class_DataControlBind.InitializeComboBox(this.comboBox_MaterialDenominateWeldingStandard, myDataView_WeldingStandardAndGroup, "WeldingStandard", "WeldingStandard");

            this.myClass_Material = myClass_Material;

            if (bool_Add)
            {
                if (myClass_MaterialDefault != null)
                {
                }
            }
            else
            {
                this.textBox_Material.ReadOnly   = true;
                this.textBox_Material.Text       = myClass_Material.Material;
                this.textBox_MaterialGBName.Text = myClass_Material.MaterialGBName;
                this.comboBox_MaterialDenominateWeldingStandard.SelectedValue = myClass_Material.MaterialDenominateWeldingStandard;
                this.textBox_MaterialCCSGroupAb.Text   = myClass_Material.MaterialCCSGroupAb;
                this.textBox_MaterialISOGroupAb.Text   = myClass_Material.MaterialISOGroupAb;
                this.textBox_MaterialRemark.Text       = myClass_Material.MaterialRemark;
                this.numericUpDown_MaterialIndex.Value = myClass_Material.MaterialIndex;
            }
        }
Пример #3
0
        private void UserControl_WPSHeatTreatmentBase_Load(object sender, EventArgs e)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.HeatTreatment.ToString()];

            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSHeatTreatment, myClass_Data.myDataView, "HeatTreatment", "HeatTreatment");

            Class_Public.InitializeComboBox(this.comboBox_WPSHeatKindofLimit, Enum_DataTableSecond.KindofLimit.ToString(), "KindofLimit", "KindofLimit");

            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.HeatMethod.ToString()];
            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSHeatMethod, myClass_Data.myDataView, "HeatMethod", "HeatMethod");
        }
        private void UserControl_WPSSequenceBase_Load(object sender, EventArgs e)
        {
            this.textBox_WPSSequenceWeldingConsumable.BackColor = Properties.Settings.Default.textBoxDoubleClickColor;

            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingProcess.ToString()];

            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSSequenceWeldingProcessAb, myClass_Data.myDataView, "WeldingProcessAb", "WeldingProcessAb");
            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingPosition.ToString()];
            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSSequenceWeldingPosition, myClass_Data.myDataView, "WeldingPosition", "WeldingPosition");
            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.TypeofCurrentAndPolarity.ToString()];
            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSSequenceTypeofCurrentAndPolarity, myClass_Data.myDataView, "TypeofCurrentAndPolarity", "TypeofCurrentAndPolarity");
        }
        private void Form_GasAndWeldingFluxQuery_Load(object sender, EventArgs e)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.GasAndWeldingFluxGroup.ToString()];

            Class_DataControlBind.InitializeComboBox(this.comboBox_GasAndWeldingFluxGroup, myClass_Data.myDataView, "GasAndWeldingFluxGroup", "GasAndWeldingFluxGroup");

            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTableSecond.GasAndWeldingFlux.ToString(), false);
            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.GasAndWeldingFlux.ToString()];
            this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable);
            ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort;
            if (this.myClass_GasAndWeldingFlux.GasAndWeldingFlux != null)
            {
                Class_DataControlBind.SetDataGridViewSelectedPosition("GasAndWeldingFlux", this.myClass_GasAndWeldingFlux.GasAndWeldingFlux, this.dataGridView_Query);
            }
        }
Пример #6
0
        private void Form_EmployerQuery_Load(object sender, EventArgs e)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.EmployerGroup.ToString()];

            Class_DataControlBind.InitializeComboBox(this.comboBox_EmployerGroup, myClass_Data.myDataView, "EmployerGroup", "EmployerGroup");

            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Employer, Enum_DataTable.Employer.ToString(), false);
            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Employer.ToString()];
            this.dataGridView_Employer.DataSource = new DataView(myClass_Data.myDataTable);
            ((DataView)this.dataGridView_Employer.DataSource).Sort = myClass_Data.myDataView.Sort;
            if (!string.IsNullOrEmpty(this.myClass_Employer.EmployerHPID))
            {
                //object[] object_SortValue = new object[1] { this.myClass_Employer.EmployerHPID };
                //Class_Public.myclass_DataControlBind.SetDataGridViewSelectedPosition("EmployerHPID", object_SortValue, this.dataGridView_Employer);
                Class_DataControlBind.SetDataGridViewSelectedPosition("EmployerHPID", this.myClass_Employer.EmployerHPID, this.dataGridView_Employer);
            }
        }
Пример #7
0
        private void Form_WeldingSubject_Query_Load(object sender, EventArgs e)
        {
            DataView myDataView_WeldingStandard = new DataView(((Class_Data )Class_Public.myHashtable[Enum_DataTable.WeldingStandardAndGroup.ToString()]).myDataTable);

            myDataView_WeldingStandard.RowFilter = "WeldingStandardGroup='焊工考试标准'";
            Class_DataControlBind.InitializeComboBox(this.ComboBox_WeldingStandard, myDataView_WeldingStandard, "WeldingStandard", "WeldingStandard");

            Class_Public.InitializeComboBox(this.ComboBox_JointType, Enum_DataTable.JointType.ToString(), "JointType", "JointType");
            Class_Public.InitializeComboBox(this.ComboBox_WorkPieceType, Enum_DataTable.WorkPieceType.ToString(), "WorkPieceType", "WorkPieceType");
            this.ComboBox_JointType.Text       = "";
            this.ComboBox_WeldingStandard.Text = "";
            this.ComboBox_WorkPieceType.Text   = "";
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.WeldingSubject.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingSubject.ToString()];

            this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable);
            ((DataView)this.dataGridView_Query.DataSource).RowFilter = this.str_FilterRestrict;
            ((DataView)this.dataGridView_Query.DataSource).Sort      = myClass_Data.myDataView.Sort;

            if (!string.IsNullOrEmpty(this.myClass_WeldingSubject.SubjectID))
            {
                Class_DataControlBind.SetDataGridViewSelectedPosition("SubjectID", this.myClass_WeldingSubject.SubjectID, this.dataGridView_Query);
            }
        }
Пример #8
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_IssueProcess"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_IssueProcess myClass_IssueProcess, string str_ProcessStatusGroup, bool bool_Add)
        {
            this.myClass_IssueProcess            = myClass_IssueProcess;
            this.str_ProcessStatusGroup          = str_ProcessStatusGroup;
            this.textBox_ProcessStatusGroup.Text = this.str_ProcessStatusGroup;
            this.textBox_IssueNo.Text            = myClass_IssueProcess.IssueNo;
            if (this.myClass_IssueProcess.IssueProcessPrincipal == null)
            {
                this.myClass_IssueProcess.IssueProcessPrincipal = Class_zwjPublic.myClass_CustomUser.UserGUID;
            }
            Class_CustomUser myClass_CustomUser = new Class_CustomUser(this.myClass_IssueProcess.IssueProcessPrincipal);

            this.textBox_IssueProcessPrincipal.Text = string.Format("{0}:{1}", myClass_CustomUser.UserName, myClass_CustomUser.Name);

            DataView myDataView = new DataView(Class_ProcessStatus.myClass_Data.myDataTable);

            myDataView.Sort      = Class_ProcessStatus.myClass_Data.myDataView.Sort;
            myDataView.RowFilter = string.Format("ProcessStatusGroup='{0}'", this.str_ProcessStatusGroup);
            Class_DataControlBind.InitializeComboBox(this.comboBox_IssueProcessStatus, myDataView, "ProcessStatus", "ProcessStatus");

            if (bool_Add)
            {
                if (myClass_IssueProcessDefault != null)
                {
                }
            }
            else
            {
                this.textBox_IssueProcessID.Text = myClass_IssueProcess.IssueProcessID.ToString();
                this.DateTimePicker_IssueProcessBeginDate.Value = myClass_IssueProcess.IssueProcessBeginDate;
                this.DateTimePicker_IssueProcessEndDate.Value   = myClass_IssueProcess.IssueProcessEndDate;
                this.CheckBox_IssueProcessFinished.Checked      = myClass_IssueProcess.IssueProcessFinished;
                this.comboBox_IssueProcessStatus.SelectedValue  = myClass_IssueProcess.IssueProcessStatus;
                this.textBox_IssueProcessRemark.Text            = myClass_IssueProcess.IssueProcessRemark;
            }
        }
        public void InitControl(Class_KindofEmployerIssue myClass_KindofEmployerIssue, bool bool_Add)
        {
            Class_Data myClass_ShipandShipClassification = (Class_Data)Class_Public.myHashtable[Enum_DataTable.ShipandShipClassification.ToString()];

            myDataView_ShipandShipClassification      = new DataView(myClass_ShipandShipClassification.myDataTable);
            myDataView_ShipandShipClassification.Sort = myClass_ShipandShipClassification.myDataView.Sort;
            Class_DataControlBind.InitializeComboBox(this.comboBox_ShipboardNo, this.myDataView_ShipandShipClassification, "ShipboardNo", "ShipboardNo");

            Class_Public.InitializeComboBox(this.comboBox_Employer, Enum_DataTable.Employer.ToString(), "EmployerHPID", "Employer");
            Class_Public.InitializeComboBox(this.comboBox_ShipClassificationAb, Enum_DataTable.ShipClassification.ToString(), "ShipClassificationAb", "ShipClassificationAb");
            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_KindofEmployerIssue = myClass_KindofEmployerIssue;
            this.textBox_KindofEmployer.Text = this.myClass_KindofEmployerIssue.KindofEmployer;

            Class_KindofEmployer myClass_KindofEmployer = new Class_KindofEmployer(this.myClass_KindofEmployerIssue.KindofEmployer);

            switch (myClass_KindofEmployer.KindofEmployerLevel)
            {
            case 0:
                break;

            case 1:
            case 2:
            case 3:
            case 4:
                this.comboBox_Employer.Enabled = false;
                break;
            }
            if (bool_Add)
            {
                if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerEmployerHPID))
                {
                    this.comboBox_Employer.SelectedValue = myClass_KindofEmployer.KindofEmployerEmployerHPID;
                }
                if (myClass_KindofEmployerIssueDefault != null)
                {
                    this.InitControlWeldingParameter(myClass_KindofEmployerIssueDefault.myClass_WeldingParameter);
                    this.ComboBox_WeldingProcess.SelectedValue = myClass_KindofEmployerIssueDefault.WeldingProcessAb;
                    if (this.comboBox_Employer.Enabled)
                    {
                        this.comboBox_Employer.SelectedValue = myClass_KindofEmployerIssueDefault.EmployerHPID;
                    }
                    this.myClass_KindofEmployerIssue.EmployerHPID    = myClass_KindofEmployerIssueDefault.EmployerHPID;
                    this.comboBox_ShipClassificationAb.SelectedValue = myClass_KindofEmployerIssueDefault.ShipClassificationAb;
                    this.comboBox_ShipboardNo.SelectedValue          = myClass_KindofEmployerIssueDefault.ShipboardNo;
                }
            }
            else
            {
                this.textBox_KindofEmployerIssueID.Text = this.myClass_KindofEmployerIssue.KindofEmployerIssueID.ToString();
                this.MaskedTextBox_IssueNo.Text         = myClass_KindofEmployerIssue.IssueNo;
                this.textBox_WPSNo.Text                          = myClass_KindofEmployerIssue.IssueWPSNo;
                this.TextBox_IssueRemark.Text                    = myClass_KindofEmployerIssue.IssueRemark;
                this.DateTimePicker_SignUpDate.Value             = myClass_KindofEmployerIssue.SignUpDate;
                this.textBox_KindofEmployer.Text                 = myClass_KindofEmployerIssue.KindofEmployer;
                this.comboBox_Employer.SelectedValue             = myClass_KindofEmployerIssue.EmployerHPID;
                this.ComboBox_WeldingProcess.SelectedValue       = myClass_KindofEmployerIssue.WeldingProcessAb;
                this.comboBox_ShipClassificationAb.SelectedValue = this.myClass_KindofEmployerIssue.ShipClassificationAb;
                this.comboBox_ShipboardNo.SelectedValue          = this.myClass_KindofEmployerIssue.ShipboardNo;

                this.InitControlWeldingParameter(this.myClass_KindofEmployerIssue.myClass_WeldingParameter);
            }
        }
Пример #10
0
        public void  InitControl(Class_WPS myClass_WPS, bool bool_Add)
        {
            this.textBox_WPSMaterial.BackColor          = Properties.Settings.Default.textBoxDoubleClickColor;
            this.textBox_WPSMaterialSecond.BackColor    = Properties.Settings.Default.textBoxDoubleClickColor;
            this.textBox_WPSWeldingConsumable.BackColor = Properties.Settings.Default.textBoxDoubleClickColor;
            this.textBox_WPSWeldingEquipment.BackColor  = Properties.Settings.Default.textBoxDoubleClickColor;

            Class_Data myClass_Data          = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Assemblage.ToString()];
            DataView   myDataView_Assemblage = new DataView(myClass_Data.myDataTable);

            myDataView_Assemblage.Sort = myClass_Data.myDataView.Sort;
            Class_DataControlBind.InitializeComboBox(this.comboBox_WPSAssemblage, myDataView_Assemblage, "Assemblage", "Assemblage");
            Class_Public.InitializeComboBox(this.comboBox_WPSJointType, Enum_DataTable.JointType.ToString(), "KindofWeld", "JointType");
            Class_Public.InitializeComboBox(this.comboBox_WPSLayerWelding, Enum_DataTable.LayerWelding.ToString(), "LayerWelding", "LayerWelding");
            Class_Public.InitializeComboBox(this.comboBox_WPSWeldingProcessAb, Enum_DataTable.WeldingProcess.ToString(), "WeldingProcessAb", "WeldingProcessAb");
            Class_Public.InitializeComboBox(this.comboBox_WPSWorkPieceType, Enum_DataTable.WorkPieceType.ToString(), "WorkPieceType", "WorkPieceType");
            Class_Public.InitializeComboBox(this.comboBox_WPSWeldingPosition, Enum_DataTable.WeldingPosition.ToString(), "WeldingPosition", "WeldingPosition");
            Class_Public.InitializeComboBox(this.comboBox_WPSGrooveType, Enum_DataTable.GrooveType.ToString(), "GrooveType", "GrooveType");
            Class_Public.InitializeComboBox(this.comboBox_WPSWorkPieceTypeSecond, Enum_DataTable.WorkPieceType.ToString(), "WorkPieceType", "WorkPieceType");

            this.myClass_WPS = myClass_WPS;
            if (bool_Add)
            {
                this.textBox_WPSID.ReadOnly    = false;
                this.textBox_WPSPrincipal.Text = string.Format("{0}£º{1}", Class_zwjPublic.myClass_CustomUser.Name, Class_zwjPublic.myClass_CustomUser.UserGUID.ToString());
                this.myClass_WPS.WPSPrincipal  = Class_zwjPublic.myClass_CustomUser.UserGUID;
                if (myClass_WPSDefault != null)
                {
                    this.myClass_WPS.WPSMaterial              = myClass_WPSDefault.WPSMaterial;
                    this.myClass_WPS.WPSMaterialSecond        = myClass_WPSDefault.WPSMaterialSecond;
                    this.myClass_WPS.WPSWeldingConsumable     = myClass_WPSDefault.WPSWeldingConsumable;
                    this.myClass_WPS.WPSWeldingEquipment      = myClass_WPSDefault.WPSWeldingEquipment;
                    this.myClass_WPS.WPSMaterialHeterogeneity = myClass_WPSDefault.WPSMaterialHeterogeneity;


                    this.textBox_WPSMaterial.Text = myClass_WPSDefault.WPSMaterial;
                    this.comboBox_WPSWorkPieceType.SelectedValue = myClass_WPSDefault.WPSWorkPieceType;
                    this.textBox_WPSThickness.Text = string.Format("{0}", myClass_WPSDefault.WPSThickness);
                    if (myClass_WPSDefault.WPSExternalDiameter > 0)
                    {
                        this.textBox_WPSExternalDiameter.Text = string.Format("{0}", myClass_WPSDefault.WPSExternalDiameter);
                    }
                    this.checkBox_WPSMaterialHeterogeneity.Checked = this.myClass_WPS.WPSMaterialHeterogeneity;
                    this.textBox_WPSWeldingConsumable.Text         = myClass_WPSDefault.WPSWeldingConsumable;
                    this.textBox_WPSID.Text                         = myClass_WPSDefault.WPSID;
                    this.textBox_WPSDenomination.Text               = myClass_WPSDefault.WPSDenomination;
                    this.textBox_WPSWeldingEquipment.Text           = myClass_WPSDefault.WPSWeldingEquipment;
                    this.comboBox_WPSWeldingPosition.SelectedValue  = myClass_WPSDefault.WPSWeldingPosition;
                    this.comboBox_WPSLayerWelding.SelectedValue     = myClass_WPSDefault.WPSLayerWelding;
                    this.comboBox_WPSWeldingProcessAb.SelectedValue = myClass_WPSDefault.WPSWeldingProcessAb;
                    this.comboBox_WPSGrooveType.SelectedValue       = myClass_WPSDefault.WPSGrooveType;
                    this.textBox_WPSTemperature.Text                = string.Format("{0}", myClass_WPSDefault.WPSTemperature);
                    this.textBox_WPSHumidity.Text                   = string.Format("{0}", myClass_WPSDefault.WPSHumidity);
                    this.comboBox_WPSJointType.Text                 = myClass_WPSDefault.WPSJointType;
                    this.comboBox_WPSAssemblage.SelectedValue       = myClass_WPSDefault.WPSAssemblage;
                    if (myClass_WPSDefault.WPSMaterialHeterogeneity)
                    {
                        this.textBox_WPSMaterialSecond.Text = myClass_WPSDefault.WPSMaterialSecond;
                        this.comboBox_WPSWorkPieceTypeSecond.SelectedValue = myClass_WPSDefault.WPSWorkPieceTypeSecond;
                        this.textBox_WPSThicknessSecond.Text = string.Format("{0}", myClass_WPSDefault.WPSThicknessSecond);
                        if (myClass_WPSDefault.WPSExternalDiameterSecond > 0)
                        {
                            this.textBox_WPSExternalDiameterSecond.Text = string.Format("{0}", myClass_WPSDefault.WPSExternalDiameterSecond);
                        }
                    }
                }
            }
            else
            {
                this.textBox_WPSID.ReadOnly   = true;
                this.textBox_WPSMaterial.Text = myClass_WPS.WPSMaterial;
                this.comboBox_WPSWorkPieceType.SelectedValue = myClass_WPS.WPSWorkPieceType;
                this.textBox_WPSThickness.Text = string.Format("{0}", myClass_WPS.WPSThickness);
                if (myClass_WPS.WPSExternalDiameter > 0)
                {
                    this.textBox_WPSExternalDiameter.Text = string.Format("{0}", myClass_WPS.WPSExternalDiameter);
                }
                this.checkBox_WPSMaterialHeterogeneity.Checked = this.myClass_WPS.WPSMaterialHeterogeneity;
                if (this.myClass_WPS.WPSMaterialHeterogeneity)
                {
                    this.textBox_WPSMaterialSecond.Text = myClass_WPS.WPSMaterialSecond;
                    this.comboBox_WPSWorkPieceTypeSecond.SelectedValue = myClass_WPS.WPSWorkPieceTypeSecond;
                    this.textBox_WPSThicknessSecond.Text = string.Format("{0}", myClass_WPS.WPSThicknessSecond);
                    if (myClass_WPS.WPSExternalDiameterSecond > 0)
                    {
                        this.textBox_WPSExternalDiameterSecond.Text = string.Format("{0}", myClass_WPS.WPSExternalDiameterSecond);
                    }
                }
                this.textBox_WPSWeldingConsumable.Text = myClass_WPS.WPSWeldingConsumable;
                this.textBox_WPSID.Text                         = myClass_WPS.WPSID;
                this.textBox_WPSDenomination.Text               = myClass_WPS.WPSDenomination;
                this.textBox_WPSWeldingEquipment.Text           = myClass_WPS.WPSWeldingEquipment;
                this.textBox_WPSRemark.Text                     = myClass_WPS.WPSRemark;
                this.comboBox_WPSWeldingPosition.SelectedValue  = myClass_WPS.WPSWeldingPosition;
                this.comboBox_WPSLayerWelding.SelectedValue     = myClass_WPS.WPSLayerWelding;
                this.comboBox_WPSWeldingProcessAb.SelectedValue = myClass_WPS.WPSWeldingProcessAb;
                this.comboBox_WPSGrooveType.SelectedValue       = myClass_WPS.WPSGrooveType;
                this.textBox_WPSTemperature.Text                = string.Format("{0}", myClass_WPS.WPSTemperature);
                this.textBox_WPSHumidity.Text                   = string.Format("{0}", myClass_WPS.WPSHumidity);

                this.comboBox_WPSJointType.Text           = myClass_WPS.WPSJointType;
                this.comboBox_WPSAssemblage.SelectedValue = myClass_WPS.WPSAssemblage;

                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                myClass_CustomUser.UserGUID = myClass_WPS.WPSPrincipal;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_WPSPrincipal.Text = string.Format("{0}£º{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
            }
            this.SetMaterialHeterogeneityVisible();
        }
        /// <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 UserControl_GasAndWeldingFluxBase_Load(object sender, EventArgs e)
        {
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTableSecond.GasAndWeldingFluxGroup.ToString()];

            Class_DataControlBind.InitializeComboBox(this.comboBox_GasAndWeldingFluxGroup, myClass_Data.myDataView, "GasAndWeldingFluxGroup", "GasAndWeldingFluxGroup");
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_KindofEmployerWelder"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_KindofEmployerWelder myClass_KindofEmployerWelder, bool bool_Add)
        {
            Class_Data myClass_Data;

            myClass_Data                  = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Employer.ToString()];
            this.myDataView_Employer      = new DataView(myClass_Data.myDataTable);
            this.myDataView_Employer.Sort = myClass_Data.myDataView.Sort;

            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Department.ToString()];
            this.myDataView_Department      = new DataView(myClass_Data.myDataTable);
            this.myDataView_Department.Sort = myClass_Data.myDataView.Sort;

            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WorkPlace.ToString()];
            this.myDataView_WorkPlace      = new DataView(myClass_Data.myDataTable);
            this.myDataView_WorkPlace.Sort = myClass_Data.myDataView.Sort;

            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");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_WorkPlace, this.myDataView_WorkPlace, "WorkPlaceHPID", "WorkPlace");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_Department, this.myDataView_Department, "DepartmentHPID", "Department");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_Employer, this.myDataView_Employer, "EmployerHPID", "Employer");
            Class_Public.InitializeComboBox(this.ComboBox_Schooling, Enum_DataTable.Schooling.ToString(), "Schooling", "Schooling");

            this.myClass_KindofEmployerWelder = myClass_KindofEmployerWelder;
            this.textBox_KindofEmployer.Text  = this.myClass_KindofEmployerWelder.KindofEmployer;

            Class_KindofEmployer myClass_KindofEmployer = new Class_KindofEmployer(this.myClass_KindofEmployerWelder.KindofEmployer);

            switch (myClass_KindofEmployer.KindofEmployerLevel)
            {
            case 0:
                break;

            case 1:
                this.ComboBox_Employer.Enabled = false;
                break;

            case 2:
                this.ComboBox_Employer.Enabled   = false;
                this.ComboBox_Department.Enabled = false;
                this.CheckBox_Department.Enabled = false;
                break;

            case 3:
                this.ComboBox_Employer.Enabled   = false;
                this.ComboBox_Department.Enabled = false;
                this.CheckBox_Department.Enabled = false;
                this.ComboBox_WorkPlace.Enabled  = false;
                this.CheckBox_WorkPlace.Enabled  = false;
                break;

            case 4:
                this.ComboBox_Employer.Enabled         = false;
                this.ComboBox_LaborServiceTeam.Enabled = false;
                this.CheckBox_LaborServiceTeam.Enabled = false;
                break;
            }
            if (bool_Add)
            {
                if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerEmployerHPID))
                {
                    this.ComboBox_Employer.SelectedValue = myClass_KindofEmployer.KindofEmployerEmployerHPID;
                    if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerDepartmentHPID))
                    {
                        this.ComboBox_Department.SelectedValue = myClass_KindofEmployer.KindofEmployerDepartmentHPID;
                        if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerWorkPlaceHPID))
                        {
                            this.ComboBox_WorkPlace.SelectedValue = myClass_KindofEmployer.KindofEmployerWorkPlaceHPID;
                        }
                    }
                    if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerLaborServiceTeamHPID))
                    {
                        this.ComboBox_LaborServiceTeam.SelectedValue = myClass_KindofEmployer.KindofEmployerLaborServiceTeamHPID;
                    }
                }

                if (myClass_KindofEmployerWelderDefault != null)
                {
                    this.CheckBox_Sex.Checked = myClass_KindofEmployerWelderDefault.Sex == "男";
                    this.DateTimePicker_WeldingBeinning.Value  = myClass_KindofEmployerWelderDefault.WeldingBeginning;
                    this.ComboBox_Schooling.SelectedValue      = myClass_KindofEmployerWelderDefault.Schooling;
                    this.ComboBox_Employer.SelectedValue       = myClass_KindofEmployerWelderDefault.myClass_BelongUnit.EmployerHPID;
                    this.myDataView_Department.RowFilter       = string.Format("EmployerHPID='{0}'", myClass_KindofEmployerWelderDefault.myClass_BelongUnit.EmployerHPID);
                    this.myDataView_LaborServiceTeam.RowFilter = string.Format("EmployerHPID='{0}'", myClass_KindofEmployerWelderDefault.myClass_BelongUnit.EmployerHPID);
                    if (string.IsNullOrEmpty(myClass_KindofEmployerWelderDefault.myClass_BelongUnit.DepartmentHPID))
                    {
                        this.CheckBox_Department.Checked = false;
                    }
                    else
                    {
                        this.ComboBox_Department.SelectedValue = myClass_KindofEmployerWelderDefault.myClass_BelongUnit.DepartmentHPID;
                        this.CheckBox_Department.Checked       = true;
                        this.myDataView_WorkPlace.RowFilter    = string.Format("DepartmentHPID='{0}'", myClass_KindofEmployerWelderDefault.myClass_BelongUnit.DepartmentHPID);
                        if (!string.IsNullOrEmpty(myClass_KindofEmployerWelderDefault.myClass_BelongUnit.WorkPlaceHPID))
                        {
                            this.ComboBox_WorkPlace.SelectedValue = myClass_KindofEmployerWelderDefault.myClass_BelongUnit.WorkPlaceHPID;
                            this.CheckBox_WorkPlace.Checked       = true;
                        }
                        else
                        {
                            this.CheckBox_WorkPlace.Checked = false;
                        }
                    }

                    if (string.IsNullOrEmpty(myClass_KindofEmployerWelderDefault.myClass_BelongUnit.LaborServiceTeamHPID))
                    {
                        this.CheckBox_LaborServiceTeam.Checked = false;
                    }
                    else
                    {
                        this.ComboBox_LaborServiceTeam.SelectedValue = myClass_KindofEmployerWelderDefault.myClass_BelongUnit.LaborServiceTeamHPID;
                        this.CheckBox_LaborServiceTeam.Checked       = true;
                    }
                }
            }
            else
            {
                this.textBox_KindofEmployerWelderID.Text      = this.myClass_KindofEmployerWelder.KindofEmployerWelderID.ToString();
                this.Button_IdentificationCardConvert.Enabled = false;
                this.MaskedTextBox_IdentificationCard.Text    = myClass_KindofEmployerWelder.IdentificationCard;
                this.TextBox_WelderName.Text               = myClass_KindofEmployerWelder.WelderName;
                this.textBox_WelderEnglishName.Text        = myClass_KindofEmployerWelder.WelderEnglishName;
                this.CheckBox_Sex.Checked                  = myClass_KindofEmployerWelder.Sex == "男";
                this.DateTimePicker_WeldingBeinning.Value  = myClass_KindofEmployerWelder.WeldingBeginning;
                this.TextBox_WorkerID.Text                 = myClass_KindofEmployerWelder.myClass_BelongUnit.WorkerID;
                this.TextBox_WelderRemark.Text             = myClass_KindofEmployerWelder.WelderRemark;
                this.ComboBox_Schooling.SelectedValue      = myClass_KindofEmployerWelder.Schooling;
                this.ComboBox_Employer.SelectedValue       = myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID;
                this.myDataView_Department.RowFilter       = string.Format("EmployerHPID='{0}'", myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID);
                this.myDataView_LaborServiceTeam.RowFilter = string.Format("EmployerHPID='{0}'", myClass_KindofEmployerWelder.myClass_BelongUnit.EmployerHPID);
                if (string.IsNullOrEmpty(myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID))
                {
                    this.CheckBox_Department.Checked = false;
                }
                else
                {
                    this.ComboBox_Department.SelectedValue = myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID;
                    this.CheckBox_Department.Checked       = true;
                    this.myDataView_WorkPlace.RowFilter    = string.Format("DepartmentHPID='{0}'", myClass_KindofEmployerWelder.myClass_BelongUnit.DepartmentHPID);
                    if (!string.IsNullOrEmpty(myClass_KindofEmployerWelder.myClass_BelongUnit.WorkPlaceHPID))
                    {
                        this.ComboBox_WorkPlace.SelectedValue = myClass_KindofEmployerWelder.myClass_BelongUnit.WorkPlaceHPID;
                        this.CheckBox_WorkPlace.Checked       = true;
                    }
                    else
                    {
                        this.CheckBox_WorkPlace.Checked = false;
                    }
                }

                if (string.IsNullOrEmpty(myClass_KindofEmployerWelder.myClass_BelongUnit.LaborServiceTeamHPID))
                {
                    this.CheckBox_LaborServiceTeam.Checked = false;
                }
                else
                {
                    this.ComboBox_LaborServiceTeam.SelectedValue = myClass_KindofEmployerWelder.myClass_BelongUnit.LaborServiceTeamHPID;
                    this.CheckBox_LaborServiceTeam.Checked       = true;
                }
            }
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_WeldingSubject"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_WeldingSubject myClass_WeldingSubject, bool bool_Add)
        {
            DataView myDataView_WeldingStandard = new DataView(((Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingStandardAndGroup.ToString()]).myDataTable);

            myDataView_WeldingStandard.RowFilter = "WeldingStandardGroup='焊工考试标准'";
            Class_DataControlBind.InitializeComboBox(this.ComboBox_WeldingStandard, myDataView_WeldingStandard, "WeldingStandard", "WeldingStandard");
            Class_Public.InitializeComboBox(this.ComboBox_JointType, Enum_DataTable.JointType.ToString(), "JointType", "JointType");
            Class_Public.InitializeComboBox(this.ComboBox_WorkPieceType, Enum_DataTable.WorkPieceType.ToString(), "WorkPieceType", "WorkPieceType");
            this.ComboBox_SubjectClass.Text = "0";

            this.myClass_WeldingSubject = myClass_WeldingSubject;
            if (bool_Add)
            {
                if (myClass_WeldingSubjectDefault != null)
                {
                    this.MaskedTextBox_SubjectID.Text           = myClass_WeldingSubjectDefault.SubjectID;
                    this.ComboBox_WeldingStandard.SelectedValue = myClass_WeldingSubjectDefault.WeldingStandard;
                    this.ComboBox_JointType.SelectedValue       = myClass_WeldingSubjectDefault.JointType;
                    this.ComboBox_WorkPieceType.SelectedValue   = myClass_WeldingSubjectDefault.WorkPieceType;
                    this.TextBox_WeldingProject.Text            = myClass_WeldingSubjectDefault.WeldingProject;
                    this.TextBox_WeldingProjectAb.Text          = myClass_WeldingSubjectDefault.WeldingProjectAb;
                    this.TextBox_ScopeofWeldingProject.Text     = myClass_WeldingSubjectDefault.ScopeofWeldingProject;
                    this.TextBox_WeldingClass.Text            = myClass_WeldingSubjectDefault.WeldingClass;
                    this.TextBox_WeldingClassAb.Text          = myClass_WeldingSubjectDefault.WeldingClassAb;
                    this.TextBox_ScopeofWeldingClass.Text     = myClass_WeldingSubjectDefault.ScopeofWeldingClass;
                    this.ComboBox_SubjectClass.Text           = myClass_WeldingSubjectDefault.SubjectClass.ToString();
                    this.TextBox_Subject.Text                 = myClass_WeldingSubjectDefault.Subject;
                    this.TextBox_ScopeofSubject.Text          = myClass_WeldingSubjectDefault.ScopeofSubject;
                    this.TextBox_SubjectThickness.Text        = myClass_WeldingSubjectDefault.SubjectThickness;
                    this.TextBox_SubjectExternalDiameter.Text = myClass_WeldingSubjectDefault.SubjectExternalDiameter;
                    this.textBox_HardestWeldingPosition.Text  = myClass_WeldingSubjectDefault.HardestWeldingPosition;
                }
                if (!string.IsNullOrEmpty(myClass_WeldingSubject.WeldingStandard))
                {
                    this.ComboBox_WeldingStandard.SelectedValue = myClass_WeldingSubject.WeldingStandard;
                }
            }
            else
            {
                this.MaskedTextBox_SubjectID.ReadOnly       = true;
                this.MaskedTextBox_SubjectID.Text           = this.myClass_WeldingSubject.SubjectID;
                this.checkBox_NeedPreSubject.Checked        = this.myClass_WeldingSubject.NeedPreSubject;
                this.ComboBox_WeldingStandard.SelectedValue = this.myClass_WeldingSubject.WeldingStandard;
                this.ComboBox_JointType.SelectedValue       = this.myClass_WeldingSubject.JointType;
                this.ComboBox_WorkPieceType.SelectedValue   = this.myClass_WeldingSubject.WorkPieceType;
                this.TextBox_WeldingProject.Text            = this.myClass_WeldingSubject.WeldingProject;
                this.TextBox_WeldingProjectAb.Text          = this.myClass_WeldingSubject.WeldingProjectAb;
                this.TextBox_ScopeofWeldingProject.Text     = this.myClass_WeldingSubject.ScopeofWeldingProject;
                this.TextBox_WeldingClass.Text            = this.myClass_WeldingSubject.WeldingClass;
                this.TextBox_WeldingClassAb.Text          = this.myClass_WeldingSubject.WeldingClassAb;
                this.TextBox_ScopeofWeldingClass.Text     = this.myClass_WeldingSubject.ScopeofWeldingClass;
                this.ComboBox_SubjectClass.Text           = this.myClass_WeldingSubject.SubjectClass.ToString();
                this.TextBox_Subject.Text                 = this.myClass_WeldingSubject.Subject;
                this.TextBox_ScopeofSubject.Text          = this.myClass_WeldingSubject.ScopeofSubject;
                this.TextBox_SubjectThickness.Text        = this.myClass_WeldingSubject.SubjectThickness;
                this.TextBox_SubjectExternalDiameter.Text = this.myClass_WeldingSubject.SubjectExternalDiameter;
                this.TextBox_SubjectRemark.Text           = this.myClass_WeldingSubject.SubjectRemark;
                this.textBox_CCSSubject.Text              = this.myClass_WeldingSubject.CCSSubject;
                this.textBox_CCSSubjectTestNo.Text        = this.myClass_WeldingSubject.CCSSubjectTestNo;
                this.textBox_HardestWeldingPosition.Text  = this.myClass_WeldingSubject.HardestWeldingPosition;
            }
        }
Пример #15
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myKindofEmployer"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_KindofEmployer myClass_KindofEmployer, bool bool_Add)
        {
            Class_Data myClass_Data;

            myClass_Data                  = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Employer.ToString()];
            this.myDataView_Employer      = new DataView(myClass_Data.myDataTable);
            this.myDataView_Employer.Sort = myClass_Data.myDataView.Sort;

            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Department.ToString()];
            this.myDataView_Department      = new DataView(myClass_Data.myDataTable);
            this.myDataView_Department.Sort = myClass_Data.myDataView.Sort;

            myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WorkPlace.ToString()];
            this.myDataView_WorkPlace      = new DataView(myClass_Data.myDataTable);
            this.myDataView_WorkPlace.Sort = myClass_Data.myDataView.Sort;

            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");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_WorkPlace, this.myDataView_WorkPlace, "WorkPlaceHPID", "WorkPlace");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_Department, this.myDataView_Department, "DepartmentHPID", "Department");
            Class_DataControlBind.InitializeComboBox(this.ComboBox_Employer, this.myDataView_Employer, "EmployerHPID", "Employer");

            this.myClass_KindofEmployer = myClass_KindofEmployer;
            if (bool_Add)
            {
                if (myClass_KindofEmployerDefault != null)
                {
                    this.TextBox_KindofEmployer.Text = myClass_KindofEmployerDefault.KindofEmployer;
                }
            }
            else
            {
                this.TextBox_KindofEmployer.ReadOnly = true;
                this.TextBox_KindofEmployer.Text     = myClass_KindofEmployer.KindofEmployer;
                Class_CustomUser myClass_CustomUser = new Class_CustomUser();
                myClass_CustomUser.UserGUID = this.myClass_KindofEmployer.KindofEmployerManagerID;
                if (myClass_CustomUser.FillData())
                {
                    this.textBox_KindofEmployerManager.Text = string.Format("{0}:{1}", myClass_CustomUser.Name, myClass_CustomUser.UserGUID.ToString());
                }
                if (myClass_KindofEmployer.KindofEmployerLevel >= this.NumericUpDown_KindofEmployerLevel.Minimum && myClass_KindofEmployer.KindofEmployerLevel <= this.NumericUpDown_KindofEmployerLevel.Maximum)
                {
                    this.NumericUpDown_KindofEmployerLevel.Value = myClass_KindofEmployer.KindofEmployerLevel;
                }
                this.ComboBox_Employer.SelectedValue       = myClass_KindofEmployer.KindofEmployerEmployerHPID;
                this.myDataView_Department.RowFilter       = string.Format("EmployerHPID='{0}'", myClass_KindofEmployer.KindofEmployerEmployerHPID);
                this.myDataView_LaborServiceTeam.RowFilter = string.Format("EmployerHPID='{0}'", myClass_KindofEmployer.KindofEmployerEmployerHPID);
                if (string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerDepartmentHPID))
                {
                    this.CheckBox_Department.Checked = false;
                    this.CheckBox_WorkPlace.Checked  = false;
                }
                else
                {
                    this.ComboBox_Department.SelectedValue = myClass_KindofEmployer.KindofEmployerDepartmentHPID;
                    this.CheckBox_Department.Checked       = true;
                    this.myDataView_WorkPlace.RowFilter    = string.Format("DepartmentHPID='{0}'", myClass_KindofEmployer.KindofEmployerDepartmentHPID);
                    if (!string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerWorkPlaceHPID))
                    {
                        this.ComboBox_WorkPlace.SelectedValue = myClass_KindofEmployer.KindofEmployerWorkPlaceHPID;
                        this.CheckBox_WorkPlace.Checked       = true;
                    }
                    else
                    {
                        this.CheckBox_WorkPlace.Checked = false;
                    }
                }

                if (string.IsNullOrEmpty(myClass_KindofEmployer.KindofEmployerLaborServiceTeamHPID))
                {
                    this.CheckBox_LaborServiceTeam.Checked = false;
                }
                else
                {
                    this.ComboBox_LaborServiceTeam.SelectedValue = myClass_KindofEmployer.KindofEmployerLaborServiceTeamHPID;
                    this.CheckBox_LaborServiceTeam.Checked       = true;
                }
                this.checkBox_CanUpLoadWelderPicture.Checked = myClass_KindofEmployer.CanUpLoadWelderPicture;
                this.checkBox_CanModifyWelderPicture.Checked = myClass_KindofEmployer.CanModifyWelderPicture;
                this.checkBox_CanDeleteWelderPicture.Checked = myClass_KindofEmployer.CanDeleteWelderPicture;
                this.numericUpDown_KindofEmployerIndex.Value = this.myClass_KindofEmployer.KindofEmployerIndex;
                this.TextBox_KindofEmployerRemark.Text       = myClass_KindofEmployer.KindofEmployerRemark;

                this.textBox_EmployerTel.Text    = myClass_KindofEmployer.KindofEmployerTel;
                this.textBox_EmployerFax.Text    = myClass_KindofEmployer.KindofEmployerFax;
                this.textBox_EmployerMobile.Text = myClass_KindofEmployer.KindofEmployerMobile;
                this.textBox_EmployerEmail.Text  = myClass_KindofEmployer.KindofEmployerEmail;
            }
        }
Пример #16
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="myClass_ShipClassification"></param>
        /// <param name="bool_Add"></param>
        public void InitControl(Class_ShipClassification myClass_ShipClassification, bool bool_Add)
        {
            Class_Public.InitializeComboBox(this.ComboBox_TestCommitteeID, Enum_DataTable.TestCommittee.ToString(), "TestCommitteeID", "TestCommitteeID");
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingStandardAndGroup.ToString()];
            DataView   myDataView_WeldingStandardAndGroup = new DataView(myClass_Data.myDataTable);

            myDataView_WeldingStandardAndGroup.RowFilter = "WeldingStandardGroup='焊工考试标准'";
            Class_DataControlBind.InitializeComboBox(this.ComboBox_WeldingStandard, myDataView_WeldingStandardAndGroup, "WeldingStandard", "WeldingStandard");
            this.myClass_ShipClassification = myClass_ShipClassification;
            if (bool_Add)
            {
                if (myClass_ShipClassificationDefault != null)
                {
                    this.CheckBox_WeldingStandardRestrict.Checked = myClass_ShipClassificationDefault.WeldingStandardRestrict;
                    this.checkBox_YearSeparate.Checked            = myClass_ShipClassificationDefault.YearSeparate;
                    this.CheckBox_ShipRestrict.Checked            = myClass_ShipClassificationDefault.ShipRestrict;
                    this.CheckBox_TheorySeparate.Checked          = myClass_ShipClassificationDefault.TheorySeparate;
                    this.checkBox_ProlongQCContinuous.Checked     = myClass_ShipClassificationDefault.ProlongQCContinuous;
                    this.ComboBox_WeldingStandard.SelectedValue   = myClass_ShipClassificationDefault.WeldingStandard;
                    this.MaskedTextBox_NextIssueNo.Text           = myClass_ShipClassificationDefault.NextIssueNo;
                    this.MaskedTextBox_NextExaminingNo.Text       = myClass_ShipClassificationDefault.NextExaminingNo;
                    this.MaskedTextBox_NextCertificateNo.Text     = myClass_ShipClassificationDefault.NextCertificateNo;
                    if (myClass_ShipClassificationDefault.IssueNoSignificantDigit >= this.NumericUpDown_IssueNoSignificantDigit.Minimum && myClass_ShipClassificationDefault.IssueNoSignificantDigit <= this.NumericUpDown_IssueNoSignificantDigit.Maximum)
                    {
                        this.NumericUpDown_IssueNoSignificantDigit.Value = myClass_ShipClassificationDefault.IssueNoSignificantDigit;
                    }
                    if (myClass_ShipClassificationDefault.ExaminingNoSignificantDigit >= this.NumericUpDown_ExaminingNoSignificantDigit.Minimum && myClass_ShipClassificationDefault.ExaminingNoSignificantDigit <= this.NumericUpDown_ExaminingNoSignificantDigit.Maximum)
                    {
                        this.NumericUpDown_ExaminingNoSignificantDigit.Value = myClass_ShipClassificationDefault.ExaminingNoSignificantDigit;
                    }
                    if (myClass_ShipClassificationDefault.CertificateNoSignificantDigit >= this.NumericUpDown_CertificateNoSignificantDigit.Minimum && myClass_ShipClassificationDefault.CertificateNoSignificantDigit <= this.NumericUpDown_CertificateNoSignificantDigit.Maximum)
                    {
                        this.NumericUpDown_CertificateNoSignificantDigit.Value = myClass_ShipClassificationDefault.CertificateNoSignificantDigit;
                    }
                    this.TextBox_IssueNoRegex.Text              = myClass_ShipClassificationDefault.IssueNoRegex;
                    this.TextBox_ExaminingNoRegex.Text          = myClass_ShipClassificationDefault.ExaminingNoRegex;
                    this.TextBox_CertificateNoRegex.Text        = myClass_ShipClassificationDefault.CertificateNoRegex;
                    this.ComboBox_TestCommitteeID.SelectedValue = myClass_ShipClassificationDefault.TestCommitteeID;
                    if (myClass_ShipClassificationDefault.YearBegin >= this.numericUpDown_YearBegin.Minimum && myClass_ShipClassificationDefault.YearBegin <= this.numericUpDown_YearBegin.Maximum)
                    {
                        this.numericUpDown_YearBegin.Value = myClass_ShipClassificationDefault.YearBegin;
                    }
                    if (myClass_ShipClassificationDefault.YearEnd >= this.numericUpDown_YearEnd.Minimum && myClass_ShipClassificationDefault.YearEnd <= this.numericUpDown_YearEnd.Maximum)
                    {
                        this.numericUpDown_YearEnd.Value = myClass_ShipClassificationDefault.YearEnd;
                    }
                }
            }
            else
            {
                this.TextBox_ShipClassificationAb.ReadOnly = true;
                this.TextBox_ShipClassificationAb.Text     = this.myClass_ShipClassification.ShipClassificationAb;
                this.TextBox_ShipClassification.Text       = this.myClass_ShipClassification.ShipClassification;
                if (myClass_ShipClassification.ShipClassificationIndex >= this.numericUpDown_ShipClassificationIndex.Minimum && myClass_ShipClassification.ShipClassificationIndex <= this.numericUpDown_ShipClassificationIndex.Maximum)
                {
                    this.numericUpDown_ShipClassificationIndex.Value = this.myClass_ShipClassification.ShipClassificationIndex;
                }
                this.TextBox_ShipClassificationEnglishName.Text = this.myClass_ShipClassification.ShipClassificationEnglishName;
                this.TextBox_ShipClassificationRemark.Text      = this.myClass_ShipClassification.ShipClassificationRemark;

                this.CheckBox_WeldingStandardRestrict.Checked = this.myClass_ShipClassification.WeldingStandardRestrict;
                this.checkBox_YearSeparate.Checked            = this.myClass_ShipClassification.YearSeparate;
                this.CheckBox_ShipRestrict.Checked            = this.myClass_ShipClassification.ShipRestrict;
                this.CheckBox_TheorySeparate.Checked          = this.myClass_ShipClassification.TheorySeparate;
                this.checkBox_ProlongQCContinuous.Checked     = this.myClass_ShipClassification.ProlongQCContinuous;
                this.ComboBox_WeldingStandard.SelectedValue   = this.myClass_ShipClassification.WeldingStandard;
                this.MaskedTextBox_NextIssueNo.Text           = this.myClass_ShipClassification.NextIssueNo;
                this.MaskedTextBox_NextExaminingNo.Text       = this.myClass_ShipClassification.NextExaminingNo;
                this.MaskedTextBox_NextCertificateNo.Text     = this.myClass_ShipClassification.NextCertificateNo;
                if (myClass_ShipClassification.IssueNoSignificantDigit >= this.NumericUpDown_IssueNoSignificantDigit.Minimum && myClass_ShipClassification.IssueNoSignificantDigit <= this.NumericUpDown_IssueNoSignificantDigit.Maximum)
                {
                    this.NumericUpDown_IssueNoSignificantDigit.Value = myClass_ShipClassification.IssueNoSignificantDigit;
                }
                if (myClass_ShipClassification.ExaminingNoSignificantDigit >= this.NumericUpDown_ExaminingNoSignificantDigit.Minimum && myClass_ShipClassification.ExaminingNoSignificantDigit <= this.NumericUpDown_ExaminingNoSignificantDigit.Maximum)
                {
                    this.NumericUpDown_ExaminingNoSignificantDigit.Value = myClass_ShipClassification.ExaminingNoSignificantDigit;
                }
                if (myClass_ShipClassification.CertificateNoSignificantDigit >= this.NumericUpDown_CertificateNoSignificantDigit.Minimum && myClass_ShipClassification.CertificateNoSignificantDigit <= this.NumericUpDown_CertificateNoSignificantDigit.Maximum)
                {
                    this.NumericUpDown_CertificateNoSignificantDigit.Value = myClass_ShipClassification.CertificateNoSignificantDigit;
                }
                this.TextBox_IssueNoRegex.Text              = this.myClass_ShipClassification.IssueNoRegex;
                this.TextBox_ExaminingNoRegex.Text          = this.myClass_ShipClassification.ExaminingNoRegex;
                this.TextBox_CertificateNoRegex.Text        = this.myClass_ShipClassification.CertificateNoRegex;
                this.ComboBox_TestCommitteeID.SelectedValue = this.myClass_ShipClassification.TestCommitteeID;

                if (myClass_ShipClassification.YearBegin >= this.numericUpDown_YearBegin.Minimum && myClass_ShipClassification.YearBegin <= this.numericUpDown_YearBegin.Maximum)
                {
                    this.numericUpDown_YearBegin.Value = this.myClass_ShipClassification.YearBegin;
                }
                if (myClass_ShipClassification.YearEnd >= this.numericUpDown_YearEnd.Minimum && myClass_ShipClassification.YearEnd <= this.numericUpDown_YearEnd.Maximum)
                {
                    this.numericUpDown_YearEnd.Value = this.myClass_ShipClassification.YearEnd;
                }
            }
        }