private void add_Click(object sender, EventArgs e)
 {
     if (valid())
     {
         qr.InUpDel(GetQuery(1), "Data Bsrhasil di simpan");
     }
     Show(GetQuery(3));
     cls();
 }
示例#2
0
 private void add_Click(object sender, EventArgs e)
 {
     if (valid())
     {
         qr.InUpDel(GetQuery(1), "Data Saved Success!");
         cls();
     }
     Show(GetQuery(3));
 }
 private void del_Click(object sender, EventArgs e)
 {
     if (label7.Text != "label7")
     {
         cls();
         if (MessageBox.Show("Really Delete Data?", "INFO", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             qr.InUpDel(GetQuery(10), "Data Deleted Success!");
         }
     }
     else
     {
         MessageBox.Show("Select Data From Data Grid!");
     }
     Show(GetQuery(3));
 }
示例#4
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);
         }
     }
 }
示例#5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (psw.Text != "" && old.Text != "" && confirm.Text != "")
     {
         if (qr.GetData(GetQuery(1), "IDKariawan") != null)
         {
             if (psw.Text == confirm.Text)
             {
                 qr.InUpDel(GetQuery(2), "Password is Change!");
             }
             else
             {
                 MessageBox.Show("Password Not Match!");
             }
         }
         else
         {
             MessageBox.Show("Your Password Not registed!");
         }
     }
 }
示例#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);
     }
 }