コード例 #1
0
ファイル: UserController.cs プロジェクト: azori3/DotVal
        public ActionResult Report(ReportModele r, int id)
        {
            user user = null;

            su = new ServiceUser();
            rs = new ReclamationService();
            Report reports = new Report();

            reports.Sujet          = r.Sujet;
            reports.mail           = r.mail;
            reports.DateBanneBegin = r.DateBanneBegin;
            reports.DateBanneEnd   = r.DateBanneEnd;

            user = su.GetById(id);
            rs.Add(reports);
            rs.Commit();

            su.email(user.mail, "issamm11", r.Sujet, r.mail);

            if (reports.DateBanneEnd > reports.DateBanneBegin)
            {
                user.numberAction = "1";
                su.Update(user);
                su.Commit();
            }
            ViewBag.id   = id;
            ViewBag.mail = user.mail;
            return(View());
        }
コード例 #2
0
        public ActionResult Profil(ReclmationViewModel rvm)
        {
            su = new ServiceUser();
            rs = new ReclamationService();
            report r = new report();

            r.Content = rvm.Content;
            r.subject = rvm.subject;
            r.vu      = 0;
            if (mail != null)
            {
                user u = su.Get(us => us.email == mail);
                r.name       = u.firstName;
                r.lastName   = u.lastName;
                r.insured_id = u.id;

                idU = u.id;
            }
            rs.Add(r);
            rs.Commit();

            su.email(rvm.Email, rvm.pass, rvm.subject, rvm.Content);
            ViewBag.Message = "Your Profile page.";

            return(RedirectToAction("Profil", new
            {
                id = idU
            }));
        }
コード例 #3
0
        // GET : Reclamation/Archive/5
        public ActionResult Delete(int id)
        {
            rs = new ReclamationService();

            rs.Delete(r => r.id == id);
            rs.Commit();
            return(RedirectToAction("Archive"));
        }
コード例 #4
0
        // GET : Reclamation/Reclamation/5
        public ActionResult ToArchive(int id)
        {
            rs = new ReclamationService();
            report rep = rs.GetById(id);

            rep.vu = 1;
            rs.Update(rep);
            rs.Commit();

            return(RedirectToAction("Reclamation"));
        }
コード例 #5
0
        public ActionResult Reclamation()
        {
            string      name  = Request["name"];
            string      sujet = Request["sujet"];
            string      email = Request["email"];
            Reclamation c     = new Reclamation()
            {
                Sujet = sujet, Nom = name, Email = email, état = "non lu"
            };
            IReclamationService csv = new ReclamationService();

            csv.Add(c);
            csv.Commit();

            return(RedirectToAction("Contact"));
        }
コード例 #6
0
        public ActionResult Create(Reclamation reclam)
        {
            try
            {
                // TODO: Add insert logic here
                RS.Add(reclam);

                RS.Commit();



                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }