Пример #1
0
        private void Label1_Click(object sender, EventArgs e) /*previous_panel_button*/
        {
            CustomerPanel cp = new CustomerPanel();

            //cp.call_succesfull_id_info(save_user_id_info_string);
            cp.call_succesfull_eposta_text(user_id_text, user_name_text, user_surname_text);
            this.Hide();
            cp.Show();
        }
        private void Login_button_Click(object sender, EventArgs e)
        {
            int hatasayac = 0;

            if (customer_radioButton.Checked == true)
            {
                string customer_entrance_confirmed = sign_in_control2(eposta_texttbox.Text, password_textbox.Text);
                if (customer_entrance_confirmed == "evet")
                {
                    try
                    {
                        CustomerPanel cp = new CustomerPanel();
                        cp.call_succesfull_eposta_text(mid, mad, msoyad);
                        //cp.user_id_info_text = kad;
                        hatasayac = hatasayac + 1;
                        this.Hide();
                        cp.Show();
                    }
                    catch (Exception)
                    {
                        if (hatasayac == 0)
                        {
                            MessageBox.Show("Servis Hatası Oluştu !");
                        }
                    }
                }
                else if (customer_entrance_confirmed == "hayir")
                {
                    MessageBox.Show("Girdiğiniz Bilgiler Hatalı !");
                }
            }


            else if (admin_radioButton.Checked == true)
            {
                string admin_entrance_confirmed = sign_in_control(eposta_texttbox.Text, password_textbox.Text);

                if (admin_entrance_confirmed == "evet")
                {
                    try
                    {
                        AdminPanel ap = new AdminPanel();
                        //ap.call_succesfull_eposta_text(kad);
                        ap.call_succesfull_eposta_text(aid, aad, asoyad, apozisyon);
                        hatasayac = hatasayac + 1;
                        this.Hide();
                        ap.Show();
                    }
                    catch (Exception)
                    {
                        if (hatasayac == 0)
                        {
                            MessageBox.Show("Servis Hatası Oluştu");
                        }
                    }
                }
                else if (admin_entrance_confirmed == "hayir")
                {
                    MessageBox.Show("Girdiğiniz Bilgiler Hatalı !");
                }
            }
            else if (admin_radioButton.Checked == false && customer_radioButton.Checked == false)
            {
                MessageBox.Show("Lütfen kullanıcı tipini belirtiniz");
            }


            /* else
             * {
             *   MessageBox.Show("Lütfen kullanıcı tipini belirtiniz");
             * }*/
        }