Example #1
0
        private void wtd2kw(string clh, string lbl, string jhh)
        {
            string kw2 = Storage.GetCurrentKw("0000000000", jhh, "SGYS");
            string now = DateTime.Now.ToString("yyyyMMddHHmmss");

            frmWtdInCl frmWtdInCl = new frmWtdInCl();

            frmWtdInCl.ShowDialog(clh, lbl, kw2);
            if (frmWtdInCl.ret)
            {
                string sJs  = frmWtdInCl.sJs;
                string sZl  = frmWtdInCl.sZL;
                string sKw  = frmWtdInCl.sKw;
                string sLbl = frmWtdInCl.sLbl;

                Storage.SetWtdInScanStatus(jhh, clh, Global.sKb + sKw, sJs, sZl, now, sLbl);
                PsionTeklogix.Sound.Beeper.Beeper.PlayTone(5000, 500, 100);

                if (sKw != kw2)
                {
                    Storage.SaveCurrentKw("0000000000", jhh, "SGYS", sKw);
                }

                RefreshData();
            }

            frmWtdInCl.Dispose();
        }
Example #2
0
        private void dgWtdCl_KeyUp(object sender, KeyEventArgs e)
        {
            if (curRow >= 0)
            {
                string jhh   = Global.storage.jhh;
                string clh   = dtCl.Rows[curRow]["CLH"].ToString();
                string lbl   = dtCl.Rows[curRow]["LBL"].ToString();
                string qa    = dtCl.Rows[curRow]["QA"].ToString();
                string kw    = dtCl.Rows[curRow]["KW"].ToString();
                string sJs   = dtCl.Rows[curRow]["JS"].ToString();
                string sZl   = dtCl.Rows[curRow]["ZL"].ToString();
                string sFlag = dtCl.Rows[curRow]["FLAG"].ToString();

                if (e.KeyCode == Keys.Enter)
                {
                    if (dtCl.Rows[curRow]["WCFlag"].ToString() == "0" || dtCl.Rows[curRow]["WCFlag"].ToString() == "")
                    {
                        //弹出窗体,输入件数、重量
                        //条码字段为空,要求重新绑定条码
                        wtd2kw(clh, "", jhh, sJs, sZl);
                    }
                    else if (dtCl.Rows[curRow]["WCFlag"].ToString() == "1")
                    {
                        frmMessage frm = new frmMessage();
                        frm.ShowDialog("是否取消消帐材料" + clh, "提示");
                        if (frm.ret)
                        {
                            Storage.ClearWtdInScanStatus(jhh, lbl, sFlag);
                            RefreshData();
                            curRow = -1;
                        }
                        frm.Dispose();
                    }
                }

                if (e.KeyCode == Keys.F2)
                {
                    if (dtCl.Rows[curRow]["WCFlag"].ToString() == "1")
                    {
                        frmWtdInCl frmWtdInCl = new frmWtdInCl();
                        frmWtdInCl.ShowDialog(clh, lbl, kw, sJs, sZl);
                        if (frmWtdInCl.ret)
                        {
                            kw  = frmWtdInCl.sKw;
                            sJs = frmWtdInCl.sJs;
                            sZl = frmWtdInCl.sZL;
                            lbl = frmWtdInCl.sLbl;

                            dtCl.Rows[curRow]["KW"] = kw;
                            dtCl.Rows[curRow]["JS"] = sJs;
                            dtCl.Rows[curRow]["ZL"] = sZl;


                            Storage.SaveCurrentKw("0000000000", jhh, "SGYS", kw);
                            Storage.UpdateWtdInKw(jhh, lbl, Global.sKb + kw, sJs, sZl);

                            RefreshData();
                        }

                        frmWtdInCl.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);
                }
            }
        }