Beispiel #1
0
        public static bool Push(NArtikujt artikulli, double sasia)
        {
            bool check = true;

            try
            {
                var magazina = Magazina.GetMagazina(artikulli.ID);

                if (artikulli == null)
                {
                    check = false;
                }
                else
                {
                    connection.UpdateInsert("UPDATE Magazina SET Sasia = '" + (magazina.Sasia + sasia) + "' WHERE NArtikullID=" + magazina.NArtikull.ID);
                    check = true;
                }
            }
            catch (Exception e)
            {
                return(false);
            }
            return(check);
        }
Beispiel #2
0
        public static OleDbCommand AddMagazina(NArtikujt artikulli, double sasia)
        {
            var mgz = Magazina.GetMagazina(artikulli.ID);

            return(new OleDbCommand("UPDATE Magazina SET Sasia = '" + (mgz.Sasia + sasia) + "' WHERE NArtikullID=" + mgz.NArtikull.ID));
        }