private void cmdAdd_Click(object sender, EventArgs e)
 {
     CreateUser frmNewuser = new CreateUser();
     frmNewuser.init(datafile, false);
     frmNewuser.ShowDialog();
     refreshdata();
 }
Exemplo n.º 2
0
        private void nhapThongTinNguoiDungToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreateUser frmNewuser = new CreateUser();

            frmNewuser.init(dbFileName, false);
            frmNewuser.ShowDialog();
        }
Exemplo n.º 3
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            CreateUser frmNewuser = new CreateUser();

            frmNewuser.init(datafile, false);
            frmNewuser.ShowDialog();
            refreshdata();
        }
Exemplo n.º 4
0
        private void createUserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreateUser frmCreateUser = new CreateUser();

            frmCreateUser.Text = "Them nguoi dung";
            frmCreateUser.init(dbFileName, false);
            frmCreateUser.ShowDialog();
            if (frmCreateUser.created == false)
            {
                MessageBox.Show("Khong tao duoc nguoi dung!");
            }
            return;
        }
Exemplo n.º 5
0
        private void MainPoint_Load(object sender, EventArgs e)
        {
            string          sqlString;
            OleDbDataReader oleReader;

            config();
            userdb    = new db(dbFileName);
            sqlString = "SELECT * FROM QUANLYUSER WHERE [Username] = 'admin'";
            oleReader = userdb.genDataReader(sqlString);
            if (oleReader == null)
            {
                this.Close();
                Application.Exit();
                return;
            }
            if (!oleReader.Read())
            {
                CreateUser frmCreateUser = new CreateUser();
                frmCreateUser.Text = "Khoi tao user admin cho he thong";
                frmCreateUser.init(dbFileName, true);
                frmCreateUser.ShowDialog();
                if (frmCreateUser.created == false)
                {
                    this.Close();
                }
                return;
            }
            Login frmLogin = new Login();

            frmLogin.init(dbFileName);
            frmLogin.ShowDialog();
            if (frmLogin.logined == false)
            {
                this.Close();
            }
            username = frmLogin.user;
            check_role(username);
//            userdb.Batch_Process();
        }
Exemplo n.º 6
0
 private void MainPoint_Load(object sender, EventArgs e)
 {
     string sqlString;
     OleDbDataReader oleReader;
     config();
     userdb = new db(dbFileName, dbuser, dbport);
     sqlString = "SELECT * FROM QUANLYUSER";
     oleReader = userdb.genDataReader(sqlString);
     if (oleReader == null)
     {
         this.Close();
         Application.Exit();
         return;
     }
     if (!oleReader.Read())
     {
         CreateUser frmCreateUser = new CreateUser();
         frmCreateUser.Text = "Khoi tao user admin cho he thong";
         frmCreateUser.init(dbFileName, dbuser, dbport, true);
         frmCreateUser.ShowDialog();
         if (frmCreateUser.created == false)
             this.Close();
         return;
     }
     Login frmLogin = new Login();
     frmLogin.init(dbFileName, dbuser, dbport);
     frmLogin.ShowDialog();
     if (frmLogin.logined == false)
         this.Close();
     username = frmLogin.user;
     check_role(username);
 }
Exemplo n.º 7
0
 private void createUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CreateUser frmCreateUser = new CreateUser();
     frmCreateUser.Text = "Them nguoi dung";
     frmCreateUser.init(dbFileName, dbuser, dbport, false);
     frmCreateUser.ShowDialog();
     if (frmCreateUser.created == false)
         MessageBox.Show("Khong tao duoc nguoi dung!");
     return;
 }
Exemplo n.º 8
0
 private void nhapThongTinNguoiDungToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CreateUser frmNewuser = new CreateUser();
     frmNewuser.init(dbFileName, false);
     frmNewuser.ShowDialog();
 }