| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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<string> sqls = new List<string>();
- /// <summary>
- /// 验证用户身份信息
- /// </summary>
- /// <param name="iUserCode"></param>
- /// <param name="oErrorMessage"></param>
- /// <returns></returns>
- 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;
- }
- }
- }
- }
|