Example #1
0
        public JsonResult GetSchema(int schemaID)
        {
            IGumruk _iGumruk = new BSGumruk();

            d_b_schemas schemas = _iGumruk.GetSchema(schemaID);

            // var jsonResult = JsonConvert.SerializeObject(schemas);

            return(Json(schemas, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public ActionResult GetSchemasTables(int schemaID, bool getCheckBox)
        {
            IGumruk iGumruk = new BSGumruk();

            d_b_schemas schema = iGumruk.GetSchema(schemaID);

            //bool silinecek = true;
            for (int i = 0; i < schema.d_b_tables.Count; i++)
            {
                if (schema.d_b_tables.ToList()[i].name.Contains("ESKI"))
                {
                    schema.d_b_tables.Remove(schema.d_b_tables.ToList()[i]);
                    continue;
                }
                if (schema.d_b_tables.ToList()[i].isempty == true || schema.d_b_tables.ToList()[i].isView == true)
                {
                    schema.d_b_tables.Remove(schema.d_b_tables.ToList()[i]);
                    continue;
                }

                //foreach (var item in schema.d_b_tables.ToList()[i].d_b_columns)
                //{
                //    if (item.d_b_column_lookups.Count > 0)
                //    {
                //        foreach (var lookup in item.d_b_column_lookups)
                //        {
                //            d_b_columns column = iGumruk.GetColumnById(lookup.column_to_id);

                //            if (column != null)
                //            {
                //                if (column.d_b_tables.d_b_schemasId == item.d_b_tables.d_b_schemasId)
                //                { silinecek = false;continue; }

                //            }
                //        }
                //    }


                //}

                //if (silinecek)
                //    schema.d_b_tables.Remove(schema.d_b_tables.ToList()[i]);
            }
            ViewData["checkBox"] = getCheckBox;
            return(PartialView("TablesView", schema.d_b_tables));
        }