public string DeleteUser(int ID)
        {
            string imagepath = userdao.DeleteUser(ID);

            LogDAO.AddLog(General.ProcessType.UserDelete, General.TableName.User, ID);
            return(imagepath);
        }
Exemple #2
0
        public string DeleteUser(int iD)
        {
            string imagePath = userDAO.DeleteUser(iD);

            LogDAO.AddLog(General.ProcessType.UserDeleted, General.TableName.User, iD);
            return(imagePath);
        }
Exemple #3
0
        private void AddTag(string tagText, int PostID)
        {
            if (tagText != null)
            {
                string[] tags;

                tags = tagText.Split(',');
                List <PostTag> taglist = new List <PostTag>();
                foreach (var item in tags)
                {
                    PostTag tag = new PostTag();
                    tag.PostID           = PostID;
                    tag.TagContent       = item;
                    tag.AddDate          = DateTime.Now;
                    tag.LastUpdateDate   = DateTime.Now;
                    tag.LastUpdateUserID = UserStatic.UserID;
                    taglist.Add(tag);
                }
                foreach (var item in taglist)
                {
                    int tagID = dao.AddTag(item);
                    LogDAO.AddLog(General.ProcessType.TagAdd, General.TableName.Tag, tagID);
                }
            }
        }
Exemple #4
0
        public string DeleteAds(int iD)
        {
            string imagePath = dao.DeleteAds(iD);

            LogDAO.AddLog(General.ProcessType.AdsDeleted, General.TableName.Ads, iD);
            return(imagePath);
        }
Exemple #5
0
        public string UpdateUser(AdsDTO model)
        {
            string oldImagePath = dao.UpdateUser(model);

            LogDAO.AddLog(General.ProcessType.AdsUpdated, General.TableName.Ads, model.ID);
            return(oldImagePath);
        }
Exemple #6
0
        public string DeletePostImage(int ID)
        {
            string imagePath = dao.DeletePostImage(ID);

            LogDAO.AddLog(General.ProcessType.ImageDelete, General.TableName.Image, ID);
            return(imagePath);
        }
Exemple #7
0
        public List <PostImageDTO> DeletePost(int ID)
        {
            List <PostImageDTO> imageList = dao.DeletePost(ID);

            LogDAO.AddLog(General.ProcessType.PostDelete, General.TableName.Post, ID);
            return(imageList);
        }
Exemple #8
0
        public bool AddPost(PostDTO model)
        {
            Post post = new Post();

            post.Title            = model.Title;
            post.ShortContent     = model.ShortContent;
            post.PostContent      = model.PostContent;
            post.Slider           = model.Slider;
            post.Area1            = model.Area1;
            post.Area2            = model.Area2;
            post.Area3            = model.Area3;
            post.Notification     = model.Notification;
            post.CategoryID       = model.CategoryID;
            post.SeoLink          = SeoLink.GenerateUrl(model.Title);
            post.LanguageName     = model.Language;
            post.AddDate          = DateTime.Now;
            post.AddUserID        = UserStatic.UserID;
            post.LastUpdateDate   = DateTime.Now;
            post.LastUpdateUserID = UserStatic.UserID;
            int ID = dao.AddPost(post);

            LogDAO.AddLog(General.ProcessType.PostAdd, General.TableName.Post, ID);
            SavePostImages(model.PostImages, ID);
            AddTags(model.TagText, ID);
            return(true);
        }
Exemple #9
0
        public string UpdateUser(UserDTO model)
        {
            string oldImagePath = userDAO.UpdateUser(model);

            LogDAO.AddLog(General.ProcessType.UserUpdated, General.TableName.User, model.ID);
            return(oldImagePath);
        }
Exemple #10
0
        public string UpdateSocialMedia(SocialMediaDTO model)
        {
            string oldImagePath = dao.UpdateSocialMedia(model);

            LogDAO.AddLog(General.ProcessType.SocialMediaUpdate, General.TableName.Social, model.ID);
            return(oldImagePath);
        }
Exemple #11
0
        public string DeleteSocialMedia(int ID)
        {
            string imagePath = dao.DeleteSocialMedia(ID);

            LogDAO.AddLog(General.ProcessType.SocialMediaDelete, General.TableName.Social, ID);
            return(imagePath);
        }
        public FavDTO UpdateFav(FavDTO model)
        {
            FavDTO dto = new FavDTO();

            dto = dao.UpdateUser(model);
            LogDAO.AddLog(General.ProcessType.IconUpdated, General.TableName.Icon, dto.ID);
            return(dto);
        }
