Exemplo n.º 1
0
 public ActionResult Edit(int id, update update)
 {
     try
     {
         update.modifiedon        = DateTime.Now;
         update.createdby         = User.Identity.Name;
         conn.Entry(update).State = EntityState.Modified;
         conn.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
        public ActionResult Edit(int id, client client)
        {
            try
            {
                client.modifiedon        = DateTime.Now;
                conn.Entry(client).State = EntityState.Modified;
                conn.SaveChanges();// TODO: Add update logic here

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