예제 #1
0
        public static Klienti Map(DataRow Row)
        {
            Klienti klienti = new Klienti();

            klienti.ID   = Helper.SantitizeLong(Row["ID"]);
            klienti.Emri = Helper.SanitizeString(Row["Emri"]);
            return(klienti);
        }
예제 #2
0
        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);
        }
예제 #3
0
 private void MapThis(Klienti klienti)
 {
     this.ID   = klienti.ID;
     this.Emri = klienti.Emri;
 }