public DataTable ReadPosList()
        {
            DataTable ReadListTable = null;

            CConnectSQL ConnectSQL = new CConnectSQL();

            ReadListTable = ConnectSQL.SQLReadData("select dl_id, dl_artname, dl_qua, dl_pricenet, dl_pricebrt, dl_dhid, MAX(dl_id) as maxID from dl_mdokl where dl_dhid = " + ID + " GROUP BY dl_id order by dl_id ");
            SaveTableAsList(ReadListTable);
            ReadMaxID();
            return(ReadListTable);
        }
Beispiel #2
0
        public DataTable ReadList()
        {
            DataTable ReadListTable = null;

            CConnectSQL ConnectSQL = new CConnectSQL();

            ReadListTable = ConnectSQL.SQLReadData("select * from dh_mdokh where dh_id > 0 order by dh_id");
            SaveTableAsList(ReadListTable);

            return(ReadListTable);
        }
        private void ReadMaxID()
        {
            DataTable ReadListTable = null;

            CConnectSQL ConnectSQL = new CConnectSQL();

            ReadListTable = ConnectSQL.SQLReadData("select MAX(dl_id) as maxID from dl_mdokl GROUP BY dl_id order by dl_id ");

            foreach (DataRow dr2 in ReadListTable.Rows)
            {
                if (!DBNull.Value.Equals(dr2["maxID"]))
                {
                    MaxID = Convert.ToInt32(dr2["maxID"]);
                }
            }
        }