Exemplo n.º 1
0
        public IActionResult AddLocation([FromBody] CreateEditJobTitleViewModel location)
        {
            var model = new OrganizationListLocation();

            if (location is null)
            {
                return(BadRequest("Location is null."));
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            location.OrganizationID = EncryptionHelper.DecryptUrlParam(location.OrganizationID);
            int headerID = Int32.Parse(location.OrganizationID);

            var locationMapper = _mapper.Map(location, model);

            _organizationUnitProvider.AddLocation(locationMapper);
            return(Ok(location));
        }
Exemplo n.º 2
0
 public int EditLocation(OrganizationListLocation entity)
 {
     context.SbEdit(entity);
     return(context.SaveChanges());
 }