/// <summary>
        /// Get Table details
        /// </summary>
        /// <param name="ctx"></param>
        /// <returns></returns>
        public List <GenXModelGetTableClass> GenXModelGetTable(Ctx ctx)
        {
            List <GenXModelGetTableClass> obj = new List <GenXModelGetTableClass>();

            string  strQuery = "select Name, AD_TABLE_ID,TableName from AD_TABLE order by name";
            DataSet ds       = DB.ExecuteDataset(strQuery, null);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    GenXModelGetTableClass tb = new GenXModelGetTableClass();
                    tb.AD_Table_ID = Util.GetValueOfInt(ds.Tables[0].Rows[i]["AD_TABLE_ID"]);
                    tb.Name        = Util.GetValueOfString(ds.Tables[0].Rows[i]["Name"]);
                    obj.Add(tb);
                }
            }

            return(obj);
        }
        /// <summary>
        /// Get Table details
        /// </summary>
        /// <param name="ctx"></param>
        /// <returns></returns>
        public List <GenXModelGetTableClass> GenXModelGetTable(Ctx ctx)
        {
            List <GenXModelGetTableClass> obj = new List <GenXModelGetTableClass>();

            string strQuery = "SELECT Name, AD_TABLE_ID,TableName FROM AD_TABLE ORDER BY NAME";

            strQuery = MRole.GetDefault(ctx).AddAccessSQL(strQuery, "AD_TABLE", true, true);
            DataSet ds = DB.ExecuteDataset(strQuery, null);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    GenXModelGetTableClass tb = new GenXModelGetTableClass();
                    tb.AD_Table_ID = Util.GetValueOfInt(ds.Tables[0].Rows[i]["AD_TABLE_ID"]);
                    tb.Name        = Util.GetValueOfString(ds.Tables[0].Rows[i]["Name"]);
                    obj.Add(tb);
                }
            }

            return(obj);
        }