Example #1
0
        public static IMetaData CreateVueMetaData(IInputData input, BaseMDSingleMetaDataConfig master,
                                                  IEnumerable <DetailSingleMetaDataConfig> details)
        {
            InputDataProxy proxy;

            switch (input.Style.Operation)
            {
            case "ListVue":
                proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.List);
                ISingleMetaData masterMeta = master.CreateSingleMetaData();
                var             scheme     = masterMeta.CreateSourceScheme(input);
                return(new Tk5ListMetaData(scheme, proxy, masterMeta));

            case "InsertVue":
                proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Insert);
                return(CreateMultipleMetaData(proxy, master, details));

            case "UpdateVue":
                proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Update);
                return(CreateMultipleMetaData(proxy, master, details));

            case "DetailVue":
                proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Detail);
                return(CreateMultipleMetaData(proxy, master, details));
            }

            return(null);
        }
Example #2
0
        private Tk5TableScheme CreateTableScheme(IInputData input, ISingleMetaData item)
        {
            ITableSchemeEx sourceScheme = item.CreateSourceScheme(input);
            Tk5TableScheme scheme       = item.CreateTableScheme(sourceScheme, input);

            fSchemes.Add(scheme);
            return(scheme);
        }