Example #1
0
 public ActionResult Profiles(Customer editpro)
 {
     ModelState.Remove("CustomerId");
     ModelState.Remove("CustomerRole");
     ModelState.Remove("DateRegister");
     ModelState.Remove("CustomerPassword");
     if (ModelState.IsValid)
     {
         if (CustomerModel.EditProfile(editpro))
         {
             ModelState.AddModelError("", "Update Successful!!");
             return(View());
         }
         ModelState.AddModelError("", "can't update");
     }
     return(View());
 }