public static void UpdateEntityFieldListValue(Guid entityFieldListValueId, Guid entityFieldId, string name, string value, bool Default, bool active) { using (EntityFieldListsValuesTableAdapter adapter = new EntityFieldListsValuesTableAdapter(OrganizationProvider.GetConnectionString(UserContext.Current.OrganizationId))) { adapter.Update(entityFieldListValueId, entityFieldId, name, value, Default, active); } RemoveFromCache(); }
public static Guid InsertEntityFieldListValue(Guid entityFieldId, string name, string value, bool Default, bool active) { ClientDataSet.EntityFieldListsValuesDataTable table = new ClientDataSet.EntityFieldListsValuesDataTable(); ClientDataSet.EntityFieldListsValuesRow row = table.NewEntityFieldListsValuesRow(); row.EntityFieldListValueId = Guid.NewGuid(); row.EntityFieldId = entityFieldId; row.Name = name; row.Value = value; row.Default = Default; row.Active = active; table.AddEntityFieldListsValuesRow(row); using (EntityFieldListsValuesTableAdapter adapter = new EntityFieldListsValuesTableAdapter(OrganizationProvider.GetConnectionString(UserContext.Current.OrganizationId))) { adapter.Update(row); } RemoveFromCache(); return(row.EntityFieldListValueId); }