public static void UpdateKhachHang(KhachHangModel KhachHang)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         cnn.Execute("update KhachHang set TENKH = @TenKH,DIACHI = @DiaChi ,SDT = @SDT, MAKHUVUC = @MaKhuVuc ,EMAIL = @Email WHERE MAKH = @MaKH", KhachHang);
     }
 }
 public static void RemoveKhachHang(KhachHangModel KhachHang)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         cnn.Execute("DELETE FROM KhachHang WHERE MAKH=@MaKH", KhachHang);
     }
 }
 public static long SaveKhachHang(KhachHangModel khachHang)
 {
     Console.WriteLine(khachHang.MaKH);
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         long lastRowID = (long)cnn.ExecuteScalar("insert into KhachHang(TENKH,DIACHI,SDT,MAKHUVUC,EMAIL) values (@TenKH,@DiaChi,@SDT,@MaKhuVuc,@Email); SELECT last_insert_rowid()", khachHang);
         //lastRowID dùng để xác định ID của một hàng vừa được thêm vào.
         return(lastRowID);
     }
 }