private void Unique(DicParam dic) { // dic.ID = DC.DicID; DC.DicID++; if (!dic.ParamRaw.IsNullStr()) { dic.Param = $"{dic.ParamRaw}__{dic.ID}"; } // if (DC.IsInParameter(dic)) { InNotIn(dic); } else if (dic.Group != null) { foreach (var ui in dic.Group) { if (DC.IsInParameter(ui)) { ui.InItems = new List <DicParam>(); } Unique(ui); ui.GroupRef = dic; } } }
private void DbParam(DicParam ui, DicParam refDb) { if (ui.IsDbSet) { return; } ui.IsDbSet = true; // if (ui.ClassFullName.IsNullStr()) { ui.Key = string.Empty; } else { ui.Key = DC.XC.GetModelKey(ui.ClassFullName); ui.TableOne = DC.XC.GetTableName(ui.Key); } if (ui.CsType != null) { if (DC.IsInParameter(ui)) { ui.ParamInfo = ParameterHelper.GetDefault(ui.Param, ui.CsValue, DbType.String); } else { DC.PH.GetDbVal(ui, ui.CsType); } } if (ui.Group != null) { foreach (var item in ui.Group) { DbParam(item, ui); } return; } ui.GroupRef = refDb; if (ui.InItems != null) { foreach (var u in ui.InItems) { DbParam(u, refDb); } } if (ui.Inserts != null) { foreach (var u in ui.Inserts) { DbParam(u, refDb); } } if (ui.Columns != null) { foreach (var u in ui.Columns) { DbParam(u, refDb); } } }
private void DbParam(DicParam ui, DicParam refDb) { if (ui.IsDbSet) { return; } ui.IsDbSet = true; // if (ui.Crud == CrudEnum.SQL) { DC.PH.GetParamInfo(ui, ui.CsType); return; } if (ui.CsType != null) { if (DC.IsInParameter(ui)) { ui.ParamInfo = DC.PH.GetDefault(ui.Param, ui.CsValue, DbType.String); } else { DC.PH.GetParamInfo(ui, ui.CsType); } } if (ui.Group != null) { foreach (var item in ui.Group) { DbParam(item, ui); } return; } ui.GroupRef = refDb; if (ui.InItems != null) { foreach (var u in ui.InItems) { DbParam(u, refDb); } } if (ui.Inserts != null) { foreach (var u in ui.Inserts) { DbParam(u, refDb); } } if (ui.Columns != null) { foreach (var u in ui.Columns) { DbParam(u, refDb); } } }