Esempio n. 1
0
 public BinderCollectorItem(object control, string table, string column, string property, Findable findable)
 {
     this.Control  = control;
     this.Table    = table;
     this.Column   = column;
     this.Property = property;
     this.Findable = findable;
 }
Esempio n. 2
0
        public void SetFindable(object control, Findable findable)
        {
            BinderCollectorItem item = bCollection.Find(p => p.Control == control);

            if (item != null)
            {
                item.Findable = findable;
            }
        }
Esempio n. 3
0
 public static string ToString(Findable findable)
 {
     try
     {
         return(strings[findable]);
     } catch (System.Exception)
     {
         throw new NotFindableException();
     }
 }
Esempio n. 4
0
 public static Findable GetMatch(this Findable findable)
 {
     try
     {
         return(matches[findable]);
     }
     catch (System.Exception)
     {
         throw new NotFindableException();
     }
 }
Esempio n. 5
0
 public BinderCollectorItem Bind(BinderCollector binderCollection, object control, string table, string column, string property, Findable findable)
 {
     return(binderCollection.Add(control, table, column, property, findable));
 }
Esempio n. 6
0
 public BinderCollectorItem Bind(object control, IColumn column, string property, Findable findable)
 {
     return(bCollection.Add(control, column.Tablename, column.Name, property, findable));
 }
Esempio n. 7
0
 public BinderCollectorItem Bind(object control, IColumn column, Findable findable)
 {
     return(bCollection.Add(control, column.Tablename, column.Name, "Text", findable));
 }
Esempio n. 8
0
        public BinderCollectorItem Add(object control, string table, string column, string property, Findable findable)
        {
            BinderCollectorItem bind = new BinderCollectorItem(control, table, column, property, findable);

            this.Add(bind);

            return(bind);
        }
Esempio n. 9
0
 public FindableFO(Findable item, Position position = null)
 {
     this.Item = item;
     this.Position = position;
 }
Esempio n. 10
0
        public Binding BindControl(Control control, IColumn column, string property, NullValue nullValue, Findable findable)
        {
            if (column.Len > 0)
            {
                if (control is MetroTextBox)
                {
                    ((MetroTextBox)control).MaxLength = column.Len;
                }
                else if (control is TextBox)
                {
                    ((TextBox)control).MaxLength = column.Len;
                }
            }

            controlBinder.Bind(control, column, property, findable);
            if (dbManager.GetDataColumn(column).DefaultValue is System.DBNull && nullValue == NullValue.SetNull)
            {
                dbManager.GetDataColumn(column).DefaultValue = column.DefaultValue;
            }
            return(control.DataBindings.Add(property, dbManager.MasterBinding, column.Name));
        }
Esempio n. 11
0
 public Binding BindControl(Control control, IColumn column, string property, Findable findable)
 {
     return(BindControl(control, column, property, NullValue.SetNull, findable));
 }
Esempio n. 12
0
 public Binding BindControl(Control control, IColumn column, Findable findable)
 {
     return(BindControl(control, column, GetProperty(control), NullValue.SetNull, findable));
 }
Esempio n. 13
0
 public void FindableControl(Control control, Findable findable)
 {
     controlBinder.SetFindable(control, findable);
 }
Esempio n. 14
0
 public List <FindableFO> FindAll(Findable findable) => FindAll(FindableMethods.ToString(findable)).Transform();