コード例 #1
0
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     CreateUser frmNewuser = new CreateUser();
     frmNewuser.init(datafile, false);
     frmNewuser.ShowDialog();
     refreshdata();
 }
コード例 #2
0
        private void nhapThongTinNguoiDungToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreateUser frmNewuser = new CreateUser();

            frmNewuser.init(dbFileName, false);
            frmNewuser.ShowDialog();
        }
コード例 #3
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            CreateUser frmNewuser = new CreateUser();

            frmNewuser.init(datafile, false);
            frmNewuser.ShowDialog();
            refreshdata();
        }
コード例 #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;
        }
コード例 #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();
        }
コード例 #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);
 }
コード例 #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;
 }
コード例 #8
0
 private void nhapThongTinNguoiDungToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CreateUser frmNewuser = new CreateUser();
     frmNewuser.init(dbFileName, false);
     frmNewuser.ShowDialog();
 }