Example #1
0
 /// <summary>
 /// 加载数据库管理用户控件时触发的事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UCShujuku_Load(object sender, EventArgs e)
 {
     if (Setting._currentdb != string.Empty)
     {
         List <string> list_table = mycontroller.GetTablesName();
         if (list_table.Contains(Setting._currentdb))
         {
             lbl_dbname.Text = Setting._currentdb;
         }
         else
         {
             //获得所有数据表名称
             lbl_dbname.Text = list_table[0];
         }
     }
     else
     {
         //获得所有数据表名称
         List <string> list_table = mycontroller.GetTablesName();
         lbl_dbname.Text = list_table[0];
     }
 }
Example #2
0
 /// <summary>
 /// 获得数据库中所有数据表
 /// </summary>
 /// <returns></returns>
 public string[] GetTableName()
 {
     return(chhelper.GetTablesName().ToArray());
 }