public IMetaData CreateObject(params object[] args) { IInputData input = ObjectUtil.ConfirmQueryObject <IInputData>(this, args); ITableSchemeEx scheme = CreateSourceScheme(input); switch (input.Style.Style) { case PageStyle.Insert: case PageStyle.Update: case PageStyle.Detail: return(new Tk5SingleNormalMetaData(scheme, input, this)); case PageStyle.List: return(new Tk5ListMetaData(scheme, input, this)); case PageStyle.Custom: if (input.Style.Operation == "DetailList") { InputDataProxy proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.List); return(new Tk5ListMetaData(scheme, proxy, this)); } else { var metaData = SchemeUtil.CreateVueMetaData(input, scheme, this); if (metaData != null) { return(metaData); } } break; } return(null); }
public IMetaData CreateObject(params object[] args) { IInputData input = ObjectUtil.ConfirmQueryObject <IInputData>(this, args); ITableSchemeEx scheme; ISingleMetaData masterMeta; switch (input.Style.Style) { case PageStyle.Insert: case PageStyle.Update: case PageStyle.Detail: masterMeta = Master.CreateSingleMetaData(); return(new Tk5MultipleMetaData(input, EnumUtil.Convert(masterMeta), EnumUtil.Convert(Detail))); //return new Tk5SingleNormalMetaData(scheme, input, this); //break; case PageStyle.List: masterMeta = Master.CreateSingleMetaData(); scheme = masterMeta.CreateSourceScheme(input); return(new Tk5ListMetaData(scheme, input, masterMeta)); case PageStyle.Custom: if (input.Style.Operation == "DetailList") { var detailMeta = Detail.CreateSingleMetaData(); scheme = detailMeta.CreateSourceScheme(input); InputDataProxy proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.List); return(new Tk5ListMetaData(scheme, proxy, detailMeta, Detail.TableOutput?.CreateObject())); } var metaData = SchemeUtil.CreateVueMetaData(input, Master, EnumUtil.Convert(Detail)); if (metaData != null) { return(metaData); } break; } return(null); }