using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace DAL
{
    public class Users
    {
        public DataTable select(string strWhere)
        {
            string sql = "select * from T_Users ";
            if (strWhere != "")
            {
                sql += " where " + strWhere;
            }
            return DBUtility.SQLHelper.GetDataTable(sql);
        }
        public bool insert(Models.Users inst)
        {
            string sql = "insert into T_Users values ( @stu_user , @stu_pwd )";
            List<SqlParameter> lists = new List<SqlParameter>();
            lists.Add(new SqlParameter("@stu_user", inst.stu_user));
            lists.Add(new SqlParameter("@stu_pwd", inst.stu_pwd));
            return DBUtility.SQLHelper.Execute(sql, lists);
        }
    }
}
