Example #1
0
        public ActionResult Add(long id)
        {
            var model = new ContactInformationRegisterModel
            {
                People = id
            };

            return(View("ContactAdd", model));
        }
Example #2
0
        public ActionResult Add(ContactInformationRegisterModel modelContactInformation)
        {
            var myContactInformation = Mapper.Map <ContactInformation>(modelContactInformation);
            ContactInformation contactInformation = _contactInformationRepository.Create(myContactInformation);
            const string       title = "Informacion Agregada";

            _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage);
            return(RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller));
        }
        public ActionResult ContactAdd(long id)
        {
            var model = new ContactInformationRegisterModel
            {
                People     = id,
                Controller = "Student"
            };

            return(View("ContactAdd", model));
        }
Example #4
0
        public ActionResult ContactAdd(long id)
        {
            var model = new ContactInformationRegisterModel
            {
                Id         = (int)id,
                Controller = "Teacher"
            };

            return(View("ContactAdd", model));
        }
Example #5
0
        public ActionResult Add(ContactInformationRegisterModel modelContactInformation)
        {
            var myContactInformation = new ContactInformation
            {
                Type   = modelContactInformation.Type,
                Value  = modelContactInformation.Value,
                People = _peopleRepository.GetById(modelContactInformation.Id)
            };
            ContactInformation contactInformation = _contactInformationRepository.Create(myContactInformation);
            const string       title = "Informacion Agregada";

            _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage);
            return(RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller));
        }