Ejemplo n.º 1
0
 public EditableField(Formfield formfield, Formrecord formrecord)
     : this(formrecord)
 {
     if (formrecord.Formfield.Id != formfield.Id)
     {
         throw new NotSupportedException("Cannot encapsulate a record with a different field (Field IDs do not match)");
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a new field to the form, and returns it's designer.
        /// </summary>
        public DesignableField AddField(string name)
        {
            Formfield field = new Formfield();

            field.Name = name;
            field.Form = this.Form;
            /// The field does not get saved until we store the form
            DesignableField designer = new DesignableField(field, this);

            designer.FieldDeleted += new EventHandler(HandleFieldDeleted);
            /// Set the default for the field ordering
            designer.Metadata.FieldOrder = this.relatedFields.Count;
            this.relatedFields.Add(designer);
            return(designer);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Deletes the field (and all codes, and all records) from the form
 /// </summary>
 public void Delete()
 {
     foreach (Formrecord record in this.FormField.Formrecords())
     {
         Formrecord.Delete(record.Id);
     }
     foreach (Formcode code in this.FormField.Formcodes())
     {
         Formcode.Delete(code.Id);
     }
     Formfield.Delete(this.FormField.Id);
     if (this.FieldDeleted != null)
     {
         this.FieldDeleted(this, EventArgs.Empty);
     }
 }
Ejemplo n.º 4
0
	    public void Insert(int Formid,string Name,string Metadata,bool? Deleted,DateTime? Createdon,DateTime? Modifiedon,string Createdby,string Modifiedby)
	    {
		    Formfield item = new Formfield();
		    
            item.Formid = Formid;
            
            item.Name = Name;
            
            item.Metadata = Metadata;
            
            item.Deleted = Deleted;
            
            item.Createdon = Createdon;
            
            item.Modifiedon = Modifiedon;
            
            item.Createdby = Createdby;
            
            item.Modifiedby = Modifiedby;
            
	    
		    item.Save(UserName);
	    }
Ejemplo n.º 5
0
 /// <summary>
 /// Adds a new field to the form, and returns it's designer.
 /// </summary>
 public DesignableField AddField(string name)
 {
     Formfield field = new Formfield();
     field.Name = name;
     field.Form = this.Form;
     /// The field does not get saved until we store the form            
     DesignableField designer = new DesignableField(field, this);
     designer.FieldDeleted +=new EventHandler(HandleFieldDeleted);
     /// Set the default for the field ordering
     designer.Metadata.FieldOrder = this.relatedFields.Count;
     this.relatedFields.Add(designer);
     return designer;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Encapsulates a field into this form
 /// </summary>
 /// <param name="formfield"></param>
 public SymanticField(Formfield formfield)
 {
     this.FormField = formfield;
 }
Ejemplo n.º 7
0
 public ViewableField(Formfield formfield, ViewableFile viewableFile)
     : base(formfield)
 {
     this.viewableFile = viewableFile;
 }
Ejemplo n.º 8
0
 public EditableField(Formfield formfield, Formrecord formrecord)
     :this(formrecord)
 {
     if (formrecord.Formfield.Id != formfield.Id)
         throw new NotSupportedException("Cannot encapsulate a record with a different field (Field IDs do not match)");
 }
Ejemplo n.º 9
0
 public EditableField(Formfield formfield)
     : base(formfield)
 {
     this.Status = FieldStatus.New;
 }
Ejemplo n.º 10
0
 public EditableField(Formfield formfield)
     : base(formfield)
 {
     this.Status = FieldStatus.New;
 }
Ejemplo n.º 11
0
 public DesignableField(Formfield formfield, DesignableForm parentForm)
     : base(formfield)
 {
     this.parentForm = parentForm;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Encapsulates a field into this form
 /// </summary>
 /// <param name="formfield"></param>
 public SymanticField(Formfield formfield)
 {
     this.FormField = formfield;
 }
Ejemplo n.º 13
0
	    public void Update(int Id,int Formid,string Name,string Metadata,bool? Deleted,DateTime? Createdon,DateTime? Modifiedon,string Createdby,string Modifiedby)
	    {
		    Formfield item = new Formfield();
	        item.MarkOld();
	        item.IsLoaded = true;
		    
			item.Id = Id;
				
			item.Formid = Formid;
				
			item.Name = Name;
				
			item.Metadata = Metadata;
				
			item.Deleted = Deleted;
				
			item.Createdon = Createdon;
				
			item.Modifiedon = Modifiedon;
				
			item.Createdby = Createdby;
				
			item.Modifiedby = Modifiedby;
				
	        item.Save(UserName);
	    }
Ejemplo n.º 14
0
 public ViewableField(Formfield formfield, ViewableFile viewableFile)
     : base(formfield)
 {
     this.viewableFile = viewableFile;
 }
Ejemplo n.º 15
0
 public DesignableField(Formfield formfield, DesignableForm parentForm)
     : base(formfield)
 {
     this.parentForm = parentForm;
 }