Example #1
0
        public void Binding()
        {
            DataSet data = new muserCRUD().getData();

            //data.geData();
            dtGrid.DataSource = data;
            dtGrid.DataMember = "tblmuser";
        }
Example #2
0
        private void RecordTSB_Click(object sender, EventArgs e)
        {
            DataSet data = new muserCRUD().getData(txtUserID.Text, txtName.Text);

            dtGrid.DataSource = data;
            dtGrid.DataMember = "tblmuser";
            SimpanTSB.Enabled = false;
            UbahTSB.Enabled   = true;
            dtGrid.Enabled    = true;
        }
Example #3
0
        private void login()
        {
            //simpan properties
            Properties.Settings.Default.Server   = txtServer.Text;
            Properties.Settings.Default.Database = txtDatabase.Text;
            Properties.Settings.Default.UserID   = txtUser.Text;
            Properties.Settings.Default.Save();

            DataSet data = new muserCRUD().getLogin(txtUser.Text, txtPassword.Text);

            if (data.Tables[0].Rows.Count > 0)
            {
                GlobalVariables.GUserID   = data.Tables[0].Rows[0]["USERID"].ToString();
                GlobalVariables.GName     = data.Tables[0].Rows[0]["NAME"].ToString();
                GlobalVariables.GDIV      = data.Tables[0].Rows[0]["GDIV"].ToString();
                GlobalVariables.GPassword = txtPassword.Text;
                AddItemCallback(data.Tables[0].Rows[0]["USERID"].ToString(), data.Tables[0].Rows[0]["NAME"].ToString(), data.Tables[0].Rows[0]["GDIV"].ToString());
                this.Dispose();
            }
            else
            {
                MessageBox.Show("Login gagal, silahkan di cek lagi user dan paswword");
            }
        }