コード例 #1
0
ファイル: MainScreen.cs プロジェクト: samualtang/DZunshape
        private void LblAdd1_Click(object sender, EventArgs e)
        {
            DialogResult dia = MessageBox.Show("确认放烟:" + list[0].CigName + " ?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (dia == DialogResult.Cancel)
            {
                return;
            }
            WriteLog.GetLog().Write("手动开始时间" + DateTime.Now.ToString());
            for (int i = 0; i < list[0].PokeIDList.Count; i++)
            {
                MixedClass.UpdatePullStatus2Put2(machineSeq, Convert.ToDecimal(list[0].PokeIDList[i]));
            }
            WriteLog.GetLog().Write("数据库更新完时间" + DateTime.Now.ToString());
            WriteLog.GetLog().Write("<手动点击放烟" + list[0].CigName + "成功>");
            GetData();
            WriteLog.GetLog().Write("再次取数据时间" + DateTime.Now.ToString());
        }
コード例 #2
0
ファイル: MainScreen.cs プロジェクト: samualtang/DZunshape
        void PullCigarette(string stri)
        {
            MixInfos info = MixedClass.GetMixCig2(machineSeq, groupNo, 0)[0];

            WriteLog.GetLog().Write("扫到条码" + stri);
            if (info.CigCode.Trim().Contains(str) || info.CigCode.Trim() == str || info.CigCode.Trim().Substring(info.CigCode.Trim().Length - 7) == stri.Trim().Substring(info.CigCode.Trim().Length - 7) || info.CigCode.Trim().Contains(stri.Trim().Substring(info.CigCode.Trim().Length - 7)))
            {
                if (MixedClass.UpdatePullStatus2Put2(machineSeq, info.PokeID))
                {
                    WriteLog.GetLog().Write("<扫码放烟成功>");
                    GetData();
                    str = "";
                }
            }
            else
            {
                WriteLog.GetLog().Write("放烟品牌错误:扫描到条码" + str[0]);
                MessageBox.Show("放烟错误,请重放" + str);
                str = "";
            }
        }