protected override void Render(HtmlTextWriter writer) { if (!String.IsNullOrEmpty(Text)) { writer.Write(WebManager.GetLabel(Text, TemplateControl ?? NamingContainer)); } }
public virtual void CommandHandler(Object sender, CommandEventArgs e) { ActionContext context = new ActionContext(e) { Sender = sender, Origin = this }; WebManager.ExecuteAction(context); }
public override void Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) { var selectActionArgs = new SelectEventArgs() { DataSourceView = UnderlyingView, SelectArgs = arguments }; selectActionArgs.Callback = delegate(IEnumerable data) { selectActionArgs.Data = data; callback(data); }; WebManager.ExecuteAction( new ActionContext( selectActionArgs ) { Origin = ActionDS.ActionSourceControl ?? ActionDS.NamingContainer, Sender = ActionDS }); }
public override void Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) { var selectArgs = new ProviderDataSourceSelectEventArgs(arguments); DS.OnSelecting(this, selectArgs); var provider = WebManager.GetService <IProvider <object, object> >(DS.ProviderName); if (provider == null) { throw new Exception("Underlying data provider service not found: " + DS.ProviderName); } var result = provider.Provide(selectArgs.ProviderContext); var resultList = result is IList ? (IList)result : new object[] { result }; var resultArr = new object[resultList.Count]; for (int i = 0; i < resultList.Count; i++) { resultArr[i] = resultList[i] is IDictionary ? new DictionaryView((IDictionary)resultList[i]) : resultList[i]; } callback(resultArr); }
protected void PerformAction(ActionContext context, DataSourceViewOperationCallback callback) { WebManager.ExecuteAction(context); }