コード例 #1
0
        protected override EventJournal doGet(int ID)
        {
            m_command.CommandText = APDebitNote.GetByIDSQL(ID);
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            APDebitNote st = APDebitNote.TransformReader(r);

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

            r.Close();
            foreach (APDebitNoteItem sti in stis)
            {
                sti.EVENT_JOURNAL = st;
                //sti.VENDOR = PartRepository.GetByID(m_command, sti.PART.ID);
                sti.VENDOR_BALANCE_ENTRY = VendorBalanceEntryRepository.FindVendorBalanceEntryByEventItem(m_command, sti.ID, sti.VENDOR_BALANCE_ENTRY_TYPE);
                //sti.GRN_ITEM = GoodReceiveNoteRepository.FindGoodReceiveNoteItem(m_command, sti.GRN_ITEM.ID);
                //sti.GRN_ITEM.PART = PartRepository.GetByID(m_command, sti.GRN_ITEM.PART.ID);
                if (sti.PURCHASE_RETURN != null)
                {
                    if (sti.PURCHASE_RETURN.ID > 0)
                    {
                        sti.PURCHASE_RETURN = PurchaseReturnRepository.GetPurchaseReturnForDebitNote(m_command, sti.PURCHASE_RETURN);
                    }
                }
                st.EVENT_JOURNAL_ITEMS.Add(sti);
            }
            return(st);
        }
コード例 #2
0
        public static APDebitNote FindAPDNForPayment(MySql.Data.MySqlClient.MySqlCommand m_command, int apdnID)
        {
            m_command.CommandText = APDebitNote.GetByIDSQL(apdnID);
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            APDebitNote reuslt = APDebitNote.TransformReader(r);

            r.Close();
            return(reuslt);
        }
コード例 #3
0
        public override EventJournal FindLastCodeAndTransactionDate(string codesample)
        {
            m_command.CommandText = APDebitNote.FindLastCodeAndTransactionDate(codesample);
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            EventJournal e = APDebitNote.TransformReader(r);

            r.Close();
            return(e);
        }
コード例 #4
0
        internal static IList FindAPDNByPurchaseReturn(MySql.Data.MySqlClient.MySqlCommand cmd, int prID)
        {
            cmd.CommandText = APDebitNoteItem.GetAPDNItemByPRID(prID);
            MySql.Data.MySqlClient.MySqlDataReader r = cmd.ExecuteReader();
            IList result = APDebitNoteItem.TransformReaderList(r);

            r.Close();
            foreach (APDebitNoteItem i in result)
            {
                cmd.CommandText = APDebitNote.GetByIDSQL(i.EVENT_JOURNAL.ID);
                r = cmd.ExecuteReader();
                i.EVENT_JOURNAL = APDebitNote.TransformReader(r);
                r.Close();
            }
            return(result);
        }