110,536
社区成员
发帖
与我相关
我的任务
分享
private static readonly string ConnString = string.Format("Provider=Microsoft.Jet.OleDb.4.0;Data Source={0};Persist Security Info=True;", AppDomain.CurrentDomain.BaseDirectory + @DBName);
/// <summary>
/// 执行查询并返回查询结果集合
/// </summary>
/// <param name="cmdStr">查询命令</param>
/// <returns></returns>
public static DataSet ExecuteQuery(string cmdStr)
{
DataSet ds = new DataSet();
using (OleDbDataAdapter adp = new OleDbDataAdapter(cmdStr,ConnString))
{
adp.Fill(ds);
}
return ds;
}
string strUser = txtUser.Text;
string strPwd = txtPwd.Text;
if (string.IsNullOrEmpty(strUser) || string.IsNullOrEmpty(strPwd))
{
YanZhao.Framework.UI.ShowMessage.ShowInformationMessage("帐号或密码不能为空");
return;
}
if (strPwd == new StudentRule().GetPwd()) //密码正确
{
//检测是否注册
RegUtils reg = new RegUtils();
if (reg.CheckUI(strUser) == false)
{
YanZhao.Framework.UI.ShowMessage.ShowInformationMessage("您尚未注册,请先注册!");
}
else
{
if (strUser.Length == 5) //招生单位
{
GetZSDW(strUser);
}
else if (strUser.Length == 4) //报名点
{
GetBMD(strUser);
}
else
{
YanZhao.Framework.UI.ShowMessage.ShowInformationMessage("帐号不正确");
}
}
}
else
{
YanZhao.Framework.UI.ShowMessage.ShowInformationMessage("密码不正确");
}