Example #1
0
        private void NewMethod1()
        {
            if (dgvTableList.SelectedRows?.Count > 0)
            {
                string tableName = dgvTableList.SelectedRows[0].Cells[1].Value.ToString();

                if (dgvTableStruce.SelectedRows?.Count > 0)
                {
                    string colname = dgvTableStruce.SelectedRows[0].Cells[0].Value.ToString();

                    if (tableList.TryGetValue(tableName, out var table))
                    {
                        Info("查看表 " + tableName + " 列 " + colname + " 信息模板变量");
                        var coldict = table.Cols;

                        if (coldict.TryGetValue(colname, out var col))
                        {
                            //Console.WriteLine(col.ToString());
                            if (si == null)
                            {
                                si = new FrmShowInfo();
                            }
                            si.SetMsg(col.ToString());
                            si.ShowDialog();
                        }
                        //var cols = coldict.Values.ToList();

                        //foreach (var col in cols)
                        //{

                        //}
                    }
                    else
                    {
                        MessageBox.Show("没找到列信息");
                    }
                }
            }
        }
Example #2
0
        private void NewMethod()
        {
            if (dgvTableList.SelectedRows?.Count > 0)
            {
                string tableName = dgvTableList.SelectedRows[0].Cells[1].Value.ToString();
                if (tableList.TryGetValue(tableName, out var table))
                {
                    Info("查看表 " + tableName + " 表信息模板变量");
                    if (si == null)
                    {
                        si = new FrmShowInfo();
                    }
                    si.SetMsg(table.ToString());
                    si.ShowDialog();

                    //Console.WriteLine(table.ToString());
                }
                else
                {
                    MessageBox.Show("没找到表信息");
                }
            }
        }