private void dgCl_KeyUp(object sender, KeyEventArgs e) { if (curRow >= 0) { string make = dtCl.Rows[curRow]["Make"].ToString(); string jhh = dtCl.Rows[curRow]["JHH"].ToString(); string zfh = dtCl.Rows[curRow]["ZFH"].ToString(); string clh = dtCl.Rows[curRow]["CLH"].ToString(); string qa = dtCl.Rows[curRow]["QA"].ToString(); string kw = dtCl.Rows[curRow]["KW"].ToString(); if (e.KeyCode == Keys.Enter) { if (dtCl.Rows[curRow]["WCFlag"].ToString() == "1") { frmMessage frm = new frmMessage(); frm.ShowDialog("是否取消消帐材料" + clh, "提示"); if (frm.ret) { Storage.ClearImpScanStatus(jhh, make, zfh, clh); dtCl.Rows[curRow]["WCFlag"] = 0; dtCl.Rows[curRow]["SCANTIME"] = ""; dtCl.Rows[curRow]["KW"] = ""; dtCl.Rows.RemoveAt(curRow); curRow = -1; } frm.Dispose(); } } if (e.KeyCode == Keys.F2) { if (dtCl.Rows[curRow]["WCFlag"].ToString() == "1") { string remain = Storage.GetRemainCls(jhh, make, zfh); frmInKW frm = new frmInKW(); frm.ShowDialog(clh, kw, remain); if (frm.ret) { string kw2 = frm.m_kwnow; dtCl.Rows[curRow]["KW"] = kw2; Storage.SaveCurrentKw(zfh, jhh, make, kw2); Storage.UpdateImpKw(jhh, make, zfh, clh, Global.sKb + kw2); } frm.Dispose(); } } if (e.KeyCode == Keys.F22 || e.KeyCode == Keys.F23) { frmQuality frmQuality = new frmQuality(); Global.frmCurrent = frmQuality; frmQuality.Owner = this; this.Hide(); frmQuality.Show(clh, qa); } } }
private void dgOut_KeyUp(object sender, KeyEventArgs e) { if (curRow >= 0) { string make = dtOut.Rows[curRow]["Make"].ToString(); string jhh = dtOut.Rows[curRow]["JHH"].ToString(); string zfh = dtOut.Rows[curRow]["ZFH"].ToString(); string clh = dtOut.Rows[curRow]["CLH"].ToString(); string qa = dtOut.Rows[curRow]["QA"].ToString(); if (e.KeyCode == Keys.Enter) { if (dtOut.Rows[curRow]["WCFlag"].ToString() == "" || dtOut.Rows[curRow]["WCFlag"].ToString() == "0") { string now = DateTime.Now.ToString("yyyyMMddHHmmss"); dtOut.Rows[curRow]["SCANTIME"] = now; dtOut.Rows[curRow]["WCFlag"] = 1; Storage.SetExpScanStatus(jhh, make, zfh, clh, now); //SqlCe.ExecuteNonQuery("update ExportStorageAcceptOrder set WCFlag=1,SCANTIME='" + dtOut.Rows[curRow]["SCANTIME"].ToString() + "' where CLH='" + dtOut.Rows[curRow]["CLH"].ToString() + "' and ZFH='" + dtOut.Rows[curRow]["ZFH"].ToString() + "' and JHH='" + dtOut.Rows[curRow]["JHH"].ToString() + "'"); PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100); } else if (dtOut.Rows[curRow]["WCFlag"].ToString() == "1") { frmMessage frm = new frmMessage(); frm.ShowDialog("是否取消消帐材料" + clh, "提示"); if (frm.ret) { Storage.ClearExpScanStatus(jhh, make, zfh, clh); //SqlCe.ExecuteNonQuery("update ExportStorageAcceptOrder set WCFlag=0,SCANTIME='' where CLH='" + dtOut.Rows[curRow]["CLH"].ToString() + "' and ZFH='" + dtOut.Rows[curRow]["ZFH"].ToString() + "' and JHH='" + dtOut.Rows[curRow]["JHH"].ToString() + "'"); dtOut.Rows[curRow]["WCFlag"] = 0; dtOut.Rows[curRow]["SCANTIME"] = ""; } frm.Dispose(); } RefreshJS(); } if (e.KeyCode == Keys.F22 || e.KeyCode == Keys.F23) { frmQuality frmQuality = new frmQuality(); Global.frmCurrent = frmQuality; frmQuality.Owner = this; this.Hide(); frmQuality.Show(clh, qa); } } }