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;
     }
 }
示例#7
0
 public static FormPropertyInstance CreateFormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value)
 {
     return(Provider.CreateFormPropertyInstance(formInstance, formProperty, value));
 }
示例#8
0
 public static void UpdateFormInstance(FormInstance formInstance)
 {
     Provider.UpdateFormInstance(formInstance);
 }
示例#9
0
 public static void DeleteFormInstance(FormInstance formInstance)
 {
     Provider.DeleteFormInstance(formInstance);
 }
示例#10
0
 public abstract FormPropertyInstance GetFormPropertyInstanceByKeys(FormInstance formInstance, FormProperty formProperty, bool throwIfNotFound);
示例#11
0
 public abstract FormPropertyInstance CreateFormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value);
示例#12
0
 public abstract void DeleteFormInstance(FormInstance formInstance);
示例#13
0
 public abstract void UpdateFormInstance(FormInstance formInstance);
 public FormPropertyInstance(FormInstance formInstance, FormProperty formProperty, string value)
 {
     this.FormInstance = formInstance;
     this.FormProperty = formProperty;
     this.Value        = value;
 }