public string DeleteUser(int ID) { string imagepath = userdao.DeleteUser(ID); LogDAO.AddLog(General.ProcessType.UserDelete, General.TableName.User, ID); return(imagepath); }
public string DeleteUser(int iD) { string imagePath = userDAO.DeleteUser(iD); LogDAO.AddLog(General.ProcessType.UserDeleted, General.TableName.User, iD); return(imagePath); }
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); } } }
public string DeleteAds(int iD) { string imagePath = dao.DeleteAds(iD); LogDAO.AddLog(General.ProcessType.AdsDeleted, General.TableName.Ads, iD); return(imagePath); }
public string UpdateUser(AdsDTO model) { string oldImagePath = dao.UpdateUser(model); LogDAO.AddLog(General.ProcessType.AdsUpdated, General.TableName.Ads, model.ID); return(oldImagePath); }
public string DeletePostImage(int ID) { string imagePath = dao.DeletePostImage(ID); LogDAO.AddLog(General.ProcessType.ImageDelete, General.TableName.Image, ID); return(imagePath); }
public List <PostImageDTO> DeletePost(int ID) { List <PostImageDTO> imageList = dao.DeletePost(ID); LogDAO.AddLog(General.ProcessType.PostDelete, General.TableName.Post, ID); return(imageList); }
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); }
public string UpdateUser(UserDTO model) { string oldImagePath = userDAO.UpdateUser(model); LogDAO.AddLog(General.ProcessType.UserUpdated, General.TableName.User, model.ID); return(oldImagePath); }
public string UpdateSocialMedia(SocialMediaDTO model) { string oldImagePath = dao.UpdateSocialMedia(model); LogDAO.AddLog(General.ProcessType.SocialMediaUpdate, General.TableName.Social, model.ID); return(oldImagePath); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); } }
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); }
public Boolean AddLog(LogBDO log) { return(logd.AddLog(log)); }
public void DeleteAddress(int iD) { dao.DeleteAddress(iD); LogDAO.AddLog(General.ProcessType.AddressDeleted, General.TableName.Address, iD); }
public bool UpdateAddress(AddressDTO model) { dao.UpdateAddress(model); LogDAO.AddLog(General.ProcessType.AddressUpdated, General.TableName.Address, model.ID); return(true); }