public static ContentEditor GetByURL(Guid SiteID, string requestedURL) {
			ContentEditor _item = null;
			using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
				vw_carrot_EditorURL query = CompiledQueries.cqGetContentEditorURL(_db, SiteID, requestedURL);
				if (query != null) {
					_item = new ContentEditor(query);
				}
			}

			return _item;
		}
		public static ContentEditor Get(Guid SiteID, Guid UserID) {
			ContentEditor _item = null;
			using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
				vw_carrot_EditorURL query = CompiledQueries.cqGetContentEditorByID(_db, SiteID, UserID);
				if (query != null) {
					_item = new ContentEditor(query);
				}
			}

			return _item;
		}
示例#3
0
        public static ContentEditor Get(Guid SiteID, Guid UserID)
        {
            ContentEditor _item = null;

            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                vw_carrot_EditorURL query = CompiledQueries.cqGetContentEditorByID(_db, SiteID, UserID);
                if (query != null)
                {
                    _item = new ContentEditor(query);
                }
            }

            return(_item);
        }
示例#4
0
        public static ContentEditor GetByURL(Guid SiteID, string requestedURL)
        {
            ContentEditor _item = null;

            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                vw_carrot_EditorURL query = CompiledQueries.cqGetContentEditorURL(_db, SiteID, requestedURL);
                if (query != null)
                {
                    _item = new ContentEditor(query);
                }
            }

            return(_item);
        }
示例#5
0
        public override bool Equals(Object obj)
        {
            //Check for null and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            if (obj is ContentEditor)
            {
                ContentEditor p = (ContentEditor)obj;
                return(this.SiteID == p.SiteID &&
                       this.UserName.ToLower() == p.UserName.ToLower());
            }
            else
            {
                return(false);
            }
        }