예제 #1
0
        public Response <OwnerAssetChangeDto> Post(OwnerAssetChangeDto ownerAssetChangeDto)
        {
            Response <OwnerAssetChangeDto> response = new Response <OwnerAssetChangeDto>();

            try
            {
                AssetContext assetContext = new AssetContext();
                response.Item = assetContext.SaveOwnerAssetChange(ownerAssetChangeDto);
                // Configure the Success response.
                response.Code = OperationCode.ResponseCode.SUCCESS;
                response.MessageList.Add(MessageResource.GetInstance().GetText("SawDAL_UpdateSuccess", MESSAGE_RESOURCE));
            }
            catch (Exception ex)
            {
                response.Code = OperationCode.ResponseCode.ERROR;
                response.ErrorList.Add(MessageResource.GetInstance().GetText("SawDAL_UpdateInvalid", MESSAGE_RESOURCE));
            }

            return(response);
        }