Пример #1
0
        private void lbl_login_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            EnterAdminForm = this;
            if (LoginAdmin.LoginAdminForm == null)
            {
                LoginAdmin.LoginAdminForm = new LoginAdmin();
            }

            this.Hide();
            LoginAdmin.LoginAdminForm.Show();
        }
Пример #2
0
        private void EnterAdmin_Load(object sender, EventArgs e)
        {
            EnterAdmin.EnterAdminForm = this;

            List <string> strnamer     = new List <string>();
            List <string> strpasswordr = new List <string>();
            List <string> strnamep     = new List <string>();
            List <string> strpasswordp = new List <string>();
            List <string> strnames     = new List <string>();
            List <string> strpasswords = new List <string>();

            Server.Service1 server        = new Server.Service1();
            string[]        strnamer1     = strnamer.ToArray();
            string[]        strpasswordr1 = strpasswordr.ToArray();
            string[]        strnamep1     = strnamep.ToArray();
            string[]        strpasswordp1 = strpasswordp.ToArray();
            string[]        strnames1     = strnames.ToArray();
            string[]        strpasswords1 = strpasswords.ToArray();
            server.SPassRegisteredUsersname(ref strnamer1);
            server.SPassRegisteredUserspassword(ref strpasswordr1);
            int idx = 0;

            foreach (string s in strnamer1)
            {
                UserControl1 uc = new UserControl1(s, strpasswordr1[idx]);
                flowLayoutPanel1.Controls.Add(uc);
                idx++;
            }
            server.SPassToBeRegisteredUsersname(ref strnamep1);
            server.SPassToBeRegisteredUserspassword(ref strpasswordp1);
            idx = 0;
            foreach (string s in strnamep1)
            {
                UserControl2 uc = new UserControl2(s, strpasswordp1[idx]);
                flowLayoutPanel2.Controls.Add(uc);
                idx++;
            }

            server.SPassSuspendedUsersname(ref strnames1);
            server.SPassSuspendedUserspassword(ref strpasswords1);
            idx = 0;
            foreach (string s in strnames1)
            {
                UserControl3 uc = new UserControl3(s, strpasswords1[idx]);
                flowLayoutPanel3.Controls.Add(uc);
                idx++;
            }
        }
Пример #3
0
        private void btn_Login_Click(object sender, EventArgs e)
        {
            Server.Service1 server = new Server.Service1();
            EnterAdmin      p      = new EnterAdmin();
            bool            islogin;
            bool            ispassed;

            server.SLoginAdmin(txt_Email.Text, txt_Password.Text, out islogin, out ispassed);
            if (ispassed)
            {
                if (islogin)
                {
                    p.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("You cant take the seat of Admin now!");
                }
            }
            txt_Password.Clear();
            txt_Email.Clear();
        }