Ejemplo n.º 1
0
 public FormProperty(FormDefinition formDefinition, string name, string datatype, int sequenceNo)
 {
     this.FormDefinition = formDefinition;
     this.Name           = name;
     this.Datatype       = datatype;
     this.SequenceNo     = sequenceNo;
 }
 public override IList <FormProperty> GetAllFormProperties(FormDefinition formDefinition)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormPropertyDataStore dataStore = new FormPropertyDataStore(transaction);
         return(dataStore.FindAll(formDefinition));
     }
 }
        public IList <FormProperty> FindAll(FormDefinition formDefinition)
        {
            ICriteria criteria = CreateCriteria();

            criteria.Add(Expression.Eq("FormDefinition.Id", formDefinition.Id));
            criteria.AddOrder(Order.Asc("SequenceNo"));
            return(base.Find(criteria, false));
        }
 public override void UpdateFormDefinition(FormDefinition formDefinition)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormDefinitionDataStore dataStore = new FormDefinitionDataStore(transaction);
         dataStore.Update(formDefinition);
         transaction.Commit();
     }
 }
 public override FormDefinition GetFormDefinition(string id)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormDefinitionDataStore dataStore      = new FormDefinitionDataStore(transaction);
         FormDefinition          formDefinition = dataStore.FindByKey(id);
         //if (formDefinition == null)
         //    throw new FormNotFoundException(id);
         return(formDefinition);
     }
 }
 public override FormProperty CreateFormProperty(FormDefinition formDefinition, string name, string datatype, int sequenceNo)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormPropertyDataStore dataStore    = new FormPropertyDataStore(transaction);
         FormProperty          formProperty = new FormProperty(formDefinition, name, datatype, sequenceNo);
         dataStore.Insert(formProperty);
         transaction.Commit();
         return(formProperty);
     }
 }
 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 FormDefinition CreateFormDefinition(string name)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormDefinitionDataStore dataStore      = new FormDefinitionDataStore(transaction);
         FormDefinition          formDefinition = new FormDefinition(name);
         dataStore.Insert(formDefinition);
         transaction.Commit();
         return(formDefinition);
     }
 }
 public override FormDefinition GetFormDefinitionByName(string name, bool throwIfNotFound)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         FormDefinitionDataStore dataStore      = new FormDefinitionDataStore(transaction);
         FormDefinition          formDefinition = dataStore.FindByName(name);
         //if (formDefinition == null && throwIfNotFound)
         //    throw new FormNotFoundException(name);
         //else if (formDefinition == null)
         //    return null;
         return(formDefinition);
     }
 }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string formId = Request["form"];

            BusiBlocks.FormsBlock.FormDefinition formDef = null;

            //Edit
            if (formId != null)
            {
                formDef = BusiBlocks.FormsBlock.FormsManager.GetFormDefinition(formId);

                //txtName.Enabled = false;

                //txtName.Text = forum.Name;
                //txtDisplayName.Text = forum.DisplayName;
                //txtEditPermissions.Text = forum.EditPermissions;
                //txtReadPermissions.Text = forum.ReadPermissions;
                //txtDeletePermissions.Text = forum.DeletePermissions;
                //txtInsertPermissions.Text = forum.InsertPermissions;
                //txtDescription.Text = forum.Description;

                //chkEnabledAttach.Checked = forum.AttachEnabled;
                //txtAttachExtensions.Text = forum.AttachExtensions;
                //txtAttachMaxSize.Text = forum.AttachMaxSize.ToString();
                ////LoadGroupList(forum.Groups);
            }
            else //New
            {
                // Load a form definition, or select from a list of form definitions.
                // For now, just load a form definition.

                formDef = BusiBlocks.FormsBlock.FormsManager.GetFormDefinition("1346598346923345");
            }

            this.lblFormDefTitle.InnerText = formDef.Name;

            // Locate all the form properties for this form, and create text boxes for each one.
            IList <BusiBlocks.FormsBlock.FormProperty> allProperties = BusiBlocks.FormsBlock.FormsManager.GetAllFormProperties(formDef);
            formPropertyList.DataSource = allProperties;
            formPropertyList.DataBind();
        }
    }
Ejemplo n.º 11
0
 public abstract void DeleteFormDefinition(FormDefinition formDefinition);
Ejemplo n.º 12
0
 public static FormProperty CreateFormProperty(FormDefinition formDefinition, string name, string datatype, int sequenceNo)
 {
     return(Provider.CreateFormProperty(formDefinition, name, datatype, sequenceNo));
 }
Ejemplo n.º 13
0
 public abstract IList <FormProperty> GetAllFormProperties(FormDefinition formDefinition);
Ejemplo n.º 14
0
 public abstract FormProperty CreateFormProperty(FormDefinition formDefinition, string name, string datatype, int sequenceNo);
Ejemplo n.º 15
0
 public static IList <FormProperty> GetAllFormProperties(FormDefinition formDefinition)
 {
     return(Provider.GetAllFormProperties(formDefinition));
 }
Ejemplo n.º 16
0
 public abstract FormInstance CreateFormInstance(FormDefinition formDefinition, string createdBy);
Ejemplo n.º 17
0
 public static FormInstance CreateFormInstance(FormDefinition formDefinition, string createdBy)
 {
     return(Provider.CreateFormInstance(formDefinition, createdBy));
 }
Ejemplo n.º 18
0
 public static void UpdateFormDefinition(FormDefinition formDefinition)
 {
     Provider.UpdateFormDefinition(formDefinition);
 }
Ejemplo n.º 19
0
 public static void DeleteFormDefinition(FormDefinition formDefinition)
 {
     Provider.DeleteFormDefinition(formDefinition);
 }
Ejemplo n.º 20
0
 public FormInstance(FormDefinition formDefinition, string createdBy)
 {
     this.FormDefinition = formDefinition;
     this.CreatedBy      = createdBy;
 }
Ejemplo n.º 21
0
 public abstract void UpdateFormDefinition(FormDefinition formDefinition);