Exemple #13
0
        public bool AddCategory(CategoryDTO model)
        {
            Category category = new Category();

            category.CateogryName     = model.CategoryName;
            category.AddDate          = DateTime.Now;
            category.LastUpdateDate   = DateTime.Now;
            category.LastUpdateUserID = UserStatic.UserID;
            int ID = dao.AddCategory(category);

            LogDAO.AddLog(General.ProcessType.CategoryAdd, General.TableName.Category, ID);
            return(true);
        }
Exemple #14
0
 public bool UpdatePost(PostDTO model)
 {
     model.SeoLink = SeoLink.GenerateUrl(model.Title);
     dao.UpdatePost(model);
     LogDAO.AddLog(General.ProcessType.PostUpdate, General.TableName.Post, model.ID);
     if (model.PostImages != null)
     {
         SavePostImages(model.PostImages, model.ID);
     }
     dao.DeleteTags(model.ID);
     AddTags(model.TagText, model.ID);
     return(true);
 }
        public bool AddMeta(MetaDTO model)
        {
            Meta meta = new Meta();

            meta.Name             = model.Name;
            meta.MetaContent      = model.MetaContent;
            meta.AddDate          = DateTime.Now;
            meta.LastUpdateUserID = UserStatic.UserID;
            meta.LastUpdateDate   = DateTime.Now;
            int MetaID = dao.AddMeta(meta);

            LogDAO.AddLog(General.ProcessType.MetaAdded, General.TableName.Meta, MetaID);
            return(true);
        }
Exemple #16
0
        public bool AddSocialMedia(SocialMediaDTO model)
        {
            SocialMedia socialMedia = new SocialMedia();

            socialMedia.Name             = model.Name;
            socialMedia.ImagePath        = model.ImagePath;
            socialMedia.Link             = model.Link;
            socialMedia.AddDate          = DateTime.Now;
            socialMedia.LastUpdateDate   = DateTime.Now;
            socialMedia.LastUpdateUserID = UserStatic.UserID;
            int ID = dao.AddSocialMedia(socialMedia);

            LogDAO.AddLog(General.ProcessType.SocialMediaAdd, General.TableName.Social, ID);
            return(true);
        }
        public void AddAds(AdsDTO model)
        {
            Ad ads = new Ad();

            ads.Name             = model.Name;
            ads.Link             = model.Link;
            ads.ImagePath        = model.ImagePath;
            ads.Size             = model.Imagesize;
            ads.AddDate          = DateTime.Now;
            ads.LastUpdateUserID = UserStatic.UserID;
            ads.LastUpdateDate   = DateTime.Now;
            int ID = dao.AddAds(ads);

            LogDAO.AddLog(General.ProcessType.AdsAdd, General.TableName.Ads, ID);
        }
        public bool AddVideo(VideoDTO model)
        {
            Video video = new Video();

            video.Title             = model.Title;
            video.VideoPath         = model.VideoPath;
            video.OriginalVideoPath = model.OriginalVideoPath;
            video.AddDate           = DateTime.Now;
            video.LastUpdateDate    = DateTime.Now;
            video.LastUpdateUserID  = UserStatic.UserID;
            int ID = dao.AddVideo(video);

            LogDAO.AddLog(General.ProcessType.VideoAdd, General.TableName.Video, ID);
            return(true);
        }
Exemple #19
0
        public bool AddAds(AdsDTO model)
        {
            Ad ad = new Ad();

            ad.Name             = model.Name;
            ad.ImagePath        = model.ImagePath;
            ad.Link             = model.Link;
            ad.Size             = model.Size;
            ad.AddDate          = DateTime.Now;
            ad.LastUpdateUserID = UserStatic.UserID;
            ad.LastUpdateDate   = DateTime.Now;
            int AdID = dao.AddAds(ad);

            LogDAO.AddLog(General.ProcessType.AdsAdded, General.TableName.Ads, AdID);

            return(true);
        }
Exemple #20
0
        public void AddUser(UserDTO model)
        {
            T_User user = new T_User();

            user.Username         = model.Username;
            user.Password         = model.Password;
            user.Email            = model.Email;
            user.ImagePath        = model.ImagePath;
            user.NameSurname      = model.Name;
            user.isAdmin          = model.isAdmin;
            user.AddDate          = DateTime.Now;
            user.LastUpdateUserID = UserStatic.UserID;
            user.LastUpdateDate   = DateTime.Now;
            int ID = userDAO.AddUser(user);

            LogDAO.AddLog(General.ProcessType.UserAdd, General.TableName.User, ID);
        }
