Exemplo n.º 1
0
        private void simpleButtonRegister_Click(object sender, EventArgs e)
        {
            MemberEnumGender memberGender = (MemberEnumGender)radioGroupGender.Properties.Items[radioGroupGender.SelectedIndex].Value;

            int result = bllMember.MemberRegister(memberGender, textEditSsn.Text, textEditPassword.Text, textEditName.Text, textEditSurname.Text, textEditPhone.Text, textEditMail.Text, dateEditBirthday.DateTime);

            if (result == 1)
            {
                MessageBox.Show("Kaydınız başarıyla tamamlandı.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (result == -1)
            {
                MessageBox.Show("Lütfen yıldızlı alanları eksiksiz doldurunuz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (result == -100)
            {
                MessageBox.Show("Girilen TC sistemde mevcut.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (result == -101)
            {
                MessageBox.Show("Girilen telefon sistemde mevcut.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (result == -102)
            {
                MessageBox.Show("Girilen mail sistemde mevcut.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                MessageBox.Show("Bir şeyler yanlış gitti. Lütfen sistem yöneticinizle görüşünüz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }