public ucBilletFlowCard() { InitializeComponent(); try { this.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.ultraGrid1_ClickCellButton); ultraGrid1.DisplayLayout.Bands[0].Columns["FD_ZC_ENTERDATETIME"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.EditButton; ultraGrid1.DisplayLayout.Bands[0].Columns["FD_ZC_ENTERDATETIME"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.OnMouseEnter; ultraGrid1.DisplayLayout.Bands[0].Columns["FD_ZZ_DATE"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.EditButton; ultraGrid1.DisplayLayout.Bands[0].Columns["FD_ZZ_DATE"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.OnMouseEnter; } catch { } try { ultraGrid1.DisplayLayout.Bands[0].Columns["FN_LENGTH"].ValueList = CommonMethod.GetValuelistLength(); CommonMethod.InitUserControl(ref ultraDataSource1, ref ultraGrid1); CommonMethod.SetUltraGridCellReadOnly(ref ultraGrid1, true); } catch { } }
public void SetPost_Rolling(ProduceLine ProLine) { try { ArrayList alistEditable = new ArrayList(); alistEditable.Add("FN_ZZ_SPEC"); if (ProLine != ProduceLine.GX) { alistEditable.Add("FN_LENGTH"); } alistEditable.Add("FD_ZZ_DATE"); alistEditable.Add("FN_ZZ_NUM"); alistEditable.Add("FN_ZZ_WASTNUM"); alistEditable.Add("FS_ZZ_MEMO"); CommonMethod.SetUltraGridCellEditable(ref ultraGrid1, alistEditable); ultraGrid1.ActiveCell = ultraGrid1.Rows[0].Cells["FN_ZZ_SPEC"]; ultraGrid1.PerformAction(UltraGridAction.EnterEditMode); } catch { } }
private void cbx_Filter_CheckedChanged(object sender, EventArgs e) { CommonMethod.SetUltraGridRowFilter(ref ultraGrid1, cbx_Filter.Checked); }
private void frmWeightQueryPipe_Load(object sender, EventArgs e) { CommonMethod.RefreshAndAutoSize(ultraGrid1); try { dateTimePicker1.Value = DateTime.Today; dateTimePicker2.Value = DateTime.Today.AddDays(1).AddSeconds(-1); } catch (Exception ex) { Debug.WriteLine(ex.Message); } try { this.ultraGrid1.DisplayLayout.Bands[1].Columns["FS_SHIFT"].ValueList = CommonMethod.GetValuelistBanci(); this.ultraGrid1.DisplayLayout.Bands[1].Columns["FS_TERM"].ValueList = CommonMethod.GetValuelistBanzu(); } catch { } try { string strKey = this.CustomInfo.ToUpper(); if (!string.IsNullOrEmpty(strKey)) { if (strKey.Substring(0, 1).Equals("0")) //查询 { this.ultraToolbarsManager1.Toolbars[1].Visible = false; this.SetToolButtonVisible("判定不合格", false); this.SetToolButtonVisible("撤销不合格", false); } else if (strKey.Substring(0, 1).Equals("1")) //补打 { this.ultraToolbarsManager1.Toolbars[1].Visible = true; this.SetToolButtonVisible("判定不合格", false); this.SetToolButtonVisible("撤销不合格", false); } else if (strKey.Substring(0, 1).Equals("2")) //判废 { this.ultraToolbarsManager1.Toolbars[1].Visible = false; this.SetToolButtonVisible("判定不合格", true); this.SetToolButtonVisible("撤销不合格", true); } _PointID = strKey.Substring(1, 3); } } catch { } try { pictureBox3.Hide(); pictureBox3.SendToBack(); foreach (string printerName in PrinterSettings.InstalledPrinters) { cbPrint.Items.Add(printerName); } } catch { } }
private void GetWeightInfo(string strBatchNo) { string strWhere = ""; if (_PointID != "") { strWhere += " and t1.fs_point='" + _PointID + "'"; } if (cbxDateTime.Checked) { string strDateTimeFrom = dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm"); string strDateTimeTo = dateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm"); strWhere += Convert.ToString(" and t.fd_starttime between to_date('" + strDateTimeFrom + "', 'yyyy-MM-dd HH24:mi') and to_date('" + strDateTimeTo + "', 'yyyy-MM-dd HH24:mi')").Trim() + " "; } if (!string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { strWhere += Convert.ToString(" and t.fs_batchno like '%" + tbQueryBatchNo.Text.Trim() + "%'").Trim() + " "; } if (string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && !string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { strWhere += Convert.ToString(" and t.fs_batchno like '%" + txtQueryBatchNo2.Text.Trim() + "%'").Trim() + " "; } if (!string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && !string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { if (string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim())) { strWhere += " and t1.fs_batchno>='" + tbQueryBatchNo.Text.Trim() + "'"; } else { strWhere += " and t1.fs_batchno||trim(to_char(fn_bandno,'00'))>='" + tbQueryBatchNo.Text.Trim() + "'||trim(to_char('" + tbQueryBandNo.Text + "','00'))"; } if (string.IsNullOrEmpty(this.tbQueryBandNo2.Text.Trim())) { strWhere += " and t1.fs_batchno<='" + txtQueryBatchNo2.Text.Trim() + "'"; } else { strWhere += " and t1.fs_batchno||trim(to_char(fn_bandno,'00'))<='" + txtQueryBatchNo2.Text.Trim() + "'||trim(to_char('" + tbQueryBandNo2.Text + "','00'))"; } } //PL/SQL SPECIAL COPY string strSql = ""; strSql += Convert.ToString("select a.*,Round(a.fn_theoryweight/a.RealWeight,4)*100 RealRate").Trim() + " "; strSql += Convert.ToString(" from (select case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" 0").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 1 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" 1").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 1 then").Trim() + " "; strSql += Convert.ToString(" 2").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 1 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 1 then").Trim() + " "; strSql += Convert.ToString(" 3").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" 4").Trim() + " "; strSql += Convert.ToString(" end XH,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 1 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" '规格【' || fs_spec || '】小计:'").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 1 then").Trim() + " "; strSql += Convert.ToString(" '牌号【' || fs_steeltype || '】小计:'").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 1 and grouping(fs_steeltype) = 1 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 1 then").Trim() + " "; strSql += Convert.ToString(" '总计:'").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_steeltype) = 0 and grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" max(fs_batchno)").Trim() + " "; strSql += Convert.ToString(" end fs_batchno,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" fs_steeltype").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fs_steeltype,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" fs_spec").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fs_spec,").Trim() + " "; strSql += Convert.ToString(" sum(nvl(fn_bandcount, 0)) fn_bandcount,").Trim() + " "; strSql += Convert.ToString(" round(sum(nvl(fn_totalweight, 0)), 3) fn_totalweight,").Trim() + " "; strSql += Convert.ToString(" round(sum(nvl(fn_theoryweight, 0)), 3) fn_theoryweight,sum(Realweight) Realweight,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" max(fs_productno)").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fs_productno,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" max(fd_starttime)").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fd_starttime,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" max(fd_endtime)").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fd_endtime,").Trim() + " "; strSql += Convert.ToString(" case").Trim() + " "; strSql += Convert.ToString(" when grouping(fs_batchno) = 0 and grouping(fs_steeltype) = 0 and").Trim() + " "; strSql += Convert.ToString(" grouping(fs_spec) = 0 then").Trim() + " "; strSql += Convert.ToString(" max(fs_completeflag)").Trim() + " "; strSql += Convert.ToString(" else").Trim() + " "; strSql += Convert.ToString(" null").Trim() + " "; strSql += Convert.ToString(" end fs_completeflag ").Trim() + " "; strSql += Convert.ToString(" from (select t.fs_batchno,").Trim() + " "; strSql += Convert.ToString(" t.fs_productno,").Trim() + " "; strSql += Convert.ToString(" t.fs_steeltype,").Trim() + " "; strSql += Convert.ToString(" t.fs_spec,").Trim() + " "; strSql += Convert.ToString(" t1.fn_bandcount,").Trim() + " "; strSql += Convert.ToString(" t1.fn_totalweight,").Trim() + " "; strSql += Convert.ToString(" t1.fn_theoryweight,").Trim() + " "; strSql += Convert.ToString(" to_char(t.fd_starttime, 'yyyy-MM-dd hh24:mi:ss') fd_starttime,").Trim() + " "; strSql += Convert.ToString(" to_char(t.fd_endtime, 'yyyy-MM-dd hh24:mi:ss') fd_endtime,").Trim() + " "; strSql += Convert.ToString(" decode(t.fs_completeflag, '1', '√', '') fs_completeflag").Trim() + " "; strSql += ",(select sum(it.fn_jj_weight) from it_fp_techcard it where it.fs_zc_batchno=t.fs_batchno) RealWeight "; strSql += Convert.ToString(" from dt_pipeweightmain t,").Trim() + " "; strSql += Convert.ToString(" (select t1.fs_batchno,").Trim() + " "; strSql += Convert.ToString(" count(1) fn_bandcount,").Trim() + " "; strSql += Convert.ToString(" round(sum(nvl(t1.fn_weight, 0)),3) fn_totalweight,").Trim() + " "; strSql += Convert.ToString(" round(sum(nvl(t1.fn_theoryweight, 0)),3) fn_theoryweight").Trim() + " "; strSql += Convert.ToString(" from dt_pipeweightdetail t1").Trim() + " "; strSql += Convert.ToString(" where exists").Trim() + " "; strSql += Convert.ToString(" (select 1").Trim() + " "; strSql += Convert.ToString(" from dt_pipeweightmain t").Trim() + " "; strSql += Convert.ToString(" where t.fs_batchno = t1.fs_batchno " + strWhere + ")").Trim() + " "; strSql += Convert.ToString(" group by t1.fs_batchno) t1").Trim() + " "; strSql += Convert.ToString(" where t.fs_batchno = t1.fs_batchno)").Trim() + " "; strSql += Convert.ToString(" group by cube(fs_batchno, fs_steeltype, fs_spec)) a").Trim() + " "; strSql += Convert.ToString(" where xh <> 4").Trim() + " "; strSql += Convert.ToString(" order by xh, fs_batchno").Trim(); string err = ""; DataTable tbMain = null, tbDetail = null; DataSet ds = SelectReturnDS("ygjzjl.bar.DBHelp", "getSqlInfo", new object[] { strSql }, out err); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { tbMain = ds.Tables[0]; } else { if (!string.IsNullOrEmpty(err)) { MessageBox.Show("查询出错!\n" + err, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } dataTable2.Rows.Clear(); dataTable1.Rows.Clear(); return; } strWhere = ""; string strWhere1 = string.Empty; if (cbxDateTime.Checked) { string strDateTimeFrom = dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm"); string strDateTimeTo = dateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm"); strWhere1 += Convert.ToString(" and x.fd_starttime between to_date('" + strDateTimeFrom + "', 'yyyy-MM-dd HH24:mi') and to_date('" + strDateTimeTo + "', 'yyyy-MM-dd HH24:mi')").Trim() + " "; } if (!string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { strWhere1 += Convert.ToString(" and x.fs_batchno like '%" + tbQueryBatchNo.Text.Trim() + "%'").Trim() + " "; } if (string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && !string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { strWhere1 += Convert.ToString(" and x.fs_batchno like '%" + txtQueryBatchNo2.Text.Trim() + "%'").Trim() + " "; } if (_PointID != "") { strWhere += " and t.fs_point='" + _PointID + "'"; } if (!string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim()) && !string.IsNullOrEmpty(txtQueryBatchNo2.Text.Trim())) { if (string.IsNullOrEmpty(tbQueryBatchNo.Text.Trim())) { strWhere += " and t.fs_batchno>='" + tbQueryBatchNo.Text.Trim() + "'"; } else { strWhere += " and t.fs_batchno||trim(to_char(fn_bandno,'00'))>='" + tbQueryBatchNo.Text.Trim() + "'||trim(to_char('" + tbQueryBandNo.Text + "','00'))"; } if (string.IsNullOrEmpty(this.tbQueryBandNo2.Text.Trim())) { strWhere += " and t.fs_batchno<='" + txtQueryBatchNo2.Text.Trim() + "'"; } else { strWhere += " and t.fs_batchno||trim(to_char(fn_bandno,'00'))<='" + txtQueryBatchNo2.Text.Trim() + "'||trim(to_char('" + tbQueryBandNo2.Text + "','00'))"; } } strSql = ""; strSql += Convert.ToString("select t.fs_batchno,t.fn_bandno,'1' FS_PRINTWEIGHTTYPE,").Trim() + " "; strSql += Convert.ToString(" m.fs_materialname,t.fn_weight,").Trim() + " "; strSql += Convert.ToString(" t.fn_theoryweight,").Trim() + " "; strSql += Convert.ToString(" t.fs_type,").Trim() + " "; strSql += Convert.ToString(" t.fn_length,").Trim() + " "; strSql += Convert.ToString(" t.fn_bandbilletcount,").Trim() + " "; strSql += Convert.ToString(" t.fs_person,").Trim() + " "; strSql += Convert.ToString(" t.fs_standard FS_STANDNO,").Trim() + " "; strSql += Convert.ToString(" p.fs_pointname fs_point,").Trim() + " "; strSql += Convert.ToString(" to_char(t.fd_datetime, 'yyyy-MM-dd HH24:mi:ss') fd_datetime,").Trim() + " "; strSql += Convert.ToString(" t.fs_shift,").Trim() + " "; strSql += Convert.ToString(" t.fs_term,").Trim() + " "; strSql += Convert.ToString(" decode(t.fs_upflag, '1', '√', '') fs_upflag,").Trim() + " "; strSql += Convert.ToString(" t.fs_weightno,t.FS_JUDGER,to_char(t.FS_JUDGETIME, 'yyyy-MM-dd HH24:mi:ss') FS_JUDGETIME,").Trim() + " "; strSql += Convert.ToString(" decode(nvl(t.fs_unqualified, '0'), '1', '不合格', '合格') fs_unqualified,").Trim() + " "; strSql += Convert.ToString(" '' FN_DISWEIGHT").Trim() + " "; strSql += Convert.ToString(" from dt_pipeweightdetail t,dt_pipeweightmain m,bt_point p").Trim() + " "; strSql += Convert.ToString(" where t.fs_batchno = m.fs_batchno and t.fs_point = p.fs_pointcode and exists (select 1").Trim() + " "; strSql += Convert.ToString(" from dt_pipeweightmain x").Trim() + " "; strSql += Convert.ToString(" where x.fs_batchno = t.fs_batchno " + strWhere1 + ")").Trim() + " "; strSql += strWhere; strSql += Convert.ToString(" order by t.fs_batchno, t.fn_bandno").Trim(); err = ""; ds = SelectReturnDS("ygjzjl.bar.DBHelp", "getSqlInfo", new object[] { strSql }, out err); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { tbDetail = ds.Tables[0]; ArrayList alistCnst1 = new ArrayList(); if (dataTable2.Constraints.Count > 0) { foreach (Constraint cnst in dataTable2.Constraints) { alistCnst1.Add(cnst); } dataTable2.Constraints.Clear(); } CommonMethod.CopyDataToDatatable(ref tbDetail, ref dataTable2, true); CommonMethod.CopyDataToDatatable(ref tbMain, ref dataTable1, true); for (int i = 0; i < alistCnst1.Count; i++) { dataTable2.Constraints.Add((Constraint)alistCnst1[i]); } } else { if (!string.IsNullOrEmpty(err)) { MessageBox.Show("查询出错!\n" + err, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } CommonMethod.RefreshAndAutoSize(ultraGrid1); if (ultraGrid1.Rows.Count > 0) { ultraGrid1.ActiveRow = ultraGrid1.Rows[0]; } if (string.IsNullOrEmpty(strBatchNo)) { return; } for (int i = 0; i < ultraGrid1.Rows.Count; i++) { try { if (Convert.ToString(ultraGrid1.Rows[i].Cells["FS_BATCHNO"].Value).Equals(strBatchNo)) { ultraGrid1.Rows[i].ExpandAll(); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, i, "FS_BATCHNO", false); break; } } catch { } } }
public void ResetData() { CommonMethod.InitUserControl(ref ultraDataSource1, ref ultraGrid1); }
public bool DataValidation_Rolling(ProduceLine ProLine, out Hashtable htblValue) { htblValue = new Hashtable(); try { if (ultraGrid1.Rows.Count == 0) { return(false); } ultraGrid1.UpdateData(); string strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_SPEC"].Value).Trim(); if (string.IsNullOrEmpty(strValue)) { MessageBox.Show("请输入轧制规格!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_SPEC", true); return(false); } int iCount = 0; decimal dCount = 0.0M; bool bOK = false; if (ProLine != ProduceLine.GX) { strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_LENGTH"].Value).Trim(); if (string.IsNullOrEmpty(strValue)) { MessageBox.Show("请输入定尺长度!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_LENGTH", true); return(false); } bOK = int.TryParse(strValue, out iCount); if (!bOK) { MessageBox.Show("定尺长度必须是整数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_LENGTH", true); return(false); } if (iCount < 0) { MessageBox.Show("定尺长度必须大于零!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_LENGTH", true); return(false); } } strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_NUM"].Value).Trim(); if (string.IsNullOrEmpty(strValue)) { MessageBox.Show("请输入成材条数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_NUM", true); return(false); } bOK = decimal.TryParse(strValue, out dCount); if (!bOK) { MessageBox.Show("成材条数必须是数值!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_NUM", true); return(false); } if (dCount < 0) { MessageBox.Show("成材条数必须大于零!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_NUM", true); return(false); } strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_WASTNUM"].Value).Trim(); if (!string.IsNullOrEmpty(strValue)) { bOK = decimal.TryParse(strValue, out dCount); if (!bOK) { MessageBox.Show("轧废条数必须是数值!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_WASTNUM", true); return(false); } if (dCount < 0) { MessageBox.Show("轧废条数必须大于零!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, 0, "FN_ZZ_WASTNUM", true); return(false); } } strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_SPEC"].Text).Trim(); htblValue.Add("V2", strValue); //轧制规格 strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_LENGTH"].Text).Trim(); htblValue.Add("V3", strValue); //定尺长度 strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FD_ZZ_DATE"].Text).Trim(); htblValue.Add("V4", strValue); //轧制时间 strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_NUM"].Text).Trim(); htblValue.Add("V5", strValue); //成材支数 strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FN_ZZ_WASTNUM"].Text).Trim(); htblValue.Add("V6", strValue); //轧废支数 strValue = Convert.ToString(ultraGrid1.Rows[0].Cells["FS_ZZ_MEMO"].Text).Trim(); htblValue.Add("V8", strValue); //轧废支数 return(true); } catch { } return(false); }