private void saveDependence(string ID, Database db)
        {
            var sql = new Sql(@"
                select ModelID from FBSmartHelp where ID=@0  ", ID);

            List <string> list = db.Fetch <string>(sql);

            List <FBMetaDependence> listSave = new List <FBMetaDependence>();

            foreach (var item in list)
            {
                FBMetaDependence model = new FBMetaDependence();
                model.SourceID = ID;
                model.TargetID = item.ToString();
                listSave.Add(model);
            }
            FBMeta.SaveDependence(ID, listSave, db);
        }
Exemple #2
0
        private void saveDependence(string ModelID, Database db)
        {
            var sql = new Sql(@"
                select ObjectID from FBDataModelObjects where ModelID=@0 
            union all select ObjectID from FBDataModelRealtions where ModelID = @0", ModelID);

            List <string> list = db.Fetch <string>(sql);

            List <FBMetaDependence> listSave = new List <FBMetaDependence>();

            foreach (var item in list)
            {
                FBMetaDependence model = new FBMetaDependence();
                model.SourceID = ModelID;
                model.TargetID = item.ToString();
                listSave.Add(model);
            }
            FBMeta.SaveDependence(ModelID, listSave, db);
        }
Exemple #3
0
        private void saveDependence(string frmID, string modelID, List <string> list, Database db)
        {
            if (!string.IsNullOrEmpty(modelID))
            {
                list.Add(modelID);
            }

            List <FBMetaDependence> listSave = new List <FBMetaDependence>();
            var sql   = new Sql("select  DSID from FBFormDS where FormID=@0", frmID);
            var list1 = db.Fetch <string>(sql);

            list = list.Union(list1).ToList <string>(); //剔除重复项

            foreach (var item in list)
            {
                FBMetaDependence model = new FBMetaDependence();
                model.SourceID = frmID;
                model.TargetID = item.ToString();
                listSave.Add(model);
            }


            FBMeta.SaveDependence(frmID, listSave, db);
        }