using System; using System.Collections.Generic; using System.Data; using System.Text; using System.Windows.Forms; using UAS_DeviceMonitor.DataOperate; using UAS_DeviceMonitor.Entity; namespace UAS_DeviceMonitor.PublicMethod { class LogicHandler { public LogicHandler() { } static DataHelper dh = SystemInf.dh; //用于拼接SQL static StringBuilder sql = new StringBuilder(); //用于存放批量执行的SQL static List sqls = new List(); /// /// 验证用户身份信息 /// /// /// /// public static bool CheckUserLogin(string iUserCode, string iPassWord, out string oErrorMessage) { oErrorMessage = ""; string SQL = "select em_code from employee where upper(em_code)=:UserName and em_password =:PassWord"; DataTable dt; dt = (DataTable)dh.ExecuteSql(SQL, "select", iUserCode.ToUpper(), iPassWord); if (dt.Rows.Count > 0) return true; else { oErrorMessage = "用户名或者密码不正确!"; return false; } } } }