public int AddColumn(string name, string datatype, int length, int scale, int isnull, int tableID, int precision, int isunique) { IGumruk _iGumruk = new BSGumruk(); d_b_columns col = new d_b_columns(); col.name = name; col.length = length; col.scale = scale; col.isnull = Convert.ToBoolean(isnull); col.precision = precision; col.isunique = Convert.ToBoolean(isunique); col.DataType = datatype; col.created_at = DateTime.Now; col.updated_at = DateTime.Now; col.d_b_tablesId = tableID; return(_iGumruk.NewColumn(col)); }
public JsonResult GetColumnById(int columnID) { IGumruk _iGumruk = new BSGumruk(); d_b_columns dbColumns = _iGumruk.GetColumnById(columnID); //string json = JsonConvert.SerializeObject(schemas); DataColumnForJson dt = new Models.DataColumnForJson() { Name = dbColumns.name, DataType = dbColumns.d_b_column_types.name, isNull = dbColumns.isnull == true ? "Evet" : "Hayır", Length = dbColumns.length.ToString(), Precision = dbColumns.precision.ToString(), Scale = dbColumns.scale.ToString(), Unique = dbColumns.isunique == true ? "Evet" : "Hayır", schemaID = dbColumns.d_b_tables.d_b_schemasId, }; return(Json(dt, JsonRequestBehavior.AllowGet)); }