public override void UpdateFormInstance(FormInstance formInstance) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { FormInstanceDataStore dataStore = new FormInstanceDataStore(transaction); dataStore.Update(formInstance); transaction.Commit(); } }
public override FormPropertyInstance CreateFormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { FormPropertyInstanceDataStore dataStore = new FormPropertyInstanceDataStore(transaction); FormPropertyInstance formPropertyInstance = new FormPropertyInstance(formInstance, formProperty, value); dataStore.Insert(formPropertyInstance); transaction.Commit(); return(formPropertyInstance); } }
public override FormInstance GetFormInstance(string id) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { FormInstanceDataStore dataStore = new FormInstanceDataStore(transaction); FormInstance formInstance = dataStore.FindByKey(id); //if (formDefinition == null) // throw new FormNotFoundException(id); return(formInstance); } }
public override FormInstance CreateFormInstance(FormDefinition formDefinition, string createdBy) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { FormInstanceDataStore dataStore = new FormInstanceDataStore(transaction); FormInstance formInstance = new FormInstance(formDefinition, createdBy); dataStore.Insert(formInstance); transaction.Commit(); return(formInstance); } }
public override FormInstance GetFormInstanceByName(string name, bool throwIfNotFound) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { FormInstanceDataStore dataStore = new FormInstanceDataStore(transaction); FormInstance formInstance = dataStore.FindByName(name); //if (formDefinition == null && throwIfNotFound) // throw new FormNotFoundException(name); //else if (formDefinition == null) // return null; return(formInstance); } }
public override FormPropertyInstance GetFormPropertyInstanceByKeys(FormInstance formInstance, FormProperty formProperty, bool throwIfNotFound) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { throw new NotImplementedException("GetFormPropertyInstanceByKeys not implemented"); //FormPropertyInstanceDataStore dataStore = new FormPropertyInstanceDataStore(transaction); //FormPropertyInstance formPropertyInstance = dataStore.find.FindByName(name); //if (formDefinition == null && throwIfNotFound) // throw new FormNotFoundException(name); //else if (formDefinition == null) // return null; //return formPropertyInstance; //return null; } }
public static FormPropertyInstance CreateFormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value) { return(Provider.CreateFormPropertyInstance(formInstance, formProperty, value)); }
public static void UpdateFormInstance(FormInstance formInstance) { Provider.UpdateFormInstance(formInstance); }
public static void DeleteFormInstance(FormInstance formInstance) { Provider.DeleteFormInstance(formInstance); }
public abstract FormPropertyInstance GetFormPropertyInstanceByKeys(FormInstance formInstance, FormProperty formProperty, bool throwIfNotFound);
public abstract FormPropertyInstance CreateFormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value);
public abstract void DeleteFormInstance(FormInstance formInstance);
public abstract void UpdateFormInstance(FormInstance formInstance);
public FormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value) { this.FormInstance = formInstance; this.FormProperty = formProperty; this.Value = value; }