예제 #1
0
        //转异常处理
        private void btnException_Click(object sender, EventArgs e)
        {
            //CtosAPIBLL.SM001001("OCR", "123456", "172.16.1.1");

            this.Cursor = Cursors.WaitCursor;
            try
            {
                if (row == null)
                {
                    MessageBox.Show("请先获取新记录");
                    return;
                }

                fmExcepInput fm = new fmExcepInput();
                fm.reason = row.CTOSERRORMSG;

                DialogResult drs = fm.ShowDialog();
                //DialogResult drs = MessageBox.Show("确认转异常处理?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (drs == DialogResult.No || drs == DialogResult.Cancel)
                {
                    return;
                }

                row.CTOSERRORMSG = fm.reason;
                if (row2 != null)
                {
                    row2.CTOSERRORMSG = fm.reason;
                }

                bll.MarkExpcetion();

                bll.ClearData();

                DialogResult drs1 = MessageBox.Show("转异常成功!\r\n是否继续下一组图片?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                if (drs1 == DialogResult.Yes)
                {
                    btnNext.PerformClick();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }