//------------------------------------------------ override public bool IsLegal() { String sqlstr = ""; string psw; if(id == ""|| password == "") return false; sqlstr = "select Psw from Administrator where AdminID="+id; DataBaseAccess DAO = new DataBaseAccess(); psw = DAO.GetScalar(sqlstr); if(psw!=null) if (psw.Equals(password)) { return true; } return false; }
//-------------------------- override public bool IsLegal() { String sqlstr = ""; //DataSet DataTable; string psw; if (name == "" || password == "") return false; sqlstr = "select Psw from Staff where name='" + name + "' and Department='信息管理'"; DataBaseAccess DAO = new DataBaseAccess(); psw = DAO.GetScalar(sqlstr); if (psw != null) if (psw.Equals(password)) { return true; } return false; }
//------------------------------------------------------ override public bool IsLegal() { String sqlstr = ""; //DataSet DataTable; string psw; if(id == ""|| password == "") return false; sqlstr = "select Psw from Customers where CustomerID='"+id+"'"; DataBaseAccess DAO=new DataBaseAccess(); psw = DAO.GetScalar(sqlstr); if (psw!=null) { if (psw.Equals(password)) { return true; } } //if(DataTable.Tables[0].Rows[0].ToString() != password || psw==null ) // return false; return false; }