Пример #1
0
 private void btn_themp_Click(object sender, EventArgs e)
 {
     ServiceReference1.phong objuse = new ServiceReference1.phong();
     objuse.Ma    = txt_maphong.Text;
     objuse.Ten   = txt_tenphong.Text;
     objuse.SDT   = txt_SDTphong.Text;
     objuse.Email = txt_emailphong.Text;
     nv.InsertUserDetails(objuse);
     show();
 }
Пример #2
0
 private void btn_them_Click(object sender, EventArgs e)
 {
     ServiceReference1.phong objuse = new ServiceReference1.phong();
     objuse.Ma    = txt_ma.Text;
     objuse.Ten   = txt_ten.Text;
     objuse.SDT   = txt_sdt.Text;
     objuse.Email = txt_email.Text;
     objService.InsertUserDetails(objuse);
     showdata();
 }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     ServiceReference1.phong objuse = new ServiceReference1.phong();
     objuse.Ma = (string)dgv_phongban.CurrentRow.Cells[0].Value;
     nv.DeleteUserDetails(objuse);
     show();
     txt_maphong.Text    = "";
     txt_tenphong.Text   = "";
     txt_SDTphong.Text   = "";
     txt_emailphong.Text = "";
 }
Пример #4
0
 private void btn_xoa_Click(object sender, EventArgs e)
 {
     ServiceReference1.phong objuse = new ServiceReference1.phong();
     objuse.Ma = (string)dgv_phongban.CurrentRow.Cells[0].Value;
     objService.DeleteUserDetails(objuse);
     showdata();
     txt_ma.Text    = "";
     txt_ten.Text   = "";
     txt_sdt.Text   = "";
     txt_email.Text = "";
 }
Пример #5
0
 private void btn_suap_Click(object sender, EventArgs e)
 {
     ServiceReference1.phong objuse = new ServiceReference1.phong();
     objuse.Ma    = this.dgv_phongban.CurrentRow.Cells[0].Value.ToString();
     objuse.Ten   = txt_tenphong.Text;
     objuse.SDT   = txt_SDTphong.Text;
     objuse.Email = txt_emailphong.Text;
     nv.Updatephongban(objuse);
     show();
     txt_maphong.Text    = "";
     txt_tenphong.Text   = "";
     txt_SDTphong.Text   = "";
     txt_emailphong.Text = "";
 }