using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// <summary>
/// wtodo 的摘要说明
/// </summary>
public class wtodo
{
	public wtodo()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    //验证用户名和密码

    public static bool checkUser(string UserName, string PassWord)
    {
        SqlConnection conn = CDatabase.wtoconn();
        conn.Open();
        SqlCommand scd = new SqlCommand("select count(*) from UserAdmin where UserName='" + UserName + "' and UserPwd='" + PassWord + "' and isopen='open'", conn);
        
        int count = Convert.ToInt32(scd.ExecuteScalar());
        if (count > 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }


  
}
