Exemplo n.º 1
0
 public void DelUser(string name, string path)
 {
     users.Delete(name);
     if (userdict.ContainsKey(name))
     {
         userdict[name].DeleteAll();
         userdict.Remove(name);
     }
     else
     {
         DBDataController DBC = new DBDataController(name, dbPath);
         DBC.DeleteAll();
     }
 }
Exemplo n.º 2
0
        //增加到dict中
        public DB_ERROR AddUser(string name, string path)
        {
            if (userdict.ContainsKey(name))
            {
                return(DB_ERROR.DB_USER_TABLE_EXISTS);
            }
            DBDataController DBC = new DBDataController(name, path);
            DB_ERROR         DBE = DBC.GetLastError();

            if (DBE == DB_ERROR.DB_OK)
            {
                userdict.Add(name, DBC);
                return(DB_ERROR.DB_OK);
            }
            else
            {
                DBC.DeleteAll();
                return(DBE);
            }
        }
Exemplo n.º 3
0
 //增加到dict中
 public DB_ERROR AddUser(string name, string path)
 {
     if (userdict.ContainsKey(name))
         return DB_ERROR.DB_USER_TABLE_EXISTS;
     DBDataController DBC = new DBDataController(name, path);
     DB_ERROR DBE = DBC.GetLastError();
     if (DBE == DB_ERROR.DB_OK)
     {
         userdict.Add(name, DBC);
         return DB_ERROR.DB_OK;
     }
     else
     {
         DBC.DeleteAll();
         return DBE;
     }
 }
Exemplo n.º 4
0
 public void DelUser(string name, string path)
 {
     users.Delete(name);
     if (userdict.ContainsKey(name))
     {
         userdict[name].DeleteAll();
         userdict.Remove(name);
     }
     else
     {
         DBDataController DBC = new DBDataController(name, dbPath);
         DBC.DeleteAll();
     }
 }