private void Form_WeldingConsumableISOGroupQuery_Load(object sender, EventArgs e) { Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.WeldingConsumableISOGroup.ToString(), false); Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingConsumableISOGroup.ToString()]; this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable); ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort; if (this.myClass_WeldingConsumableISOGroup.WeldingConsumableISOGroupAb != null) { Class_DataControlBind.SetDataGridViewSelectedPosition("WeldingConsumableISOGroupAb", this.myClass_WeldingConsumableISOGroup.WeldingConsumableISOGroupAb, this.dataGridView_Query); } }
private void Form_KindofEmployerQuery_Load(object sender, EventArgs e) { Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.KindofEmployer.ToString(), false); Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.KindofEmployer.ToString()]; this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable); ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort; if (this.myClass_KindofEmployer.KindofEmployer != null) { Class_DataControlBind.SetDataGridViewSelectedPosition("KindofEmployer", this.myClass_KindofEmployer.KindofEmployer, this.dataGridView_Query); } }
private void toolStripMenuItem_WPSRowAdd_Click(object sender, EventArgs e) { Form_WPSUpdate myForm = new Form_WPSUpdate(); myForm.myClass_WPS = new Class_WPS(); myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(false); Class_DataControlBind.SetDataGridViewSelectedPosition("WPSID", myForm.myClass_WPS.WPSID, this.dataGridView_Data); } }
private void Form_MaterialQuery_Load(object sender, EventArgs e) { Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.Material.ToString(), false); Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Material.ToString()]; this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable); ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort; if (this.myClass_Material.Material != null) { //object[] object_SortValue = new object[1] { this.myClass_Material.Material }; //Class_Public.myclass_DataControlBind.SetDataGridViewSelectedPosition("Material", object_SortValue, this.dataGridView_Query); Class_DataControlBind.SetDataGridViewSelectedPosition("Material", this.myClass_Material.Material, this.dataGridView_Query); } }
private void Form_ShipClassificationQuery_Load(object sender, EventArgs e) { Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.ShipClassification.ToString(), false); Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.ShipClassification.ToString()]; this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable); ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort; if (!string.IsNullOrEmpty(this.myClass_ShipClassification.ShipClassificationAb)) { //object[] object_SortValue = new object[1] { this.myClass_ShipClassification.ShipClassificationAb }; //Class_Public.myclass_DataControlBind.SetDataGridViewSelectedPosition("ShipClassificationAb", object_SortValue, this.dataGridView_Query); Class_DataControlBind.SetDataGridViewSelectedPosition("ShipClassificationAb", this.myClass_ShipClassification.ShipClassificationAb, this.dataGridView_Query); } }
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); } }
/// <summary> /// 添加数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { if (this.myEventArgs_ReviveQC == null) { return; } Form_ReviveQC_Update myForm = new Form_ReviveQC_Update(); myForm.myClass_ReviveQC = new Class_ReviveQC(); myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(false); Class_DataControlBind.SetDataGridViewSelectedPosition("ReviveQCID", myForm.myClass_ReviveQC.ReviveQCID.ToString(), this.dataGridView_Data); } }
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); } }
/// <summary> /// 添加数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { if (this.myEventArgs_KindofEmployer == null) { return; } Form_KindofEmployerIssue_Update myForm = new Form_KindofEmployerIssue_Update(); myForm.myClass_KindofEmployerIssue = new Class_KindofEmployerIssue(); myForm.myClass_KindofEmployerIssue.KindofEmployer = this.myEventArgs_KindofEmployer.str_KindofEmployer; myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(true); Class_DataControlBind.SetDataGridViewSelectedPosition("KindofEmployerIssueID", myForm.myClass_KindofEmployerIssue.KindofEmployerIssueID.ToString(), this.dataGridView_Data); } }
/// <summary> /// 添加数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { if (this.myEventArgs_WeldingStandard == null) { return; } Form_WeldingSubject_Update myForm = new Form_WeldingSubject_Update(); myForm.myClass_WeldingSubject = new Class_WeldingSubject(); myForm.bool_Add = true; myForm.myClass_WeldingSubject.WeldingStandard = this.myEventArgs_WeldingStandard.str_WeldingStandard; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(false); Class_DataControlBind.SetDataGridViewSelectedPosition("SubjectID", myForm.myClass_WeldingSubject.SubjectID, this.dataGridView_Data); } }
private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { Class_ShipClassification myClass_ShipClassification; if (string.IsNullOrEmpty(this.myEventArgs_ShipClassification.str_ShipClassificationAb)) { MessageBox.Show("请先选择船级社!"); return; } else { myClass_ShipClassification = new Class_ShipClassification(this.myEventArgs_ShipClassification.str_ShipClassificationAb); if (myClass_ShipClassification.ShipRestrict && string.IsNullOrEmpty(this.myEventArgs_ShipClassification.str_ShipboardNo)) { MessageBox.Show("请先选择船号!"); return; } } if (this.myEventArgs_ShipClassification.bool_GXTheory) { Form_GXTheoryIssue_Update myForm = new Form_GXTheoryIssue_Update(); myForm.myClass_GXTheoryIssue = new Class_GXTheoryIssue(); myForm.bool_Add = true; myForm.myClass_GXTheoryIssue.ShipClassificationAb = this.myEventArgs_ShipClassification.str_ShipClassificationAb; myForm.myClass_GXTheoryIssue.ShipboardNo = this.myEventArgs_ShipClassification.str_ShipboardNo; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(true); Class_DataControlBind.SetDataGridViewSelectedPosition("IssueNo", myForm.myClass_GXTheoryIssue.IssueNo, this.dataGridView_Data); } } else { Form_Issue_Update myForm = new Form_Issue_Update(); myForm.myClass_Issue = new Class_Issue(); myForm.bool_Add = true; myForm.myClass_Issue.ShipClassificationAb = this.myEventArgs_ShipClassification.str_ShipClassificationAb; myForm.myClass_Issue.ShipboardNo = this.myEventArgs_ShipClassification.str_ShipboardNo; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(true); Class_DataControlBind.SetDataGridViewSelectedPosition("IssueNo", myForm.myClass_Issue.IssueNo, this.dataGridView_Data); } } }
/// <summary> /// 添加数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { if (this.myEventArgs_Issue == null || string.IsNullOrEmpty(this.myEventArgs_Issue.str_IssueNo) || this.treeView_IssueProcess.SelectedNode == null || this.treeView_IssueProcess.SelectedNode.Level == 0) { MessageBox.Show("不能添加,请确认是否选择某一个班级或班级进程类别!"); return; } Form_IssueProcess_Update myForm = new Form_IssueProcess_Update(); myForm.myClass_IssueProcess = new Class_IssueProcess(); myForm.myClass_IssueProcess.IssueNo = this.myEventArgs_Issue.str_IssueNo; myForm.myClass_IssueProcess.GXTheory = this.myEventArgs_Issue.bool_GXTheory; myForm.str_ProcessStatusGroup = this.treeView_IssueProcess.SelectedNode.Tag.ToString(); myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(true); Class_DataControlBind.SetDataGridViewSelectedPosition("IssueProcessID", myForm.myClass_IssueProcess.IssueProcessID.ToString(), this.dataGridView_Data); } }
private void Form_Issue_Query_Load(object sender, EventArgs e) { Class_Public.InitializeComboBox(this.comboBox_KindofEmployer, Enum_DataTable.KindofEmployer.ToString(), "KindofEmployer", "KindofEmployer"); Class_Public.InitializeComboBox(this.comboBox_ShipClassificationAb, Enum_DataTable.ShipClassification.ToString(), "ShipClassificationAb", "ShipClassificationAb"); Class_Public.InitializeComboBox(this.comboBox_ShipboardNo, Enum_DataTable.Ship.ToString(), "ShipboardNo", "ShipboardNo"); this.comboBox_KindofEmployer.Text = ""; this.comboBox_ShipboardNo.Text = ""; this.comboBox_ShipClassificationAb.Text = ""; Class_DataControlBind.InitializeDataGridView(this.dataGridView_Query, Enum_DataTable.Issue.ToString(), false); Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.Issue.ToString()]; myClass_Data.SetFilter("1=1"); myClass_Data.RefreshData(false); this.dataGridView_Query.DataSource = new DataView(myClass_Data.myDataTable.Copy()); ((DataView)this.dataGridView_Query.DataSource).Sort = myClass_Data.myDataView.Sort; if (this.myClass_Issue.IssueNo != null) { Class_DataControlBind.SetDataGridViewSelectedPosition("IssueNo", this.myClass_Issue.IssueNo, this.dataGridView_Query); } }
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); } }
/// <summary> /// 添加数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripMenuItem_DataGridViewRowAdd_Click(object sender, EventArgs e) { if (this.myEventArgs_Unit == null || (string.IsNullOrEmpty(this.myEventArgs_Unit.EmployerHPID) && string.IsNullOrEmpty(this.myEventArgs_Unit.DepartmentHPID) && string.IsNullOrEmpty(this.myEventArgs_Unit.WorkPlaceHPID))) { MessageBox.Show("请选择单位!"); return; } Form_WelderBelong_Update myForm = new Form_WelderBelong_Update(); myForm.myClass_WelderBelong = new Class_WelderBelong(); myForm.myClass_WelderBelong.myClass_BelongUnit.EmployerHPID = this.myEventArgs_Unit.EmployerHPID; myForm.myClass_WelderBelong.myClass_BelongUnit.DepartmentHPID = this.myEventArgs_Unit.DepartmentHPID; myForm.myClass_WelderBelong.myClass_BelongUnit.WorkPlaceHPID = this.myEventArgs_Unit.WorkPlaceHPID; myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WelderBelong.ToString()]; this.dataGridView_Data.DataSource = null; myClass_Data.RefreshData(false, this.myDataTable); this.dataGridView_Data.DataSource = this.myDataView; this.RefreshData(false); Class_DataControlBind.SetDataGridViewSelectedPosition("WelderBelongID", myForm.myClass_WelderBelong.WelderBelongID.ToString(), this.dataGridView_Data); } }