Ejemplo n.º 1
0
        public static object ReadTableInfo(string d, string t)
        {
            DataTable tbInfo = DataAccessCode.ReadTableInfo(d, t);

            return(new
            {
                total = 0,
                rows = from p in tbInfo.AsEnumerable()
                       select new
                {
                    Tindex = p["Tindex"],
                    Tcname = p["Tcname"],
                    Tres = p["Tres"],
                    Ttype = p["Ttype"],
                    Tprec = p["Tprec"],
                    Tweishu = p["Tweishu"],
                    IsKey = p["IsKey"].ToString() == "1" ? "<img src=\"/Content/images/pk.gif\">" : "",
                    IsCanNull = p["IsCanNull"].ToString() == "1" ? "Yes" : "No",
                    Tdefault = p["Tdefault"]
                }
            });
        }