public static Klienti Map(DataRow Row) { Klienti klienti = new Klienti(); klienti.ID = Helper.SantitizeLong(Row["ID"]); klienti.Emri = Helper.SanitizeString(Row["Emri"]); return(klienti); }
public static List <Klienti> GetKlientet() { List <Klienti> klientet = new List <Klienti>(); try { string getNArtikujt = "SELECT * FROM Klientet"; var tb = connection.Read(getNArtikujt); foreach (DataRow row in tb.Rows) { klientet.Add(Klienti.Map(row)); } } catch (Exception e) { } return(klientet); }
private void MapThis(Klienti klienti) { this.ID = klienti.ID; this.Emri = klienti.Emri; }