Exemple #1
0
        private void zf2kw(string clh, string zfh, string jhh, string make, string kw, string gg, int mz, string qa, string exflag)
        {
            string kw2 = Storage.GetCurrentKw(zfh, jhh, make);
            string now = DateTime.Now.ToString("yyyyMMddHHmmss");

            if (kw2 != "")
            {
                dtCl.Rows.Add(new object[] { clh, Global.sKb, kw2, gg, mz, zfh, jhh, make, 1, now, qa, exflag });
                Storage.SetImpScanStatus(jhh, make, zfh, clh, Global.sKb + kw2, now);
                PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100);
            }
            else
            {
                string remain = Storage.GetRemainCls(jhh, make, zfh);

                frmInKW frm = new frmInKW();
                frm.ShowDialog(clh, kw, remain);
                if (frm.ret)
                {
                    kw2 = frm.m_kwnow;
                    Storage.SaveCurrentKw(zfh, jhh, make, kw2);
                    dtCl.Rows.Add(new object[] { clh, Global.sKb, kw2, gg, mz, zfh, jhh, make, 1, now, qa, exflag });
                    Storage.SetImpScanStatus(jhh, make, zfh, clh, Global.sKb + kw2, now);
                    PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100);
                }
                frm.Dispose();
            }
        }
Exemple #2
0
        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);
                }
            }
        }
Exemple #3
0
        private void zf2kw(int index)
        {
            string make = dtCl.Rows[index]["Make"].ToString();
            string jhh  = dtCl.Rows[index]["TDH"].ToString();
            string zfh  = dtCl.Rows[index]["ZFH"].ToString();
            string clh  = dtCl.Rows[index]["CLH"].ToString();
            string kw   = dtCl.Rows[index]["KW"].ToString();
            int    mz   = 0;

            if (dtCl.Rows[index]["MZ"] != DBNull.Value)
            {
                mz = Convert.ToInt32(dtCl.Rows[index]["MZ"]);
            }
            string now = DateTime.Now.ToString("yyyyMMddHHmmss");

            string kw2 = Storage.GetCurrentKw(zfh, jhh, make);

            if (kw2 != "")
            {
                dtCl.Rows[index]["KW"]       = kw2;
                dtCl.Rows[index]["SCANTIME"] = now;
                dtCl.Rows[index]["WCFlag"]   = 1;
                Storage.SetImpScanStatus(jhh, make, zfh, clh, Global.sKb + kw2, Global.storage.kjh, now);
                PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100);
            }
            else
            {
                string remain = Storage.GetRemainCls(jhh, make, zfh);

                frmInKW frm = new frmInKW();

                frm.ShowDialog(clh, kw, remain);
                if (frm.ret)
                {
                    kw2 = frm.m_kwnow;
                    dtCl.Rows[index]["KW"] = kw2;
                    Storage.SaveCurrentKw(zfh, jhh, make, kw2);
                    dtCl.Rows[index]["SCANTIME"] = now;
                    dtCl.Rows[index]["WCFlag"]   = 1;
                    Storage.SetImpScanStatus(jhh, make, zfh, clh, Global.sKb + kw2, Global.storage.kjh, now);
                    PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100);
                }
                frm.Dispose();
            }
        }