Exemplo n.º 1
0
        private void FormMDI_Load(object sender, EventArgs e)
        {
            lblWelcome.Text = "Selamat Datang! " + clsVariables.sFullname;

            FormSplashScreen SplashScreen = new FormSplashScreen();

            SplashScreen.ShowDialog();

            clsConnection conn = new clsConnection();

            conn.setConnection(clsVariables.sIPAddress, clsVariables.sDbUser, clsVariables.sDbName, clsVariables.sDbPassword);

            isAdmin = clsFunctions.recordExist("SELECT tblusers.usercode, tblusers.usertype FROM tblusers WHERE (tblusers.usertype=1 && tblusers.usercode='" + clsVariables.sUsercode + "') ORDER BY tblusers.autoid ASC", "tblusers");

            usersToolStripMenuItem.Enabled    = isAdmin;
            supplierToolStripMenuItem.Enabled = isAdmin;
        }
Exemplo n.º 2
0
        private void FormLogin_Load(object sender, EventArgs e)
        {
            clsConnection conn = new clsConnection();

            conn.setConnection(clsVariables.sIPAddress, clsVariables.sDbUser, clsVariables.sDbName, clsVariables.sDbPassword);
        }