Esempio n. 1
0
 private void button9_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)
         {
             NgCPobject ng = new NgCPobject();
             ng.Tenngcp = textBox6.Text;
             ng.Cmt     = textBox7.Text;
             ng.Makh    = textBox8.Text;
             if (radNAM.Checked == true)
             {
                 ng.Gt = radNAM.Text;
             }
             else
             {
                 ng.Gt = radNU.Text;
             }
             NgCPcontrol.deleteNCP(ng);
             dataNCP.DataSource = NgCPcontrol.getdataNCP();
         }
     }
     catch { }
 }
Esempio n. 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();
 }
Esempio n. 3
0
 private void button8_Click(object sender, EventArgs e)
 {
     try
     {
         NgCPobject ng = new NgCPobject();
         ng.Tenngcp = textBox6.Text;
         ng.Cmt     = textBox7.Text;
         ng.Makh    = textBox8.Text;
         if (this.radNAM.Checked == true)
         {
             ng.Gt = radNAM.Text;
         }
         if (this.radNU.Checked == true)
         {
             ng.Gt = radNU.Text;
         }
         NgCPcontrol.updateNCP(ng);
         dataNCP.DataSource = NgCPcontrol.getdataNCP();
     }
     catch { }
 }
Esempio n. 4
0
 private void button10_Click(object sender, EventArgs e)
 {
     dataNCP.DataSource = NgCPcontrol.getdataNCP();
 }