Esempio n. 1
0
        public static OpeningStock GetHeaderOnly(MySql.Data.MySqlClient.MySqlCommand cmd, int poID)
        {
            cmd.CommandText = OpeningStock.GetByIDSQL(poID);
            MySql.Data.MySqlClient.MySqlDataReader r = cmd.ExecuteReader();
            OpeningStock st = OpeningStock.TransformReader(r);

            r.Close();
            return(st);
        }
Esempio n. 2
0
        public override Event FindLastCodeAndTransactionDate(string codesample)
        {
            m_command.CommandText = OpeningStock.FindLastCodeAndTransactionDate(codesample);
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            Event e = OpeningStock.TransformReader(r);

            r.Close();
            return(e);
        }
Esempio n. 3
0
        public OpeningStock GetOpeningStockByNotes(string note)
        {
            m_command.CommandText = OpeningStock.GetByNotesSQL(note);
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            OpeningStock st = OpeningStock.TransformReader(r);

            r.Close();
            m_command.CommandText = OpeningStockItem.GetByEventIDSQL(st.ID);
            r = m_command.ExecuteReader();
            IList stis = OpeningStockItem.TransformReaderList(r);

            r.Close();
            foreach (OpeningStockItem sti in stis)
            {
                sti.EVENT            = st;
                sti.PART             = PartRepository.GetByID(m_command, sti.PART.ID);
                sti.STOCK_CARD_ENTRY = StockCardEntryRepository.FindStockCardEntryByEventItem(m_command, sti.ID, sti.STOCK_CARD_ENTRY_TYPE);
                st.EVENT_ITEMS.Add(sti);
            }
            return(st);
        }