Exemplo n.º 1
0
        private void BtSubmit_Click(object sender, EventArgs e)
        {
            String           mailaddress = Tbid.Text;
            String           pass        = Tbpass.Text;
            MySqlDataAdapter da          = quote.login(mailaddress, pass);
            DataTable        dt          = new DataTable();

            da.Fill(dt);
            if (dt.Rows.Count >= 1)
            {
                Loginstr login = new Loginstr();

                login.employeeIdSet(dt.Rows[0][0].ToString());
                login.employeeNameSet(dt.Rows[0][1].ToString());
                Top top = new Top(login);

                this.Hide();
                top.ShowDialog();
                top.Dispose();
            }
            else
            {
                MessageBox.Show("IDまたはパスワードが異なります", "エラー", MessageBoxButtons.OK);
                return;
            }
        }
Exemplo n.º 2
0
        public Top(Loginstr login)
        {
            InitializeComponent();
            this.login = login;
            String empname = login.employeeNameGet();

            LName.Text = "ようこそ" + empname + "さん";
        }