Пример #1
0
 public Login()
 {
     InitializeComponent();
     Kelas.Koneksi con = new Kelas.Koneksi();
     Kelas.Query   qr  = new Kelas.Query();
     con.DebugCon();
 }
Пример #2
0
 public void tampil(String q)
 {
     qr = new Kelas.Query();
     qr.ShowAll(q, "Employee", dg_employee);
     dg_employee.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     dg_employee.AllowUserToAddRows  = false;
 }
        public UserData()
        {
            InitializeComponent();
            Kelas.Query qr = new Kelas.Query();
            String      q  = "SELECT * FROM users WHERE users.UseId=detail.UseId";

            qr.ShowAll(q, "users", dg_user);
            dg_user.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dg_user.AllowUserToAddRows  = false;
            dg_user.Refresh();
            qr.ShowBox(q, "UseId", cb1);
        }
Пример #4
0
        public Employee()
        {
            InitializeComponent();
            qr = new Kelas.Query();
            String q = "SELECT * from Employee";

            tampil(q);
            qr.ShowBox("SELECT * FROM Job", "Name", cm_job);
            clear();
            button(1);
            id.Visible = false;
        }
Пример #5
0
 private void btn_hapus_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Apakah Anda yakin?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         int         rsl;
         Kelas.Query key = new Kelas.Query();
         rsl = key.InUpDel(Query(3));
         if (rsl == 1)
         {
             clear();
             TampilData("SELECT * FROM tbl_buku", "tbl_buku");
             EditOFF(false);
             MessageBox.Show("Data Berhasil Di Hapus", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("Data Gagal Di Hapus", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #6
0
 private void btn_simpan_Click(object sender, EventArgs e)
 {
     if (falid_input() == 1)
     {
         int         rsl;
         Kelas.Query key = new Kelas.Query();
         rsl = key.InUpDel(Query(1));
         if (rsl == 1)
         {
             MessageBox.Show("Data Berhasil Di Simpan", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
             clear();
             TampilData("SELECT * FROM tbl_buku", "tbl_buku");
             EditOFF(false);
         }
         else
         {
             MessageBox.Show("Data Berhasil Di Simpan", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("Periksa Kembali inputan anda!", "INPORMASI", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }