Exemplo n.º 1
0
        public ActionResult Create(Nokta nokta, String userID)
        {
            if (ModelState.IsValid)
            {
                if (nokta.Body.Length < 200)
                {
                    long uid = Int64.Parse(userID);
                    nokta.userID = uid;
                    db.Noktas.Add(nokta);
                    db.SaveChanges();
                    return RedirectToRoute("Nokat", new { Controller = "Nokta", Action = "Index", id = nokta.userID });

                    //return new EmptyResult();
                }
               // return RedirectToAction("Index");
            }
            return RedirectToRoute("Nokat", new { Controller = "Nokta", Action = "Index", id = nokta.userID });
        }
Exemplo n.º 2
0
 public ActionResult Edit(Nokta nokta)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nokta).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(nokta);
 }