Ejemplo n.º 1
0
        public string isTokaiStudent()
        {
            IDreadform form = new IDreadform(idserialport.Text);

            if (form.ShowDialog() == DialogResult.OK)
            {
                return(form.IDvalue);
            }
            else
            {
                return(string.Empty);
            }
        }
Ejemplo n.º 2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            IDreadform id = new IDreadform(idport);

            if (id.ShowDialog() == DialogResult.OK)
            {
                string stid = id.IDvalue.Split(',')[1];
                if (admin_list.Contains(stid))
                {
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("管理者リストに登録されてない学籍番号です。お店の方をお呼びください。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
Ejemplo n.º 3
0
        private void Button2_Click(object sender, EventArgs e)
        {
            IDreadform form = new IDreadform(idserialport.Text);

            if (form.ShowDialog() == DialogResult.OK)
            {
                string id = form.IDvalue.Split(',')[1];
                if (!admin.ToString().Contains(id))
                {
                    admin.Add(id);
                    adminlist.Items.Add(id);
                }
                else
                {
                    MessageBox.Show("登録済みの管理者です。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }