public ActionResult DeletingUser(MallOfElectronics.Models.DataBase.Person person)
 {
     MallOfElectronics.Models.Repository.PersonRepository db = new Models.Repository.PersonRepository();
     if (db.Delete(person.Id))
     {
         ViewBag.message = "This User Has Been Deleted";
     }
     else
     {
         ViewBag.ErrorMessage = "This User Not Hass Been Delete";
     }
     return(View(person));
 }
        public ActionResult EditingUser(MallOfElectronics.Models.DataBase.Person person)
        {
            MallOfElectronics.Models.DataBase.Person previousPerson =
                (MallOfElectronics.Models.DataBase.Person)TempData["prviousProduct"];
            PersonRepository   personRepository = new PersonRepository();
            CheckEqualForUsers check            = new CheckEqualForUsers();

            if (!check.IsEqual(previousPerson, person))
            {
                if (personRepository.update(person))
                {
                    ViewBag.message = "This User Has Been Updated";
                }
                else
                {
                    ViewBag.ErrorMessage = "Not Item Of Users To Change";
                }
            }
            else
            {
                ViewBag.ErrorMessage = "This User Has Been Updated";
            }
            return(View());
        }