private void button_OnOK_Click(object sender, EventArgs e) { this.userControl_WPSBase1.FillClass(); String str_ErrMessage; str_ErrMessage = myClass_WPS.CheckField(); if (str_ErrMessage != null) { this.DialogResult = DialogResult.None; this.label_ErrMessage.Text = str_ErrMessage; return; } if (this.bool_Add) { if (Class_WPS.ExistAndCanDeleteAndDelete(this.myClass_WPS.WPSID, ZCCL.ClassBase.Enum_zwjKindofUpdate.Exist) == false) { this.myClass_WPS.AddAndModify(ZCCL.ClassBase.Enum_zwjKindofUpdate.Add); } else { this.label_ErrMessage.Text = "该焊接工艺编号已添加!"; this.DialogResult = DialogResult.None; return; } } else { this.myClass_WPS.AddAndModify(ZCCL.ClassBase.Enum_zwjKindofUpdate.Modify); } this.DialogResult = DialogResult.OK; this.Close(); }
private void Button_WPSIDModify_Click(object sender, EventArgs e) { string str_NewWPSID = ""; Form_InputBox myForm = new Form_InputBox(); myForm.str_DefaultResponse = this.myClass_WPS.WPSID; myForm.str_Prompt = "请输入焊接工艺编号:"; myForm.str_Title = "输入焊接工艺编号"; if (myForm.ShowDialog() == DialogResult.OK) { str_NewWPSID = myForm.str_DefaultResponse; } if (str_NewWPSID.Length == 0) { MessageBox.Show("你没有输入焊接工艺编号,操作失败!"); return; } if (Class_WPS.ExistAndCanDeleteAndDelete(str_NewWPSID, ZCCL.ClassBase.Enum_zwjKindofUpdate.Exist) == true) { MessageBox.Show("焊接工艺编号重复,操作失败!"); return; } this.myClass_WPS.ModifyWPSID(str_NewWPSID); if (this.myEventArgs_WPSQuery != null) { this.myEventArgs_WPSQuery.bool_JustFill = false; Publisher_WPSQuery.OnEventName(this.myEventArgs_WPSQuery); } this.userControl_WPSBase1.InitControl(this.myClass_WPS, false); }
private void contextMenuStrip_WPSHeatTreatmentRow_Opening(object sender, CancelEventArgs e) { Class_WPS myClass_WPS = new Class_WPS(this.myEventArgs_WPS.str_WPSID); e.Cancel = myClass_WPS.WPSStatus < 0 || (!(Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Modify) || (Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.PossessorModify) && (new Class_WPS(this.myEventArgs_WPS.str_WPSID)).WPSPrincipal.Equals(Class_zwjPublic.myClass_CustomUser.UserGUID)))); this.toolStripMenuItem_DataGridViewRowExport.Enabled = Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Print); }
public void InitControl(Class_WPSWeldingSequence myClass_WPSWeldingSequence, bool bool_Add) { this.myClass_WPSWeldingSequence = myClass_WPSWeldingSequence; this.textBox_WPSID.Text = myClass_WPSWeldingSequence.WPSID; if (bool_Add == false) { this.textBox_WPSSequenceID.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceID); this.textBox_WPSSequenceRemark.Text = myClass_WPSWeldingSequence.WPSSequenceRemark; this.textBox_WPSSequenceCurrent.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceCurrent); this.textBox_WPSSequenceRateofAirFlow.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceRateofAirFlow); this.textBox_WPSSequenceSpeed.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceSpeed); this.textBox_WPSSequenceVoltage.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceVoltage); this.textBox_WPSSequenceCurrentAmplitude.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceCurrentAmplitude); this.textBox_WPSSequenceRateofAirFlowAmplitude.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceRateofAirFlowAmplitude); this.textBox_WPSSequenceSpeedAmplitude.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceSpeedAmplitude); this.textBox_WPSSequenceVoltageAmplitude.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceVoltageAmplitude); this.textBox_WPSSequenceWireFeedRate.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceWireFeedRate); this.textBox_WPSSequenceWireFeedRateAmplitude.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceWireFeedRateAmplitude); this.textBox_WPSSequenceHeatInput.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceHeatInput); this.textBox_WPSSequenceWeldingRodDiameter.Text = string.Format("{0}", myClass_WPSWeldingSequence.WPSSequenceWeldingRodDiameter); this.comboBox_WPSSequenceWeldingProcessAb.SelectedValue = myClass_WPSWeldingSequence.WPSSequenceWeldingProcessAb; this.comboBox_WPSSequenceWeldingPosition.SelectedValue = myClass_WPSWeldingSequence.WPSSequenceWeldingPosition; this.textBox_WPSSequenceWeldingConsumable.Text = myClass_WPSWeldingSequence.WPSSequenceWeldingConsumable; this.comboBox_WPSSequenceTypeofCurrentAndPolarity.SelectedValue = myClass_WPSWeldingSequence.WPSSequenceTypeofCurrentAndPolarity; this.numericUpDown_WPSSequencePassWeldingBegin.Value = myClass_WPSWeldingSequence.WPSSequencePassWeldingBegin; this.numericUpDown_WPSSequencePassWeldingEnd.Value = myClass_WPSWeldingSequence.WPSSequencePassWeldingEnd; } else { Class_WPS myClass_WPS = new Class_WPS(this.myClass_WPSWeldingSequence.WPSID); this.comboBox_WPSSequenceWeldingProcessAb.SelectedValue = myClass_WPS.WPSWeldingProcessAb; this.comboBox_WPSSequenceWeldingPosition.SelectedValue = myClass_WPS.WPSWeldingPosition; this.textBox_WPSSequenceWeldingConsumable.Text = myClass_WPS.WPSWeldingConsumable; if (myClass_DefaultWPSWeldingSequence != null && myClass_DefaultWPSWeldingSequence.WPSID == this.myClass_WPSWeldingSequence.WPSID) { this.comboBox_WPSSequenceWeldingProcessAb.SelectedValue = myClass_DefaultWPSWeldingSequence.WPSSequenceWeldingProcessAb; this.comboBox_WPSSequenceWeldingPosition.SelectedValue = myClass_DefaultWPSWeldingSequence.WPSSequenceWeldingPosition; this.textBox_WPSSequenceWeldingConsumable.Text = myClass_DefaultWPSWeldingSequence.WPSSequenceWeldingConsumable; this.textBox_WPSSequenceCurrent.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceCurrent); this.textBox_WPSSequenceRateofAirFlow.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceRateofAirFlow); this.textBox_WPSSequenceSpeed.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceSpeed); this.textBox_WPSSequenceVoltage.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceVoltage); this.textBox_WPSSequenceCurrentAmplitude.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceCurrentAmplitude); this.textBox_WPSSequenceRateofAirFlowAmplitude.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceRateofAirFlowAmplitude); this.textBox_WPSSequenceSpeedAmplitude.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceSpeedAmplitude); this.textBox_WPSSequenceVoltageAmplitude.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceVoltageAmplitude); this.textBox_WPSSequenceWeldingRodDiameter.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceWeldingRodDiameter); this.textBox_WPSSequenceWireFeedRate.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceWireFeedRate); this.textBox_WPSSequenceWireFeedRateAmplitude.Text = string.Format("{0}", myClass_DefaultWPSWeldingSequence.WPSSequenceWireFeedRateAmplitude); this.comboBox_WPSSequenceTypeofCurrentAndPolarity.SelectedValue = myClass_DefaultWPSWeldingSequence.WPSSequenceTypeofCurrentAndPolarity; this.numericUpDown_WPSSequencePassWeldingBegin.Value = myClass_DefaultWPSWeldingSequence.WPSSequencePassWeldingEnd + 1; this.numericUpDown_WPSSequencePassWeldingEnd.Value = myClass_DefaultWPSWeldingSequence.WPSSequencePassWeldingEnd + 1; //this.textBox_WPSSequenceRemark.Text = myClass_DefaultWPSWeldingSequence.WPSSequenceRemark; } } }
private void contextMenuStrip_WPSHeatTreatment_Opening(object sender, CancelEventArgs e) { if (this.myEventArgs_WPS == null || string.IsNullOrEmpty(this.myEventArgs_WPS.str_WPSID)) { e.Cancel = true; return; } else { Class_WPS myClass_WPS = new Class_WPS(this.myEventArgs_WPS.str_WPSID); e.Cancel = myClass_WPS.WPSStatus < 0 || (!(Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Modify) || (Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.PossessorModify) && (new Class_WPS(this.myEventArgs_WPS.str_WPSID)).WPSPrincipal.Equals(Class_zwjPublic.myClass_CustomUser.UserGUID)))); } }
private void toolStripMenuItem_WPSRowLockOut_Click(object sender, EventArgs e) { Class_WPS myClass_WPS = new Class_WPS(this.dataGridView_Data.CurrentRow.Cells["WPSID"].Value.ToString()); if (this.toolStripMenuItem_WPSRowLockOut.Text == "解锁") { myClass_WPS.WPSStatus = 0; } else { myClass_WPS.WPSStatus = int.MinValue; } myClass_WPS.AddAndModify(Enum_zwjKindofUpdate.Modify); this.RefreshData(false); }
private void toolStripMenuItem_WPSRowDelete_Click(object sender, EventArgs e) { Class_WPS myClass_WPS = new Class_WPS((string)this.dataGridView_Data.CurrentRow.Cells["WPSID"].Value); if (Class_WPS.ExistAndCanDeleteAndDelete(myClass_WPS.WPSID, Enum_zwjKindofUpdate.CanDelete)) { if (MessageBox.Show("确认删除吗?", "确认窗口", MessageBoxButtons.OKCancel) == DialogResult.OK) { Class_WPS.ExistAndCanDeleteAndDelete(myClass_WPS.WPSID, Enum_zwjKindofUpdate.Delete); this.RefreshData(false); } } else { MessageBox.Show("不能删除!"); } }
private void Form_WPSUpdate_Load(object sender, EventArgs e) { this.label_ErrMessage.Text = ""; this.BackColor = Properties.Settings.Default.FormBackColor; this.Font = Properties.Settings.Default.FormFont; if (this.bool_Add == true) { this.Button_WPSIDModify.Visible = false; this.userControl_WPSBase1.InitControl(this.myClass_WPS, this.bool_Add); } else { if (!Class_WPS.ExistAndCanDeleteAndDelete(myClass_WPS.WPSID, ZCCL.ClassBase.Enum_zwjKindofUpdate.Exist)) { MessageBox.Show("该条数据已被删除!"); this.DialogResult = DialogResult.Cancel; this.Close(); return; } this.Button_WPSIDModify.Visible = true; this.userControl_WPSBase1.InitControl(this.myClass_WPS, this.bool_Add); } }
private void contextMenuStrip_WPSRow_Opening(object sender, CancelEventArgs e) { this.toolStripMenuItem_DataGridViewRowAdd.Enabled = Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Add); this.toolStripMenuItem_DataGridViewRowModify.Enabled = Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Modify) || Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.PossessorModify); this.toolStripMenuItem_DataGridViewRowDelete.Enabled = Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Delete) || Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.PossessorDelete); this.toolStripMenuItem_RowExport.Enabled = Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Print); //int int_IssueStatus = (int)this.dataGridView_Data.CurrentRow.Cells["IssueStatus"].Value; //if (int_IssueStatus < 0) Class_WPS myClass_WPS = new Class_WPS(this.dataGridView_Data.CurrentRow.Cells["WPSID"].Value.ToString()); if (myClass_WPS.WPSStatus < 0) { this.toolStripMenuItem_DataGridViewRowModify.Enabled = false; this.toolStripMenuItem_DataGridViewRowDelete.Enabled = false; this.toolStripMenuItem_WPSRowLockOut.Text = "解锁"; } else { this.toolStripMenuItem_WPSRowLockOut.Text = "锁定"; } }
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(); }
public void FillClass() { myClass_WPS.WPSID = this.textBox_WPSID.Text; myClass_WPS.WPSDenomination = this.textBox_WPSDenomination.Text; myClass_WPS.WPSWeldingEquipment = this.textBox_WPSWeldingEquipment.Text; myClass_WPS.WPSWorkPieceType = (string)this.comboBox_WPSWorkPieceType.SelectedValue; double.TryParse(this.textBox_WPSThickness.Text, out myClass_WPS.WPSThickness); if (this.textBox_WPSExternalDiameter.Text.Length > 0) { double.TryParse(this.textBox_WPSExternalDiameter.Text, out myClass_WPS.WPSExternalDiameter); } this.myClass_WPS.WPSMaterialHeterogeneity = this.checkBox_WPSMaterialHeterogeneity.Checked; if (this.myClass_WPS.WPSMaterialHeterogeneity) { myClass_WPS.WPSWorkPieceTypeSecond = (string)this.comboBox_WPSWorkPieceTypeSecond.SelectedValue; double.TryParse(this.textBox_WPSThicknessSecond.Text, out myClass_WPS.WPSThicknessSecond); if (this.textBox_WPSExternalDiameterSecond.Text.Length > 0) { double.TryParse(this.textBox_WPSExternalDiameterSecond.Text, out myClass_WPS.WPSExternalDiameterSecond); } } myClass_WPS.WPSRemark = this.textBox_WPSRemark.Text; myClass_WPS.WPSWeldingPosition = (string)this.comboBox_WPSWeldingPosition.SelectedValue; myClass_WPS.WPSAssemblage = (string)this.comboBox_WPSAssemblage.SelectedValue; myClass_WPS.WPSLayerWelding = (string)this.comboBox_WPSLayerWelding.SelectedValue; myClass_WPS.WPSWeldingProcessAb = (string)this.comboBox_WPSWeldingProcessAb.SelectedValue; myClass_WPS.WPSGrooveType = (string)this.comboBox_WPSGrooveType.SelectedValue; if (this.textBox_WPSTemperature.Text.Length > 0) { double.TryParse(this.textBox_WPSTemperature.Text, out myClass_WPS.WPSTemperature); } else { myClass_WPS.WPSTemperature = 0; } if (this.textBox_WPSHumidity.Text.Length > 0) { double.TryParse(this.textBox_WPSHumidity.Text, out myClass_WPS.WPSHumidity); } myClass_WPS.WPSJointType = (string)this.comboBox_WPSJointType.Text; if (myClass_WPSDefault == null) { myClass_WPSDefault = new Class_WPS(); } myClass_WPSDefault.WPSAssemblage = myClass_WPS.WPSAssemblage; myClass_WPSDefault.WPSDenomination = myClass_WPS.WPSDenomination; myClass_WPSDefault.WPSExternalDiameter = myClass_WPS.WPSExternalDiameter; myClass_WPSDefault.WPSExternalDiameterSecond = myClass_WPS.WPSExternalDiameterSecond; myClass_WPSDefault.WPSGrooveType = myClass_WPS.WPSGrooveType; myClass_WPSDefault.WPSHumidity = myClass_WPS.WPSHumidity; myClass_WPSDefault.WPSID = myClass_WPS.WPSID; myClass_WPSDefault.WPSJointType = myClass_WPS.WPSJointType; myClass_WPSDefault.WPSLayerWelding = myClass_WPS.WPSLayerWelding; myClass_WPSDefault.WPSMaterial = myClass_WPS.WPSMaterial; myClass_WPSDefault.WPSMaterialHeterogeneity = myClass_WPS.WPSMaterialHeterogeneity; myClass_WPSDefault.WPSMaterialSecond = myClass_WPS.WPSMaterialSecond; myClass_WPSDefault.WPSPrincipal = myClass_WPS.WPSPrincipal; myClass_WPSDefault.WPSTemperature = myClass_WPS.WPSTemperature; myClass_WPSDefault.WPSThickness = myClass_WPS.WPSThickness; myClass_WPSDefault.WPSThicknessSecond = myClass_WPS.WPSThicknessSecond; myClass_WPSDefault.WPSWeldingConsumable = myClass_WPS.WPSWeldingConsumable; myClass_WPSDefault.WPSWeldingEquipment = myClass_WPS.WPSWeldingEquipment; myClass_WPSDefault.WPSWeldingPosition = myClass_WPS.WPSWeldingPosition; myClass_WPSDefault.WPSWeldingProcessAb = myClass_WPS.WPSWeldingProcessAb; myClass_WPSDefault.WPSWorkPieceType = myClass_WPS.WPSWorkPieceType; myClass_WPSDefault.WPSWorkPieceTypeSecond = myClass_WPS.WPSWorkPieceTypeSecond; }
private void contextMenuStrip_WPSImageRow_Opening(object sender, CancelEventArgs e) { Class_WPS myClass_WPS = new Class_WPS(this.myEventArgs_WPS.str_WPSID); e.Cancel = myClass_WPS.WPSStatus < 0 || (!(Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.Modify) || (Class_CustomUser.GetSecurity(Class_zwjPublic.myClass_CustomUser.UserGUID, Class_CustomSecurity.GetSecurityGUID("工艺权限"), Enum_zwjKindofUpdate.PossessorModify) && (new Class_WPS(this.myEventArgs_WPS.str_WPSID)).WPSPrincipal.Equals(Class_zwjPublic.myClass_CustomUser.UserGUID)))); }