Пример #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);
        }
Пример #2
0
        private static Tk5MultipleMetaData CreateMultipleMetaData(IInputData input, BaseMDSingleMetaDataConfig master,
                                                                  IEnumerable <DetailSingleMetaDataConfig> details)
        {
            ISingleMetaData masterMeta = master.CreateSingleMetaData();

            return(new Tk5MultipleMetaData(input, EnumUtil.Convert(masterMeta), details));
        }