public LabelVLBinder(DBManager db, Label c, string name, WFValueList vl, DBFilter filter) { this.c = c; this.name = name; this.field = db.getField(name); this.vl = vl; }
public DropDownVLBinder(DBManager db, DropDownList c, WFValueList vl, DBFilter filter, string name) { this.filter = filter; this.c = c; this.name = name; this.field = db.getField(name); this.vl = vl; }
protected override void beforeUpdate(DatabaseConnection dbConn, DBManager db) { base.beforeUpdate(dbConn, db); DBField syncIDField = db.getField("SynID"); if (syncIDField != null) { if (string.IsNullOrEmpty((string)syncIDField.getValue(this))) { syncIDField.setValue(this, Guid.NewGuid().ToString().ToUpper()); } } }
public TextBoxBinder(DBManager db, TextBox c, string name) { this.c = c; this.name = name; this.field = db.getField(name); if (this.field != null) { MaxLengthAttribute m = (MaxLengthAttribute)this.field.findAttribute(typeof(MaxLengthAttribute)); if (m != null) { maxlength = m.getMaxLength(); size = m.getMaxTextBoxLength(); } } }
public HiddenBinder(DBManager db, HtmlInputHidden c, string name) { this.c = c; this.name = name; this.field = db.getField(name); }
public HiddenBinder(DBManager db, HtmlInputHidden c) { this.c = c; this.name = c.ID; this.field = db.getField(name); }
public RadioButtonListBinder(DBManager db, RadioButtonList c, string name) { this.c = c; this.name = name; this.field = db.getField(name); }
public LabelBinder(DBManager db, Label c, string name) { this.c = c; this.name = name; this.field = db.getField(name); }
public CheckBoxBinder(DBManager db, CheckBox c) { this.c = c; this.name = c.ID; this.field = db.getField(name); }
public CheckBoxBinder(DBManager db, CheckBox c, string name) { this.c = c; this.name = name; this.field = db.getField(name); }
public string getValue(object v, string name) { object s = null; if (v is DataRowView) { DataRowView r = (DataRowView)v; s = r[name]; } else if (v is DataRow) { DataRow r = (DataRow)v; s = r[name]; } else if (v is DBObject) { System.Reflection.PropertyInfo propInfo = v.GetType().GetProperty(name); if (propInfo != null) { s = propInfo.GetValue(v, null); } } if (s == null || Convert.IsDBNull(s)) { return(""); } if (db != null) { DBField f = db.getField(name); if (f != null && f.transcoder != null) { s = f.transcoder.fromDB(s); } } Hashtable map = (Hashtable)values[name]; if (map != null && s != null) { object s1 = map[s.ToString()]; if (s1 == null) { try { s1 = map[Convert.ToInt32(s)]; } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } } if (s1 != null) { s = s1; } } s = s.ToString().Trim(); return(HTMLUtils.toHTMLText(s.ToString())); }