예제 #1
0
 private void txttimdichvu_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         //enter key is down
         dataGridView3.DataSource = Dichvucontrol.getdatadv();
     }
 }
예제 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     dataGridPHONG.DataSource     = Phongcontrol.getdatap();
     dataGridView2.DataSource     = Khachhangcontrol.getdataK();
     dataGridView3.DataSource     = Dichvucontrol.getdatadv();
     datDOAN.DataSource           = Doancontrol.getdatadoan();
     dataNCP.DataSource           = NgCPcontrol.getdataNCP();
     dataNV.DataSource            = Nhanviencontrol.getdatanv();
     datap_thue.DataSource        = P_Thuecontrol.getdatap_thue();
     datachitietp_thue.DataSource = Chitietp_Thuecontrol.getdatactThue();
     dathoadon.DataSource         = Hoadoncontrol.getdatahd();
 }
예제 #3
0
 private void btnsuadv_Click(object sender, EventArgs e)
 {
     try
     {
         Dichvuobject dv = new Dichvuobject();
         dv.Madv   = txtMADV.Text;
         dv.Tendv  = txtTENDV.Text;
         dv.Giadv  = Int32.Parse(txtGIADV.Text);
         dv.Ghichu = txtghichudv.Text;
         Dichvucontrol.updatedv(dv);
         dataGridView3.DataSource = Dichvucontrol.getdatadv();
     }
     catch { }
 }
예제 #4
0
 private void btnxoadv_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dg = new DialogResult();
         dg = MessageBox.Show("Bạn có muốn xóa không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dg == DialogResult.Yes)
         {
             Dichvuobject dv = new Dichvuobject();
             dv.Madv = txtMADV.Text;
             Dichvucontrol.deletedv(dv);
             dataGridView3.DataSource = Dichvucontrol.getdatadv();
         }
     }
     catch { }
 }
예제 #5
0
 private void button14_Click(object sender, EventArgs e)
 {
     dataGridView3.DataSource = Dichvucontrol.getdatadv();
 }