예제 #1
0
 public static DataTable SelectPage(
     int siteId,
     int pageNumber,
     int pageSize,
     bool sortByClassName,
     bool sortByAssemblyName)
 {
     return(DBWebPartContent.SelectPage(
                siteId,
                pageNumber,
                pageSize,
                sortByClassName,
                sortByAssemblyName));
 }
예제 #2
0
 private bool Update()
 {
     return(DBWebPartContent.UpdateWebPart(
                this.webPartID,
                this.siteID,
                this.title,
                this.description,
                this.imageUrl,
                this.className,
                this.assemblyName,
                this.availableForMyPage,
                this.allowMultipleInstancesOnMyPage,
                this.availableForContentSystem));
 }
예제 #3
0
 private void GetWebPart(Guid webPartId)
 {
     using (IDataReader reader = DBWebPartContent.GetWebPart(webPartId))
     {
         if (reader.Read())
         {
             this.webPartID                      = new Guid(reader["WebPartID"].ToString());
             this.siteGuid                       = new Guid(reader["SiteGuid"].ToString());
             this.siteID                         = Convert.ToInt32(reader["SiteID"]);
             this.title                          = reader["Title"].ToString();
             this.description                    = reader["Description"].ToString();
             this.imageUrl                       = reader["ImageUrl"].ToString();
             this.className                      = reader["ClassName"].ToString();
             this.assemblyName                   = reader["AssemblyName"].ToString();
             this.availableForMyPage             = Convert.ToBoolean(reader["AvailableForMyPage"]);
             this.allowMultipleInstancesOnMyPage = Convert.ToBoolean(reader["AllowMultipleInstancesOnMyPage"]);
             this.availableForContentSystem      = Convert.ToBoolean(reader["AvailableForContentSystem"]);
         }
     }
 }
예제 #4
0
        private bool Create()
        {
            Guid newID = Guid.NewGuid();

            this.webPartID = newID;

            int rowsAffected = DBWebPartContent.AddWebPart(
                this.webPartID,
                this.siteGuid,
                this.siteID,
                this.title,
                this.description,
                this.imageUrl,
                this.className,
                this.assemblyName,
                this.availableForMyPage,
                this.allowMultipleInstancesOnMyPage,
                this.availableForContentSystem);

            return(rowsAffected > 0);
        }
예제 #5
0
 public static bool UpdateCountOfUseOnMyPage(Guid webPartId, int increment)
 {
     return(DBWebPartContent.UpdateCountOfUseOnMyPage(webPartId, increment));
 }
예제 #6
0
 public static bool DeleteWebPart(Guid webPartId)
 {
     return(DBWebPartContent.DeleteWebPart(webPartId));
 }
예제 #7
0
 public static int Count(int siteId)
 {
     return(DBWebPartContent.Count(siteId));
 }
예제 #8
0
 public static IDataReader GetMostPopular(int siteId, int numberToGet)
 {
     return(DBWebPartContent.GetMostPopular(siteId, numberToGet));
 }
예제 #9
0
 public static IDataReader GetWebPartsForMyPage(int siteId)
 {
     return(DBWebPartContent.GetWebPartsForMyPage(siteId));
 }
예제 #10
0
 public static IDataReader SelectBySite(int siteId)
 {
     return(DBWebPartContent.SelectBySite(siteId));
 }
예제 #11
0
 public static bool Exists(Int32 siteId, String className, String assemblyName)
 {
     return(DBWebPartContent.Exists(siteId, className, assemblyName));
 }