public HomeController() { _identifierContext = new IdentifierContext(); _noticeContext = new NoticeContext(); _bankContext = new BankContext(); _tagDetailIdentifierContext = new TagDetailIdentifierContext(); }
// // GET: /Home/ public ActionResult Details(int id) { NoticeContext ncc = new NoticeContext(); NoticeModel b = ncc.allNotice.Single(n => n.ID == id); return(View(b)); }
public ActionResult DeleteGet(NoticeModel buk) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext bcn = new NoticeContext(); bcn.Delete_Notice(buk); return(RedirectToAction("DELETEList")); } return(RedirectToAction("index", "Admin")); }
public ActionResult Allnotice() { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext ntc = new NoticeContext(); return(View(ntc.allNotice.ToList())); } return(RedirectToAction("index", "Admin")); }
public ActionResult Details(int id) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext ncc = new NoticeContext(); NoticeModel b = ncc.allNotice.Single(n => n.ID == id); return(View(b)); } return(RedirectToAction("index", "Admin")); }
public ActionResult editLIST() { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext ntc = new NoticeContext(); List <NoticeModel> nm = ntc.allNotice.ToList(); return(View(nm)); } return(RedirectToAction("index", "Admin")); }
public ActionResult DeletePost(int id) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext bcn = new NoticeContext(); NoticeModel bk = bcn.allNotice.Single(s => s.ID == id); return(View(bk)); } return(RedirectToAction("index", "Admin")); }
public ActionResult editgET(int id) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext bcv = new NoticeContext(); NoticeModel nt = bcv.allNotice.Single(s => s.ID == id); return(View(nt)); } return(RedirectToAction("index", "Admin")); }
public ActionResult Create(NoticeModel notice) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext ncc = new NoticeContext(); notice.Date_ns = DateTime.Today; ncc.AddNotice(notice); return(RedirectToAction("Allnotice")); } return(RedirectToAction("index", "Admin")); }
public ActionResult editPost(NoticeModel idEdit) { if (Session["matric"] != null && Session["pass"] != null) { NoticeContext bcv = new NoticeContext(); if (ModelState.IsValid) { bcv.EditNotice(idEdit); return(RedirectToAction("EditList")); } NoticeModel nt = bcv.allNotice.Single(s => s.ID == idEdit.ID); return(View(nt)); } return(RedirectToAction("index", "Admin")); }
public ActionResult Index() { NoticeContext ncc = new NoticeContext(); int lastId = ncc.allNotice.Last().ID; NoticeModel b = ncc.allNotice.Single(n => n.ID == lastId); ViewBag.titlez = b.Title_ns; ViewBag.messagez = b.Message_ns; ViewBag.datez = b.Date_ns.ToShortDateString(); ViewBag.timez = b.Date_ns.ToShortTimeString(); ViewBag.idz = b.ID; List <NoticeModel> nx = ncc.allNotice.ToList(); return(View(nx)); }
public NoticesController(NoticeContext context) { _context = context; }
public NoticesController(NoticeContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public TagDetailIdentifierController() { _tagDetailIdentifierContext = new TagDetailIdentifierContext(); _noticeContext = new NoticeContext(); }
public NoticeController() { _noticeContext = new NoticeContext(); }
public UsersController(NoticeContext context) { _context = context; }
public IdentifierController() { _noticeContext = new NoticeContext(); _identifierContext = new IdentifierContext(); }
public UserService(NoticeContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public UsersController(NoticeContext context, IUserService userService, IConfiguration configuration) { _userService = userService; _context = context; _configuration = configuration; }