예제 #1
0
        public static List <OleDbCommand> SaveArtikullFature(ArtikullFature artikullFature)
        {
            return(new List <OleDbCommand>()
            {
                new OleDbCommand("INSERT INTO ArtikullFature (NoFature, NArtikullID, Sasia, Cmimi) " +
                                 "VALUES (" +
                                 "'" + artikullFature.NoFature + "', " +
                                 "'" + artikullFature.NArtikull.ID + "', " +
                                 "'" + artikullFature.Sasia + "', " +
                                 "'" + artikullFature.Cmimi + "'" +
                                 ")"
                                 ),

                Magazina.SaveMagazina(artikullFature.NArtikull, artikullFature.Sasia)
            });
        }
예제 #2
0
        public bool _Save()
        {
            List <OleDbCommand> oleDbCommands = new List <OleDbCommand>();

            try
            {
                oleDbCommands.Add(FatureDalje.SaveFatureDalje(this.fature));
                foreach (var artikull in this.artikujt)
                {
                    oleDbCommands.AddRange(ArtikullFature.SaveArtikullFature(artikull));
                }

                return(conn.UpdateInsert(oleDbCommands));
            }
            catch (Exception e)
            {
                return(false);
            }
        }