Ejemplo n.º 1
0
 public ActionResult MemberEdit(FormCollection collection, onsoft.Models.Member pc)
 {
     if (Request.Cookies["Username"] != null)
     {
         pc.Name     = collection["Name"];
         pc.Username = collection["Username"];
         string pass = collection["Password"].ToString();
         pc.Password = pass;
         pc.Email    = collection["Email"];
         pc.Address  = collection["Address"];
         pc.Tel      = collection["Tel"];
         pc.Active   = true;
         pc.Active   = true;
         db.sp_Member_Update(pc.Id, pc.Name, pc.Tel, pc.Email, pc.Address, pc.Birthday, pc.Sex, pc.Image, pc.SDate, pc.MDate, pc.EDate, pc.Username, pc.Password, pc.IdGroupMb, pc.Active);
         db.SaveChanges();
         return(RedirectToAction("MemberIndex"));
     }
     else
     {
         return(Redirect("/Admins/admins"));
     }
 }