Esempio n. 1
0
        private void start_btn_Click(object sender, EventArgs e)
        {
            idd = txtId.Text;
            int flag = 0;

            flag = ClsUsers.login2(txtId.Text);
            if (flag == 1)
            {
                Random random = new Random();
                emot = random.Next(1000, 10000);
                ClsUsers.SendMessege(emot, PhNumber, Email);
                emotform emf = new emotform();
                emf.Show();
                Hide();
            }
            else
            {
                flag = ClsUsers.login1(txtId.Text);
                if (flag == 1)
                {
                    Random random = new Random();
                    emot = random.Next(1000, 10000);
                    ClsUsers.SendMessege(emot, PhNumber, Email);
                    emotform emf = new emotform();
                    emf.Show();
                    Hide();
                }
            }
        }
Esempio n. 2
0
        private void start_btn_Click(object sender, EventArgs e)
        {
            if (int.Parse(id_txt.Text) == login.emot)
            {
                int flag = 0;

                flag = ClsUsers.login2(id);
                if (flag == 1)
                {
                    Menahel men = new Menahel();
                    flag = 0;
                    men.Show();
                    Close();
                }
                else
                {
                    flag = ClsUsers.login1(id);
                    if (flag == 1)
                    {
                        BuyingForm bf = new BuyingForm();
                        flag = 0;
                        bf.Show();
                        Close();
                    }
                }
            }
        }