public void AddTreeForm(DynObject treeForm)
        {
            Check.Require(treeForm != null, "TreeForm对象不允许为空!");
            DynEntity treeFormEntity = new DynEntity("TreeForm");

            treeFormEntity["TreeFormID"]    = treeForm["TreeFormID"];
            treeFormEntity["TreeFormName"]  = treeForm["TreeFormName"];
            treeFormEntity["ModelType"]     = treeForm["ModelType"];
            treeFormEntity["ModelTypeName"] = treeForm["ModelTypeName"];
            treeFormEntity["ReferTypes"]    = treeForm["ReferTypes"];
            treeFormEntity["ColumnCount"]   = treeForm["ColumnCount"];
            treeFormEntity["Comment"]       = treeForm["Comment"];
            treeFormEntity["Model"]         = DynObjectTransverter.DynObjectToJson(treeForm);
            GatewayFactory.Default.Save(treeFormEntity);
        }
        public void AddBillListForm(DynObject billListForm)
        {
            Check.Require(billListForm != null, "BillListForm对象不允许为空!");
            DynEntity billListFormEntity = new DynEntity("BillListForm");

            billListFormEntity["BillListFormID"]      = billListForm["BillListFormID"];
            billListFormEntity["BillListFormName"]    = billListForm["BillListFormName"];
            billListFormEntity["MasterType"]          = billListForm["MasterType"];
            billListFormEntity["DetailType"]          = billListForm["DetailType"];
            billListFormEntity["ReferTypes"]          = billListForm["ReferTypes"];
            billListFormEntity["BillName"]            = billListForm["BillName"];
            billListFormEntity["DetailMainReferType"] = billListForm["DetailMainReferType"];
            billListFormEntity["DetailMainReferName"] = billListForm["DetailMainReferName"];
            billListFormEntity["Comment"]             = billListForm["Comment"];
            billListFormEntity["Model"] = DynObjectTransverter.DynObjectToJson(billListForm);
            GatewayFactory.Default.Save(billListFormEntity);
        }
        public void ModifyDictForm(DynObject dictForm)
        {
            Check.Require(dictForm != null, "DictForm对象不允许为空!");
            DynEntity dictFormEntity = GatewayFactory.Default.Find("DictForm", dictForm["DictFormID"]);

            Check.Require(dictFormEntity != null, "DictForm在数据库中不存在无法修改!");

            dictFormEntity["DictFormName"]  = dictForm["DictFormName"];
            dictFormEntity["ModelType"]     = dictForm["ModelType"];
            dictFormEntity["ModelTypeName"] = dictForm["ModelTypeName"];
            dictFormEntity["ReferTypes"]    = dictForm["ReferTypes"];
            dictFormEntity["ColumnCount"]   = dictForm["ColumnCount"];
            dictFormEntity["Comment"]       = dictForm["Comment"];
            dictFormEntity["Model"]         = DynObjectTransverter.DynObjectToJson(dictForm);
            //dictFormEntity["Script"] = GenerateDictFormJsCode(dictForm);
            GatewayFactory.Default.Save(dictFormEntity);
        }
        public void AddRelationForm(DynObject relationForm)
        {
            Check.Require(relationForm != null, "RelationForm对象不允许为空!");
            DynEntity relationFormEntity = new DynEntity("RelationForm");

            relationFormEntity["RelationFormID"]   = relationForm["RelationFormID"];
            relationFormEntity["RelationFormName"] = relationForm["RelationFormName"];
            relationFormEntity["RelationType"]     = relationForm["RelationType"];
            relationFormEntity["MasterType"]       = relationForm["MasterType"];
            relationFormEntity["SlaveType"]        = relationForm["SlaveType"];
            relationFormEntity["MasterTypeName"]   = relationForm["MasterTypeName"];
            relationFormEntity["SlaveTypeName"]    = relationForm["SlaveTypeName"];
            relationFormEntity["ColumnCount"]      = relationForm["ColumnCount"];
            relationFormEntity["Comment"]          = relationForm["Comment"];
            relationFormEntity["Model"]            = DynObjectTransverter.DynObjectToJson(relationForm);
            GatewayFactory.Default.Save(relationFormEntity);
        }
        public void ModifyRelationForm(DynObject relationForm)
        {
            Check.Require(relationForm != null, "RelationForm对象不允许为空!");
            DynEntity relationFormEntity = GatewayFactory.Default.Find("RelationForm", relationForm["RelationFormID"]);

            Check.Require(relationFormEntity != null, "RelationForm在数据库中不存在无法修改!");

            relationFormEntity["RelationFormName"] = relationForm["RelationFormName"];
            relationFormEntity["RelationType"]     = relationForm["RelationType"];
            relationFormEntity["MasterType"]       = relationForm["MasterType"];
            relationFormEntity["SlaveType"]        = relationForm["SlaveType"];
            relationFormEntity["MasterTypeName"]   = relationForm["MasterTypeName"];
            relationFormEntity["SlaveTypeName"]    = relationForm["SlaveTypeName"];
            relationFormEntity["ColumnCount"]      = relationForm["ColumnCount"];
            relationFormEntity["Comment"]          = relationForm["Comment"];
            relationFormEntity["Model"]            = DynObjectTransverter.DynObjectToJson(relationForm);
            //relationFormEntity["Script"] = GenerateRelationFormJsCode(relationForm);

            GatewayFactory.Default.Save(relationFormEntity);
        }
        public void ModifyBillListForm(DynObject billListForm)
        {
            Check.Require(billListForm != null, "BillListForm对象不允许为空!");
            DynEntity billListFormEntity = GatewayFactory.Default.Find("BillListForm", billListForm["BillListFormID"]);

            Check.Require(billListFormEntity != null, "BillListForm在数据库中不存在无法修改!");

            billListFormEntity["BillListFormName"]    = billListForm["BillListFormName"];
            billListFormEntity["MasterType"]          = billListForm["MasterType"];
            billListFormEntity["DetailType"]          = billListForm["DetailType"];
            billListFormEntity["ReferTypes"]          = billListForm["ReferTypes"];
            billListFormEntity["BillName"]            = billListForm["BillName"];
            billListFormEntity["DetailMainReferType"] = billListForm["DetailMainReferType"];
            billListFormEntity["DetailMainReferName"] = billListForm["DetailMainReferName"];
            billListFormEntity["Comment"]             = billListForm["Comment"];
            billListFormEntity["Model"] = DynObjectTransverter.DynObjectToJson(billListForm);
            //billListFormEntity["Script"] = GenerateBillListFormJsCode(billListForm);

            GatewayFactory.Default.Save(billListFormEntity);
        }