private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            Multselectform multf = new Multselectform();

            multf.lgtime   = keeptime;
            multf.lgusname = keepusname;
            multf.lgustype = keepustype;
            multf.ShowDialog();
            this.Close();
        }
Beispiel #2
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            string account = this.txtacc.Text;
            string passd   = this.txtpass.Text;

            if ((account == "") || (passd == ""))
            {
                MessageBox.Show("Please enter account or password !");
                return;
            }
            else
            {
                try
                {
                    Operatedbclass operatedb = new Operatedbclass();
                    if (operatedb.Finduserpass(account) == passd)
                    {
                        Multselectform multslf = new Multselectform();
                        multslf.lgusname = account;
                        multslf.lgustype = operatedb.Findusertype(account);
                        multslf.lgtime   = DateTime.Now.ToString();
                        this.Hide();
                        multslf.ShowDialog();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Password error !");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Some error happened " + ex.Message + "");
                }
            }
        }