Beispiel #1
0
        private void btnQueuing_Click(object sender, EventArgs e)
        {
            var idCard         = textBox1.Text.Trim();
            var validateResult = ValidateIdCard(idCard);

            if (!validateResult)
            {
                MessageBox.Show("身份证格式错误", "提示");
                return;
            }

            var isOrder = IsOrder(idCard);

            if (isOrder)
            {
                var business = GetBusiness(idCard);

                if (business == null)
                {
                    throw new Exception("此用户不存在");
                }

                if (CheckOrderTime(business.OrderTime))
                {
                    MessageBox.Show(@"超过预约时间10分钟,请重新预约或排队取号");
                    return;
                }

                var frmOrder = new Order(idCard);
                frmOrder.ShowDialog();
            }
            else
            {
                var frmWithoutOrder = new WithoutOrder(idCard);
                frmWithoutOrder.ShowDialog();
            }
        }
Beispiel #2
0
        private void btnQueuing_Click(object sender, EventArgs e)
        {
            var idCard = textBox1.Text.Trim();
            var validateResult = ValidateIdCard(idCard);

            if (!validateResult)
            {
                MessageBox.Show("身份证格式错误", "提示");
                return;
            }

            var isOrder = IsOrder(idCard);

            if (isOrder)
            {
                var business = GetBusiness(idCard);

                if (business == null)
                {
                    throw new Exception("此用户不存在");
                }

                if (CheckOrderTime(business.OrderTime))
                {
                    MessageBox.Show(@"超过预约时间10分钟,请重新预约或排队取号");
                    return;
                }

                var frmOrder = new Order(idCard);
                frmOrder.ShowDialog();
            }
            else
            {
                var frmWithoutOrder = new WithoutOrder(idCard);
                frmWithoutOrder.ShowDialog();
            }
        }