//public static CustomerOutStandingInvoiceItem FindGRNItem(MySql.Data.MySqlClient.MySqlCommand cmd, int grnIID) //{ // cmd.CommandText = CustomerOutStandingInvoiceItem.FindByGrnItemIDSQL(grnIID); // MySql.Data.MySqlClient.MySqlDataReader r = cmd.ExecuteReader(); // CustomerOutStandingInvoiceItem res = CustomerOutStandingInvoiceItem.TransformReader(r); // r.Close(); // cmd.CommandText = CustomerOutStandingInvoice.GetByIDSQL(res.EVENT.ID); // r = cmd.ExecuteReader(); // res.EVENT = CustomerOutStandingInvoice.TransformReader(r); // r.Close(); // return res; //} protected override IList doSearch(string find) { try { m_command.CommandText = CustomerOutStandingInvoice.GetSearch(find); MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader(); IList rest = CustomerOutStandingInvoice.TransformReaderList(r); r.Close(); return(rest); } catch (Exception x) { throw x; } }
public IList GetAllTransactions(int supID) { ArrayList result = new ArrayList(); OpenConnection(); MySql.Data.MySqlClient.MySqlDataReader r; m_cmd.CommandText = SalesOrder.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList po = SalesOrder.TransformReaderList(r); r.Close(); foreach (Event e in po) { result.Add(e); } m_cmd.CommandText = DeliveryOrder.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList grn = DeliveryOrder.TransformReaderList(r); r.Close(); foreach (Event e in grn) { result.Add(e); } m_cmd.CommandText = CustomerInvoice.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList si = CustomerInvoice.TransformReaderList(r); r.Close(); foreach (Event e in si) { result.Add(e); } m_cmd.CommandText = POS.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList pos = POS.TransformReaderList(r); r.Close(); foreach (Event e in pos) { result.Add(e); } m_cmd.CommandText = SalesReturn.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList pr = SalesReturn.TransformReaderList(r); r.Close(); foreach (Event e in pr) { result.Add(e); } m_cmd.CommandText = ARCreditNote.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList apdn = ARCreditNote.TransformReaderList(r); r.Close(); foreach (EventJournal e in apdn) { result.Add(e); } m_cmd.CommandText = Receipt.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList py = Receipt.TransformReaderList(r); r.Close(); foreach (EventJournal e in py) { result.Add(e); } m_cmd.CommandText = CustomerOutStandingInvoice.GetByCustomerSQL(supID); r = m_cmd.ExecuteReader(); IList soi = CustomerOutStandingInvoice.TransformReaderList(r); r.Close(); foreach (EventJournal e in soi) { result.Add(e); } result.Sort(new EventDateComparer()); return(result); }