Exemple #1
0
        public static Issues[] loadByAccountId(long accountId)
        {
            ArrayList list = new ArrayList();

            DataSet ds   = new DataSet();
            Issues  note = new Issues();

            string[] s = new string[1];
            s[0] = accountId.ToString();

            ds   = note.load(SQL_LOAD_BY_ACCOUNT_ID, s);
            note = null;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                note = new Issues();
                note.fill(dr);
                list.Add(note);
                note = null;
            }
            try {
                return((Issues[])list.ToArray(typeof(Issues)));
            } catch {
                return(null);
            }
        }
Exemple #2
0
        public static Issues[] load(long acctId, int field)
        {
            ArrayList list = new ArrayList();
            DataSet   ds   = new DataSet();
            Issues    note = new Issues();
            string    xsql = string.Format("{0}{1};", SQL_LOAD_BY_ACCOUNT_ID_ORDER_BY, orderBy[field]);

            string[] s = new string[1];
            s[0] = acctId.ToString();
            ds   = note.load(xsql, s);
            note = null;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                note = new Issues();
                note.fill(dr);
                list.Add(note);
                note = null;
            }
            try {
                return((Issues[])list.ToArray(typeof(Issues)));
            } catch (Exception ex)
            {
                return(null);
            }
        }
Exemple #3
0
        public static Issues load(long id)
        {
            Issues  note = new Issues();
            DataSet ds   = new DataSet();

            ds = note.loadByPrimaryKey(id.ToString());
            try {
                DataRow dr = ds.Tables[0].Rows[0];
                return(note.fill(dr));
            } catch {
                return(null);
            }
        }
Exemple #4
0
        public static Issues[] loadBySequenceNumber(long sequenceNumber)
        {
            ArrayList list = new ArrayList();

            DataSet ds   = new DataSet();
            Issues  note = new Issues();

            string[] s = new string[1];
            s[0] = sequenceNumber.ToString();

            ds   = note.load(SQL_LOAD_BY_SEQUENCE_NUMBER, s);
            note = null;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                note = new Issues();
                note.fill(dr);
                list.Add(note);
                note = null;
            }
            return((Issues[])list.ToArray(typeof(Issues)));
        }
Exemple #5
0
        public static Issues[] load()
        {
            ArrayList list = new ArrayList();
            DataSet   ds   = new DataSet();
            Issues    note = new Issues();

            ds   = note.loadAll();
            note = null;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                note = new Issues();
                note.fill(dr);
                list.Add(note);
                note = null;
            }
            try {
                return((Issues[])list.ToArray(typeof(Issues)));
            } catch {
                return(null);
            }
        }
Exemple #6
0
        public static Issues[] load(int field)
        {
            ArrayList list = new ArrayList();
            DataSet   ds   = new DataSet();
            Issues    note = new Issues();
            string    xsql = string.Format("{0}{1};", SQL_LOAD_ORDER_BY, orderBy[field]);

            ds   = note.load(xsql, null);
            note = null;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                note = new Issues();
                note.fill(dr);
                list.Add(note);
                note = null;
            }
            try {
                return((Issues[])list.ToArray(typeof(Issues)));
            } catch {
                return(null);
            }
        }