Exemple #21
0
        public List <PostImageDTO> DeleteCategory(int ID)
        {
            List <Post> postList = dao.DeleteCategory(ID);

            LogDAO.AddLog(General.ProcessType.CategoryDelete, General.TableName.Category, ID);
            List <PostImageDTO> postImageList = new List <PostImageDTO>();

            foreach (Post post in postList)
            {
                List <PostImageDTO> imageList = postBLL.DeletePost(post.ID);
                LogDAO.AddLog(General.ProcessType.PostDelete, General.TableName.Post, post.ID);
                foreach (PostImageDTO image in imageList)
                {
                    postImageList.Add(image);
                }
            }
            return(postImageList);
        }
        public List <PostImageDTO> DeleteCategory(int ID)
        {
            List <Post> postlist = dao.DeleteCategory(ID);

            LogDAO.AddLog(General.ProcessType.CategoryDelete, General.TableName.Category, ID);
            List <PostImageDTO> imagelist = new List <PostImageDTO>();

            foreach (var item in postlist)
            {
                List <PostImageDTO> imagelist2 = postbll.DeletePost(item.ID);
                LogDAO.AddLog(General.ProcessType.PostDelete, General.TableName.post, item.ID);
                foreach (var item2 in imagelist2)
                {
                    imagelist.Add(item2);
                }
            }
            return(imagelist);
        }
Exemple #23
0
        public bool AddAdress(AddressDTO model)
        {
            Address ads = new Address();

            ads.Address1         = model.AddressContent;
            ads.Email            = model.Email;
            ads.Phone            = model.Phone;
            ads.Phone2           = model.Phone2;
            ads.Fax              = model.Fax;
            ads.MapPathLarge     = model.LargeMapPath;
            ads.MapPathSmall     = model.SmallMapPath;
            ads.AddDate          = DateTime.Now;
            ads.LastUpdateDate   = DateTime.Now;
            ads.LastUpdateUserID = UserStatic.UserID;
            int ID = dao.AddAddress(ads);

            LogDAO.AddLog(General.ProcessType.AddressAdd, General.TableName.Address, ID);
            return(true);
        }
Exemple #24
0
        void SavePostImages(List <PostImageDTO> list, int PostID)
        {
            List <PostImage> imageList = new List <PostImage>();

            foreach (PostImageDTO item in list)
            {
                PostImage image = new PostImage();
                image.PostID           = PostID;
                image.ImagePath        = item.ImagePath;
                image.AddDate          = DateTime.Now;
                image.LastUpdateDate   = DateTime.Now;
                image.LastUpdateUserID = UserStatic.UserID;
                imageList.Add(image);
            }
            foreach (PostImage item in imageList)
            {
                int imageID = dao.AddImage(item);
                LogDAO.AddLog(General.ProcessType.ImageAdd, General.TableName.Image, imageID);
            }
        }
Exemple #25
0
        public bool AddAddress(AddressDTO model)
        {
            Address address = new Address();

            address.Address1         = model.Address;
            address.ID               = model.ID;
            address.Email            = model.Email;
            address.Phone            = model.Phone;
            address.Phone2           = model.Phone2;
            address.Fax              = model.Fax;
            address.MapPathLarge     = model.MapPathLarge;
            address.MapPathSmall     = model.MapPathSmall;
            address.AddDate          = DateTime.Now;
            address.AddDate          = DateTime.Now;
            address.LastUpdateUserID = UserStatic.UserID;
            address.LastUpdateDate   = DateTime.Now;
            int id = dao.AddAddress(address);

            LogDAO.AddLog(General.ProcessType.AddressAdded, General.TableName.Address, id);
            return(true);
        }
 public bool UpdateVideo(VideoDTO model)
 {
     dao.UpdateVideo(model);
     LogDAO.AddLog(General.ProcessType.VideoUpdated, General.TableName.Video, model.ID);
     return(true);
 }
 public void DeleteVideo(int iD)
 {
     dao.DeleteVideo(iD);
     LogDAO.AddLog(General.ProcessType.VideoDeleted, General.TableName.Video, iD);
 }
Exemple #28
0
 public Boolean AddLog(LogBDO log)
 {
     return(logd.AddLog(log));
 }
Exemple #29
0
 public void DeleteAddress(int iD)
 {
     dao.DeleteAddress(iD);
     LogDAO.AddLog(General.ProcessType.AddressDeleted, General.TableName.Address, iD);
 }
Exemple #30
0
 public bool UpdateAddress(AddressDTO model)
 {
     dao.UpdateAddress(model);
     LogDAO.AddLog(General.ProcessType.AddressUpdated, General.TableName.Address, model.ID);
     return(true);
 }