コード例 #1
0
        public ActionResult ViewLesson(string mail, FormCollection c)
        {
            var    rr    = new ResourcesRepository();
            var    model = rr.GetProfesoriByMail(mail);
            string link  = "http://www.google.com";

            return(Redirect(link));
            //return View("../../Views/AddLesson/AddLesson", model);
        }
コード例 #2
0
        public ActionResult DeleteLesson(string mail, string materie, string name)
        {
            ViewBag.stergere    = null;
            ViewData["materie"] = materie;
            var rr    = new ResourcesRepository();
            var model = rr.GetProfesoriByMail(mail);

            if (rr.EraseLesson(name, mail, materie) == 1)
            {
                ViewBag.eraseData = "Lectia a fost stearsa cu succes";
                ViewBag.stergere  = 1;
            }
            else
            {
                ViewBag.eraseData = "Lectia cu numele " + name + " nu a putut fi stearsa. Verificati cu atentie numele lectiei";
                ViewBag.stergere  = 0;
            }

            return(View("../../Views/AddLesson/AddLesson", model));
        }
コード例 #3
0
        public ActionResult SearchForLesson(string mail, string materie, string name)
        {
            ViewBag.myData      = null;
            ViewBag.nr          = null;
            ViewData["materie"] = materie;
            var rr    = new ResourcesRepository();
            var model = rr.GetProfesoriByMail(mail);

            if (rr.FindLesson(name, mail, materie) == 1)
            {
                ViewBag.myData = "Lectia se afla in baza de date";
                ViewBag.nr     = 1;
            }
            else
            {
                ViewBag.myData = "Lectia cu numele " + name + " nu se gaseste momentan in baza de date.";
                ViewBag.nr     = 0;
            }

            return(View("../../Views/AddLesson/AddLesson", model));
        }