Beispiel #1
0
        private bool isFromValid()
        {
            if (txtAge.Text == "")
            {
                MessageBox.Show("กรุณาเลือกวันเกิด");
                return(false);
            }
            if (!chkMale.Checked && !chkFemale.Checked)
            {
                MessageBox.Show("กรุณาเลือกเพศ");
                return(false);
            }

            if (string.IsNullOrEmpty(textBox1.Text) && string.IsNullOrEmpty(comboBox1.SelectedText) && string.IsNullOrEmpty(textBox2.Text))
            {
                MessageBox.Show("กรุณากรอกวันเกิดให้ครบ");
                return(false);
            }
            if (string.IsNullOrEmpty(lblFingerPrint.Text))
            {
                // MessageBox.Show("กรุณาเก็บลายนิ้วมือ");
                var dialogForm = new DialogForm("Exclusive Gym", "คุณยังไม่ได้เก็บลายนิ้วมือต้องการจะเก็บเลยหรือไม่");
                if (dialogForm.ShowDialog() == DialogResult.OK)
                {
                    ShowRecordFingerprint();
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            return(true);
        }
Beispiel #2
0
        private void DisplayNeedRegistryForm()
        {
            var dialogForm = new DialogForm("Exclusive Gym", "ไม่พบข้อมูลสมาชิก ต้องการสมัครสมาชิกใหม่หรือไม่");

            if (dialogForm.ShowDialog() == DialogResult.OK)
            {
                OpenMemberForm();
            }
        }