Пример #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     DataRow row  = DatabaseMgr.GetUserInfo("root");
     string  id   = row["id"].ToString();
     string  pw   = row["pw"].ToString();
     string  date = row["date"].ToString();
     int?    auth = row["auth"] as int?;
 }
Пример #2
0
        private void ICD_NewUser(ICD.HEADER obj)
        {
            ICD.User msg = obj as ICD.User;

            if (DatabaseMgr.GetUserInfo(msg.userID) != null)
            {
                //send back error msg : same user id
            }
            else
            {
                //push db new user
                //ack good
            }
        }
Пример #3
0
        private void ICD_Login(int clientID, ICD.HEADER obj)
        {
            ICD.User msg = obj as ICD.User;
            DataRow  row = DatabaseMgr.GetUserInfo(msg.userID);

            if (row != null)
            {
                //if(isOKpassword)
                {
                    //loginUser();
                    //ack good
                }
                //else
                {
                    //send back error msg : wrong password
                }
            }
            else
            {
                //send back error msg : no user id
            }
        }