コード例 #1
0
        public static Punetori Map(DataRow row)
        {
            Punetori pn = new Punetori();

            pn.ID      = Helper.SantitizeLong(row["ID"]);
            pn.Emri    = Helper.SanitizeString(row["Emri"]);
            pn.Mbiemri = Helper.SanitizeString(row["Mbiemri"]);
            return(pn);
        }
コード例 #2
0
 private void Map(DataTable table)
 {
     if (table.Rows.Count > 0)
     {
         this.NoFature = Helper.SantitizeLong(table.Rows[0]["NoFature"]);
         this.Date     = Helper.SantitizeDateTime(table.Rows[0]["Data"]);
         this.Klienti  = new Klienti(notValid, Helper.SantitizeLong(table.Rows[0]["KlientiID"]));
         this.Puntori  = new Punetori(notValid, Helper.SantitizeLong(table.Rows[0]["PunetorID"]));
     }
     else
     {
         notValid.Invoke("Artikulli nuk ekziston!");
     }
 }
コード例 #3
0
        public static List <Punetori> GetPunetoret()
        {
            List <Punetori> punetoret = new List <Punetori>();

            try
            {
                string getNArtikujt = "SELECT * FROM Punetoret";
                var    tb           = connection.Read(getNArtikujt);
                foreach (DataRow row in tb.Rows)
                {
                    punetoret.Add(Punetori.Map(row));
                }
            }
            catch (Exception e)
            {
            }
            return(punetoret);
        }
コード例 #4
0
 private void MapThis(Punetori pn)
 {
     this.ID      = pn.ID;
     this.Emri    = pn.Emri;
     this.Mbiemri = pn.Mbiemri;
 }