Exemplo n.º 1
0
        void Button1Click(object sender, EventArgs e)
        {
            if (tlog.Text == "" || tpass.Text == "")
            {
                label2.ForeColor = Color.Red;
                label3.ForeColor = Color.Red;
                label4.ForeColor = Color.Red;
            }

            if (tlog.Text != "" && tpass.Text != "" && tfio.Text != "")
            {
                SQLiteCommand CMD = DB.CreateCommand();
                CMD.CommandText = "insert into auth(login,pass,FIO) values(@login,@pass,@FIO)";
                CMD.Parameters.Add("@login", System.Data.DbType.String).Value = tlog.Text;
                CMD.Parameters.Add("@pass", System.Data.DbType.String).Value  = tpass.Text;
                CMD.Parameters.Add("@FIO", System.Data.DbType.String).Value   = tfio.Text;
                SQLiteDataReader SQL = CMD.ExecuteReader();

                MessageBox.Show(string.Format("Сотрудник " + SQL["FIO"] + "зарегистрирован "));
                auth log = new auth();
                this.Hide();
                log.ShowDialog();
                this.Show();
            }
        }
Exemplo n.º 2
0
        void PictureBox1Click(object sender, EventArgs e)
        {
            auth log = new auth();

            this.Hide();
            log.ShowDialog();
            this.Show();
        }