public Task <bool> UpdateAsyncByID(ResourcesTranslation entity) { return(Task.Run <bool>(() => { var curr_entity = resourcesTranslationRepo.GetByID(entity.ID); ResourcesTranslation resourcesTranslation = new ResourcesTranslation { ID = curr_entity.ID, LanguageID = curr_entity.LanguageID, ResourcesID = curr_entity.ResourcesID, FieldName = curr_entity.FieldName, ARDescription = curr_entity.ARDescription, LatDescription = curr_entity.LatDescription, Position = curr_entity.Position, DisplayORNot = entity.DisplayORNot, ValidationSymbole = curr_entity.ValidationSymbole, ARValidationMessage = (!string.IsNullOrEmpty(entity.ARValidationMessage)) ? entity.ARValidationMessage : curr_entity.ARValidationMessage, LatValidationMessage = curr_entity.LatValidationMessage, ARGridColumnText = (!string.IsNullOrEmpty(entity.ARGridColumnText)) ? entity.ARGridColumnText : curr_entity.ARGridColumnText, LatGridColumnText = (!string.IsNullOrEmpty(entity.LatGridColumnText)) ? entity.LatGridColumnText : curr_entity.LatGridColumnText, GridColumnHeader = curr_entity.GridColumnHeader, GridColumnWidth = curr_entity.GridColumnWidth, GridColumnHeight = curr_entity.GridColumnHeight, ResourceGroup = curr_entity.ResourceGroup, Notes = curr_entity.Notes, ARPlaceholderText = (!string.IsNullOrEmpty(entity.ARPlaceholderText)) ? entity.ARPlaceholderText : curr_entity.ARPlaceholderText, LatPlaceholderText = (!string.IsNullOrEmpty(entity.LatPlaceholderText)) ? entity.LatPlaceholderText : curr_entity.LatPlaceholderText, IsRequired = entity.IsRequired, InputDataType = entity.InputDataType }; resourcesTranslationRepo.Update(resourcesTranslation, resourcesTranslation.ID); return true; })); }
public Task <bool> UpdateAsync(ResourcesTranslation entity) { return(Task.Run <bool>(() => { ResourcesTranslation resourcesTranslation = new ResourcesTranslation { ID = entity.ID, LanguageID = entity.LanguageID, ResourcesID = entity.ResourcesID, FieldName = entity.FieldName, ARDescription = entity.ARDescription, LatDescription = entity.LatDescription, Position = entity.Position, DisplayORNot = entity.DisplayORNot, ValidationSymbole = entity.ValidationSymbole, ARValidationMessage = entity.ARValidationMessage, LatValidationMessage = entity.LatValidationMessage, ARGridColumnText = entity.ARGridColumnText, LatGridColumnText = entity.LatGridColumnText, GridColumnHeader = entity.GridColumnHeader, GridColumnWidth = entity.GridColumnWidth, GridColumnHeight = entity.GridColumnHeight, ResourceGroup = entity.ResourceGroup, Notes = entity.Notes, ARPlaceholderText = entity.ARPlaceholderText, LatPlaceholderText = entity.LatPlaceholderText }; resourcesTranslationRepo.Update(resourcesTranslation, resourcesTranslation.ID); return true; })); }
public async Task <IHttpActionResult> update([FromBody] ResourcesTranslation entity) { HttpRuntime.Cache.Remove("resourcesTranslation"); var item = resourcesTranslationService.GetByID(2438); item.Notes = "test test test"; return(Ok(await resourcesTranslationService.UpdateAsync(item))); }
public bool Update(ResourcesTranslation entity) { throw new NotImplementedException(); }
public Task <bool> InsertAsync(ResourcesTranslation entity) { throw new NotImplementedException(); }
public Task <bool> DeleteAsync(ResourcesTranslation customer) { throw new NotImplementedException(); }
public async Task <IHttpActionResult> updateById([FromBody] ResourcesTranslation entity) { HttpRuntime.Cache.Remove("resourcesTranslation"); return(Ok(await resourcesTranslationService.UpdateAsyncByID(entity))); }