Ejemplo n.º 1
0
        public IActionResult MergeContact(DriverContactVM driverContactVM)
        {
            var result = new Result();

            try
            {
                var mergeContactResult = ServiceFactory.DriverManagement.MergeDriverContact(driverContactVM);
                result.Success = mergeContactResult.Success;
                result.Message = mergeContactResult.Message;
            }
            catch (Exception)
            {
                result.Success = false;
            }
            return(Json(result));
        }
Ejemplo n.º 2
0
        public BaseResult MergeDriverContact(DriverContactVM contactVM)
        {
            var result = new BaseResult();

            try
            {
                var contact = Mapper.Map <DriverContact>(contactVM);
                result.Success = UnitOfWork.DriverContactDao.Merge(contact);
                result.Message = GeneralSuccessMessage;
            }
            catch (Exception ex)
            {
                result.Success = false;
                result.Message = GeneralErrorMessage;
            }
            return(result);
        }