public DataTable GetAlbumsByCateHomeList(string strCate, string _lang) { string restr = strCate.Remove(strCate.LastIndexOf(",")).Replace(",", "','"); AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsByCateHomeList(restr, _lang)); }
public DataTable GetAlbumsByCateHomeAll(int n, string strCate, string approval, string _lang) { string restr = strCate.Remove(strCate.LastIndexOf(",")).Replace(",", "','"); AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsByCateHomeAll(n, restr, approval, _lang)); }
public void UpdateAlbumsApproval(string strId, string value, string username, DateTime date) { string restr = strId.Remove(strId.LastIndexOf(",")).Replace(",", "','"); AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.UpdateAlbumsApproval(restr, value, username, date); }
public void UpdateAlbums(string strId, string value) { string restr = strId.Remove(strId.LastIndexOf(",")).Replace(",", "','"); AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.UpdateAlbums(restr, value); }
public void DeleteAlbums(string strId) { string restr = strId.Remove(strId.LastIndexOf(",")).Replace(",", "','"); AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.DeleteAlbums(restr); }
public JsonResult Restore(int?id) { var dao = new AlbumsDAO(); if (dao.Restore(id)) { List <Album> albums = db.Albums.Where(n => n.album_bin == true).OrderBy(n => n.album_name).ToList(); List <jAlbums> list = albums.Select(n => new jAlbums { album_active = n.album_active, album_bin = n.album_bin, album_datecreate = n.album_datecreate.Value.ToString("dd/MM/yyyy"), album_dateedit = n.album_dateedit.Value.ToString("dd/MM/yyyy"), album_favorite = n.album_favorite, album_id = n.album_id, album_img = n.album_img, album_name = n.album_name, album_note = n.album_note, album_view = n.album_view, user_id = n.user_id }).ToList(); return(Json(list, JsonRequestBehavior.AllowGet)); } else { return(Json(null)); } }
public CustomController() { string connection = ConfigurationManager.ConnectionStrings["dataSource"].ConnectionString; _dataAccess = new AlbumsDAO(connection); _userDataAccess = new UsersDAO(connection); _photoDataAccess = new PhotosDAO(connection); }
public PhotoController() { string connection = ConfigurationManager.ConnectionStrings["dataSource"].ConnectionString; _dataAccess = new PhotosDAO(connection); _albumsDataAccess = new AlbumsDAO(connection); SetBackgroundImageTempData(); }
public ActionResult Add(Album album, HttpPostedFileBase IMG, string del) { //Cập nhật có thay đổi album.album_option = true; album.album_bin = false; //Kiem tra thay đổi value if (album.album_active != true && album.album_active != false) { album.album_active = false; } //Hinh ảnh if (IMG != null) { var code = Guid.NewGuid().ToString(); var img = new ImagesController(); img.AddImages(IMG, Common.Link.IMG_ALBUM, code); album.album_img = code + IMG.FileName; } else { album.album_img = "notImg.png"; } var dao = new AlbumsDAO(); var j = new JsonAdminController(); if (dao.Add(album)) { return(Redirect("/Admin/AlbumsAdmin")); } else { return(Redirect(Common.Link.NOT_404)); } }
public ActionResult Edit(Album album, HttpPostedFileBase IMG) { Album al = db.Albums.Find(album.album_id); album.album_active = al.album_active; album.album_datecreate = al.album_datecreate; album.album_dateedit = DateTime.Now; album.album_bin = al.album_bin; album.album_option = al.album_option; album.user_id = al.user_id; var i = new ImagesController(); if (IMG != null) { var code = Guid.NewGuid().ToString(); var img = new ImagesController(); img.AddImages(IMG, Common.Link.IMG_ALBUM, code); album.album_img = code + IMG.FileName; } else { album.album_img = al.album_img; } var dao = new AlbumsDAO(); if (dao.Edit(album)) { return(Redirect("/Admin/AlbumsAdmin")); } else { return(Redirect(Common.Link.NOT_404)); } }
public int CreateAlbumsGet(Albums albums) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.CreateAlbumsGet(albums)); }
public DataTable GetAlbumsHot(int n, string _lang) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsHot(n, _lang)); }
public Albums GetAlbumsById(int nId) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsById(nId)); }
public void UpdateAlbumsApproval(int Id, string value, string username, DateTime date) { AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.UpdateAlbumsApproval(Id, value, username, date); }
public void DeleteAlbums(int nId) { AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.DeleteAlbums(nId); }
public void AlbumsClickUpdate(int nId) { AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.AlbumsClickUpdate(nId); }
public DataTable GetAlbumsViewHome(int n, string approval, string _lang) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsViewHome(n, approval, _lang)); }
public void UpdateAlbums(Albums albums) { AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.UpdateAlbums(albums); }
public void CreateAlbums(Albums albums) { AlbumsDAO albumsDAO = new AlbumsDAO(); albumsDAO.CreateAlbums(albums); }
public DataTable AlbumsSearch(string keyword, int cId, string _lang) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.AlbumsSearch(keyword, cId, _lang)); }
public DataTable GetAlbumsView(string _lang) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.GetAlbumsView(_lang)); }
public DataTable AlbumsFollow(int Id, int cId, int n, string _lang) { AlbumsDAO albumsDAO = new AlbumsDAO(); return(albumsDAO.AlbumsFollow(Id, cId, n, _lang)); }