예제 #1
0
        private static string BuildInsertWithDefaultsUrl(LinqDataSource datasource)
        {
            RouteValueDictionary routeValues = BuildRoutesFromDatasource(datasource);
            MetaTable            table       = datasource.GetTable();

            return(table.GetActionPath(PageAction.Insert, routeValues));
        }
예제 #2
0
        public void DynamicDataExtensions_GetTable_Test3()
        {
            HttpContext.Current = new HttpContext(new FakeWorkerRequest());
            var dds = new LinqDataSource();

            dds.GetTable();
        }
예제 #3
0
        public static void RegisterListDetailsDefaults(LinqDataSource dataSource, DetailsView detailsView)
        {
            MetaTable table = dataSource.GetTable();

            detailsView.DataBound += delegate(object sender, EventArgs e) {
                //In the combined version we stay on the same page and must pull values from the datasource
                if (detailsView.CurrentMode == DetailsViewMode.Insert)
                {
                    SetDefaultInsertControlValues(table, detailsView, BuildRoutesFromDatasource(dataSource));
                }
            };
        }