public static void UpdateNhaCungCap(NhaCungCapModel nhaCC)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         cnn.Execute("update NHACUNGCAP set TENNCC=@tenNCC, DIACHI = @diaChi, DIENTHOAI = @dienThoai, MAKHUVUC = @maKhuVuc, EMAIL = @email  WHERE MANCC = @maNCC", nhaCC);
     }
 }
 public static void RemoveNhaCungCap(NhaCungCapModel nhaCC)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         cnn.Execute("DELETE FROM NHACUNGCAP WHERE MANCC = @maNCC", nhaCC);
     }
 }
 public static long SaveNhaCungCap(NhaCungCapModel nhaCC)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         long lastRowID = (long)cnn.ExecuteScalar("insert into NHACUNGCAP(TENNCC,DIACHI,DIENTHOAI, MAKHUVUC, EMAIL) values (@tenNCC,@diaChi,@dienThoai, @maKhuVuc, @email); SELECT last_insert_rowid()", nhaCC);
         //lastRowID dùng để xác định ID của một hàng vừa được thêm vào.
         return(lastRowID);
     }
 }