Beispiel #1
0
        public ListViewGroup AddGroup(RefDBType refDBType)
        {
            string TypeName = null;

            switch (refDBType)
            {
            case RefDBType.MSAccess: TypeName = RefDBType.MSAccess.ToString(); break;

            case RefDBType.MSSqlServer: TypeName = RefDBType.MSSqlServer.ToString(); break;

            case RefDBType.Oracle: TypeName = RefDBType.Oracle.ToString(); break;

            case RefDBType.OleDB: TypeName = RefDBType.OleDB.ToString(); break;

            default:
                break;
            }
            if (listView1.Groups[TypeName] == null)
            {
                ListViewGroup group = new ListViewGroup(TypeName, TypeName);
                listView1.Groups.Add(group);
                return(group);
            }
            else
            {
                return(listView1.Groups[TypeName]);
            }
        }
Beispiel #2
0
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.tabControl1.SelectedTab.Text.Equals("MS SQLServer"))
     {
         _SelectDBType = RefDBType.MSSqlServer;
     }
     else if (this.tabControl1.SelectedTab.Text.Equals("Oracle"))
     {
         _SelectDBType = RefDBType.Oracle;
     }
     else if (this.tabControl1.SelectedTab.Text.Equals("MS Access"))
     {
         _SelectDBType = RefDBType.MSAccess;
     }
     else if (this.tabControl1.SelectedTab.Text.Equals("Ole DB"))
     {
         _SelectDBType = RefDBType.OleDB;
     }
 }