private void btnParamNew_Click(object sender, EventArgs e) { using (Dialogs.frmItemsEditor formEditor = new Dialogs.frmItemsEditor( EditStatus.New, splitContainerControl1.Panel2.Text, dtParams, -1)) { if (formEditor.ShowDialog() == DialogResult.OK) { DataRow dr = dtParams.Rows[dtParams.Rows.Count - 1]; string strProcedureName = string.Format( "{0}.{1}", className, MethodBase.GetCurrentMethod().Name); WriteLog.Instance.WriteBeginSplitter(strProcedureName); try { int errCode = 0; string errText = ""; IRAPMESClient.Instance.usp_SaveFact_BatchMethodConfirming( IRAPUser.Instance.CommunityID, stationInfo.T216LeafID, stationInfo.T107LeafID, currentBatchNo, GenerateRSFactXML(dr), IRAPUser.Instance.SysLogID, out errCode, out errText); WriteLog.Instance.Write( string.Format("({0}){1}", errCode, errText), strProcedureName); if (errCode != 0) { XtraMessageBox.Show( errText, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } BatchRingCategory prdtType = (BatchRingCategory)cboPrdtType.SelectedItem; GetMethodStandards( prdtType.T131LeafID, stationInfo.T216LeafID, currentBatchNo); vgrdMethodParams.RefreshDataSource(); } finally { WriteLog.Instance.WriteEndSplitter(strProcedureName); } } } }
private void btnPWONew_Click(object sender, EventArgs e) { if (dtInspection.Columns.Count < 0) { XtraMessageBox.Show( "当前生产工单的在制品没有配置检验项", "", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (Dialogs.frmItemsEditor formEditor = new Dialogs.frmItemsEditor( EditStatus.New, splitContainerControl1.Panel2.Text, dtInspection, -1)) { if (formEditor.ShowDialog() == DialogResult.OK) { vgrdInspectParams.RefreshDataSource(); } } }
private void btnAdd_Click(object sender, EventArgs e) { if (DataSource.Columns.Count < 0) { XtraMessageBox.Show( "当前没有可配置的参数", "", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (Dialogs.frmItemsEditor formEditor = new Dialogs.frmItemsEditor( EditStatus.New, this.groupControl1.Text, this.DataSource, -1)) { if (formEditor.ShowDialog() == DialogResult.OK) { this.vGridControl1.RefreshDataSource(); } } }
private void btnParamEdit_Click(object sender, EventArgs e) { int idx = vgrdMethodParams.FocusedRecord; if (idx >= 0) { using (Dialogs.frmItemsEditor formEditor = new Dialogs.frmItemsEditor( EditStatus.Edit, splitContainerControl1.Panel2.Text, dtParams, idx)) { if (formEditor.ShowDialog() == DialogResult.OK) { DataRow dr = dtParams.Rows[idx]; string strProcedureName = string.Format( "{0}.{1}", className, MethodBase.GetCurrentMethod().Name); WriteLog.Instance.WriteBeginSplitter(strProcedureName); try { int errCode = 0; string errText = ""; List <PPParamValue> values = ppp[0].ResolveDataXML(); IRAPMESBatchClient.Instance.usp_SaveFact_BatchMethodParams_Modify( IRAPUser.Instance.CommunityID, values[idx].FactID, stationInfo.T216LeafID, stationInfo.T107LeafID, currentBatchNo, GenerateRSFactXML(dr), IRAPUser.Instance.SysLogID, out errCode, out errText); WriteLog.Instance.Write( string.Format("({0}){1}", errCode, errText), strProcedureName); if (errCode != 0) { XtraMessageBox.Show( errText, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } } finally { WriteLog.Instance.WriteEndSplitter(strProcedureName); } #region 刷新生产过程参数列表 GetMethodStandards( 0, stationInfo.T216LeafID, currentBatchNo); vgrdMethodParams.RefreshDataSource(); #endregion } } } }