private bool CheckLogin(string userID, string password) { JuicERP.DAL.JuicDao dao = new DAL.JuicDao("MENU"); try { var tb = dao.GetUser(userID); if (tb.Rows.Count > 0) { return(Decrypt(Convert.ToString(tb.Rows[0]["Password"]).Trim()) == password); } else { return(false); } } finally { dao = null; } }