public ActionResult DownloadedNotes(string note, string buyer, string seller, string search) { if (note == "") { note = null; } if (buyer == "" || buyer == null) { buyer = "0"; } if (seller == "" || seller == null) { seller = "0"; } if (search == "") { search = null; } int buyerid = Convert.ToInt32(buyer); int sellerid = Convert.ToInt32(seller); AdminNotesViewModel model = new AdminNotesViewModel { DownloadedNotes = _context.GetAdminDownloadedNotes(note, buyer, seller, search), Sellers = _context.GetAllDownloadedSeller(), Buyers = _context.GetAllBuyers(), NotesTitles = _context.GetAllNotesName() }; return(View(model)); }
public ActionResult PublishedNotes(string name, string search) { if (name == "" || name == null) { name = "0"; } if (search == "") { search = null; } int sellerid = Convert.ToInt32(name); AdminNotesViewModel model = new AdminNotesViewModel { PublishedNotes = _context.GetAdminPublishedNotes(name, search), Sellers = _context.GetAllPublishedSellers(), Seller = sellerid, Search = search }; return(View(model)); }
public ActionResult RejectedNotes(string search, string seller) { if (search == "") { search = null; } if (seller == "" || seller == null) { seller = null; } int sellerid = Convert.ToInt32(seller); AdminNotesViewModel model = new AdminNotesViewModel { RejectedNotes = _context.GetAdminRejectedNotes(search, seller), Sellers = _context.GetRejectedSellers(), Search = search, Seller = sellerid }; return(View(model)); }