Esempio n. 1
0
        public List <OrderUser> GetPersonIdOrderId(int offer_id)
        {
            UserQuery userQuery = new UserQuery(language);

            System.Data.DataTable dataTable = conn_db.ReadTable(userQuery.GetPersonIdOrderId(offer_id));

            List <OrderUser> users = new List <OrderUser>();

            if (dataTable.Rows.Count == 0)
            {
                throw new EmptyViewException(language);
            }


            foreach (System.Data.DataRow row in dataTable.Rows)
            {
                OrderUser user = new OrderUser();
                user.userId        = row["user_id"] is DBNull ? 0 : Convert.ToInt32(row["user_id"]);
                user.OrderIdentity = row["ORDER_IDENTITY"].ToString();
                users.Add(user);
            }


            return(users);
        }