Ejemplo n.º 1
0
        public async Task <BaseResult <bool> > UpdateContractTemplateRoomFields(List <RoomFieldViewModel> requestFields, string userName, int templateId)
        {
            var result = new BaseResult <bool>()
            {
                Result = true
            };
            var roomFields = ContractTemplateRequestMapper.MapToContractTemplateRoomFieldsModel(requestFields, userName, templateId, true);

            foreach (var field in roomFields)
            {
                var param        = ContractTemplateRequestMapper.CreateTemplateFieldsRequestParams(field);
                var updateResult = await iTemplateRoomFieldLibrary.ExecuteStoredProcedureInsertUpdate(Constants.StoredProcedure.UpdateRooomFields, param).ConfigureAwait(false);

                if (updateResult.IsError && updateResult.ExceptionMessage != null)
                {
                    return(updateResult);
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public Task <BaseResult <long> > InsertContractTemplateRoomProperties(List <RoomFieldViewModel> requestRoomFields, string userName, int templateId)
        {
            var roomFieldsProperties = ContractTemplateRequestMapper.MapToContractTemplateRoomFieldsModel(requestRoomFields, userName, templateId);

            return(iTemplateRoomFieldLibrary.InsertEntityList(roomFieldsProperties));
        }