示例#1
0
        public JsonResult GetTableById(double tableID)
        {
            IGumruk    _iGumruk = new BSGumruk();
            int        tblID    = (int)(tableID / 0.123123);
            d_b_tables dbTable  = _iGumruk.GetTableById(tblID);

            //string json = JsonConvert.SerializeObject(schemas);

            TableProperties dt = new Models.TableProperties()
            {
                TableName   = dbTable.name,
                SchemaName  = dbTable.d_b_schemas.name,
                ColumnCount = dbTable.d_b_columns.Count,
                SchemaID    = dbTable.d_b_schemasId,
            };

            foreach (var item2 in dbTable.d_b_columns)
            {
                foreach (var item3 in item2.d_b_column_lookups)
                {
                    item3.d_b_Column_to = _iGumruk.GetColumnById(item3.column_to_id);
                    dt.RelatedTables    = dt.RelatedTables + "  " + item3.d_b_Column_to.d_b_tables.d_b_schemas.name + "." +
                                          item3.d_b_Column_to.d_b_tables.name + "." + item3.d_b_Column_to.name;
                }
            }

            return(Json(dt, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public ActionResult GetTablesModules(int ID)
        {
            IGumruk _iGumruk = new BSGumruk();

            d_b_tables dbTable = _iGumruk.GetTableById(ID);

            return(PartialView("TableModules", dbTable.Modules));
        }
示例#3
0
        public ActionResult GetTablePropertiesById(int tableID)
        {
            IGumruk _iGumruk = new BSGumruk();

            d_b_tables dbTable = _iGumruk.GetTableById(tableID);

            return(PartialView("Table", dbTable));
        }
示例#4
0
        public JsonResult GetTableModules(double tableID)
        {
            IGumruk    iGumruk = new BSGumruk();
            int        tblID   = (int)(tableID / 0.123123);
            d_b_tables dbTable = iGumruk.GetTableById(tblID);

            List <TableModules> modules = new List <TableModules>();

            foreach (var item in dbTable.app_module_operations)
            {
                TableModules tblMod = new TableModules()
                {
                    ModuleName    = item.app_sub_modules.app_base_modules.name,
                    Operation     = item.operation,
                    Query         = item.query,
                    SubModuleName = item.app_sub_modules.name,
                };
                modules.Add(tblMod);
            }

            return(Json(modules, JsonRequestBehavior.AllowGet));
        }