Beispiel #1
0
        private void simpleButtonUpdatePic_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = xtraOpenFileDialogUpdatePic.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                if (xtraOpenFileDialogUpdatePic.CheckFileExists)
                {
                    bllMember.MemberInfoUpdate(member, xtraOpenFileDialogUpdatePic.FileName);
                    ShowPicture();
                    MessageBox.Show("Bilgiler butonundaki fotoğrafın değişmesi için hesabınızdan çıkış yapıp tekrar giriş yapmanız gerekmektedir.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
        private void simpleButtonUpdateInfo_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Bilgilerinizi güncellemek istediğinize emin misiniz?", "Soru", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                bool?smoke;
                if (radioGroupSmoke.SelectedIndex == 0)
                {
                    smoke = null;
                }
                else if (radioGroupSmoke.SelectedIndex == 1)
                {
                    smoke = true;
                }
                else
                {
                    smoke = false;
                }
                MemberEnumGender memberGender = (MemberEnumGender)radioGroupGender.Properties.Items[radioGroupGender.SelectedIndex].Value;
                int updateResult = bllMember.MemberInfoUpdate(member, textEditName.Text, textEditSurname.Text, memberGender, dateEditBirthday.DateTime, numericUpDownHeight.Value, numericUpDownWeight.Value, smoke, textEditPhone.Text, textEditMail.Text, comboBoxEditCity.Text, comboBoxEditCounty.Text);
                if (updateResult == 1)
                {
                    MessageBox.Show("Güncelleme işlemi başarılı.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else if (updateResult == -1)
                {
                    MessageBox.Show("Lütfen yıldızlı alanları eksiksiz doldurunuz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (updateResult == -101)
                {
                    MessageBox.Show("Girilen telefon sistemde mevcut.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else if (updateResult == -102)
                {
                    MessageBox.Show("Girilen mail sistemde mevcut.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }