AJH.CMS.Core.Data.GalleryManager.Add C# (CSharp) Method

Add() public static method

public static Add ( Gallery gallery ) : int
gallery AJH.CMS.Core.Entities.Gallery
return int
        public static int Add(Gallery gallery)
        {
            if (gallery.ParentObjectID > 0)
            {
                Gallery gallery2 = GetGalleryByParentObjIdAndLanguageId(gallery.ParentObjectID, gallery.LanguageID);
                if (gallery2 != null)
                    throw new Exception("Gallery is exists in the same language, please choose another language");
            }
            return GalleryDataMapper.Add(gallery);
        }