private void simpleButton1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(dateEdit1.Text) && string.IsNullOrEmpty(txtPRD_ID.Text) && string.IsNullOrEmpty(txtPRD_NAME.Text)) { MsgBoxHelper.AlertMsgBox("请至少选择一个条件查询", "提示"); dateEdit1.Focus(); return; } if (!string.IsNullOrEmpty(dateEdit1.Text)) { SearchByDate(dateEdit1.Text, dateEdit1.Text); } if (!string.IsNullOrEmpty(txtPRD_ID.Text)) { SearchById(txtPRD_ID.Text); } }
/// <summary> /// 将从pcl获取的数据与工差进行对比 /// </summary> private void CompareDatas() { if (arr.Length != localarr.Length) { return; } for (int i = 0; i < localarr.Length; i++) { double exh = CompareData(localarr[i], arr[i]); Dictionary <string, ProgressBarControl> controldic = ChooseControl(i); if (controldic != null) { if (controldic.Count == 3) { if (exh == 100) { controldic["databar"].Position = 100; controldic["databarB"].Position = 0; controldic["databarT"].Position = 0; } else if (exh < 0) { controldic["databar"].Position = 0; controldic["databarB"].Position = Convert.ToInt32((-1 * exh).ToString("0")); controldic["databarT"].Position = 0; } else { controldic["databarB"].Position = 0; controldic["databar"].Position = 0; controldic["databarT"].Position = Convert.ToInt32(exh.ToString("0")); } } } else { maintimer.Enabled = false; MsgBoxHelper.AlertMsgBox("数据数量超出15个", "提示"); return; } } }
private void simpleButton1_Click(object sender, EventArgs e) { if (txtToptol.Text == "0") { MsgBoxHelper.AlertMsgBox("上工差不能为0", "提示"); txtToptol.Focus(); return; } if (txtBottol.Text == "0") { MsgBoxHelper.AlertMsgBox("下工差不能为0", "提示"); txtBottol.Focus(); return; } TopTol = txtToptol.Text; BotTol = txtBottol.Text; FStreamHelper.WriteTxT(TopTol + "," + BotTol, "Tol.txt", false); this.DialogResult = DialogResult.OK; this.Close(); }