Exemplo n.º 1
0
 public ActionResult Edit(lawyer lwr)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lwr).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lwr));
 }
 public ActionResult AddCitation(citation cit)
 {
     if (!Check_Session())
     {
         return(RedirectToAction("SignIn", "user"));
     }
     cit.DATE_TIME = DateTime.Now;
     db.citations.Add(cit);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Exemplo n.º 3
0
        public ActionResult confirmLawyer(string Verfy_code)
        {
            lawyer lwr = db.lawyers.Where(lr => lr.VERIFY_CODE == Verfy_code).FirstOrDefault();

            lwr.IS_ACTIVE       = true;
            db.Entry(lwr).State = EntityState.Modified;
            db.SaveChanges();
            return(View(lwr));
        }
Exemplo n.º 4
0
        public ActionResult add_news(FormCollection fc)
        {
            string newstitle   = fc["news_title"];
            string summary     = fc["news_summary"];
            string discription = fc["news_description"];
            news   add_news    = new news();

            add_news.Title       = newstitle;
            add_news.Summary     = summary;
            add_news.discription = discription;
            add_news.date_time   = DateTime.Now;

            db.news.Add(add_news);
            db.SaveChanges();
            return(RedirectToAction("index"));
        }