Example #1
0
        public IEntity Get(MySql.Data.MySqlClient.MySqlDataReader aReader)
        {
            CustomerCategory customercategory = null;

            while (aReader.Read())
            {
                customercategory                        = new CustomerCategory();
                customercategory.ID                     = Convert.ToInt32(aReader[0]);
                customercategory.CODE                   = aReader[1].ToString();
                customercategory.NAME                   = aReader[2].ToString();
                customercategory.MODIFIED_BY            = aReader["modified_by"].ToString();
                customercategory.MODIFIED_DATE          = Convert.ToDateTime(aReader["modified_date"].ToString());
                customercategory.MODIFIED_COMPUTER_NAME = aReader["modified_computer"].ToString();
            }
            return(customercategory);
        }
Example #2
0
        public IList GetAll(MySql.Data.MySqlClient.MySqlDataReader aReader)
        {
            IList result = new ArrayList();

            while (aReader.Read())
            {
                CustomerCategory customercategory = new CustomerCategory();
                customercategory.ID                     = Convert.ToInt32(aReader[0]);
                customercategory.CODE                   = aReader[1].ToString();
                customercategory.NAME                   = aReader[2].ToString();
                customercategory.MODIFIED_BY            = aReader["modified_by"].ToString();
                customercategory.MODIFIED_DATE          = Convert.ToDateTime(aReader["modified_date"].ToString());
                customercategory.MODIFIED_COMPUTER_NAME = aReader["modified_computer"].ToString();
                result.Add(customercategory);
            }
            return(result);
        }