コード例 #1
0
 private void btnThemKH_Them_Click(object sender, EventArgs e)
 {
     try
     {
         KhachHang khachHang = new KhachHang()
         {
             Ho          = txtHo_Them.Text.Trim(),
             Ten         = txtTen_Them.Text.Trim(),
             Email       = txtEmail_Them.Text.Trim(),
             DiaChi      = txtDiaChi_Them.Text.Trim(),
             SoDienThoai = txtSDT_Them.Text.Trim()
         };
         khachHangService.InsertKhachHang(khachHang);
         Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }