// TODO: use BO's static methods public ICaisisInputControl BuildControl(Caisis.BOL.BusinessObject b, string fieldname) { ICaisisInputControl control = CaisisInputControlFactory.BuildControl(GetControlInstance, b, fieldname); CustomizeControl(control, b.TableName, fieldname); return(control); }
private CaisisDataBoundField GetColumnControlBase(string tablename, string fieldname, Func <IBusinessObject> fetch) { ICaisisInputControl control = CaisisInputControlFactory.BuildUnboundControl(GetControlInstance, tablename, fieldname); CustomizeControl(control, tablename, fieldname); // control.Init += new EventHandler((o, e) => DebugHook(control, fetch, fieldname)); CustomCaisisDataBoundField dbf = new CustomCaisisDataBoundField(control); // dbf.BindControl += new EventHandler<CaisisControlEventArgs>((o, c) => DebugHook(c.control, fetch, fieldname)); dbf.BindControl += new EventHandler <CaisisControlEventArgs>((o, c) => CaisisInputControlFactory.BindControl(c.control, fetch(), fieldname)); return(dbf); }