Exemplo n.º 1
0
        /// <summary>
        /// Generates the source.
        /// </summary>
        /// <returns></returns>
        private DataTable GenerateSource()
        {
            DataTable retVal = new DataTable();

            retVal.Columns.Add(new DataColumn("Id", typeof(string)));
            retVal.Columns.Add(new DataColumn("Title", typeof(string)));
            retVal.Columns.Add(new DataColumn("Description", typeof(string)));
            retVal.Columns.Add(new DataColumn("Category", typeof(string)));
            retVal.Columns.Add(new DataColumn("IconPath", typeof(string)));
            //retVal.Columns.Add(new DataColumn("ShowInfo", typeof(int)));

            foreach (DynamicControlInfo dci in DynamicControlFactory.GetControlInfos())
            {
                DataRow row = retVal.NewRow();

                row["Id"]          = dci.Uid;
                row["Title"]       = CommonHelper.GetResFileString(dci.Title);
                row["Description"] = CommonHelper.GetResFileString(dci.Description);
                row["Category"]    = CommonHelper.GetResFileString(dci.Category);
                if (!String.IsNullOrEmpty(dci.IconPath))
                {
                    row["IconPath"] = this.ResolveUrl(dci.IconPath);
                }
                else
                {
                    row["IconPath"] = this.ResolveUrl("~/Images/IbnFramework/nologo.png");
                }
                //row["ShowInfo"] = GetShowInfo(dci.Uid);

                retVal.Rows.Add(row);
            }

            return(retVal);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Generates the source.
        /// </summary>
        /// <returns></returns>
        private DataTable GenerateSource()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add(new DataColumn("Id", typeof(string)));
            dt.Columns.Add(new DataColumn("Title", typeof(string)));
            dt.Columns.Add(new DataColumn("Description", typeof(string)));

            foreach (DynamicControlInfo dci in DynamicControlFactory.GetControlInfos())
            {
                DataRow row = dt.NewRow();

                row["Id"]          = dci.Uid;
                row["Title"]       = UtilHelper.GetResFileString(dci.Title);
                row["Description"] = UtilHelper.GetResFileString(dci.Description);

                dt.Rows.Add(row);
            }

            return(dt);
        }