OA.DAL/UserInfoService.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//============================================================
// Producnt name: TenXiang.Code
// Coded by: hotboart
// Auto generated at: 2014-1-13 15:38:31
//============================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using OA.Models;
namespace OA.DAL
{
public static partial class UserInfoService
{
//Add Mothed Start
public static readonly string InsertSql = "INSERT UserInfo (UserId,UserName, Password, DepartId, Gender, RoleId, UserStateId, Img, Card, Age, scientific, Address,Phone) VALUES (@UserId,@UserName, @Password, @DepartId, @Gender, @RoleId, @UserStateId, @Img, @Card, @Age, @scientific, @Address,@Phone)";
public static readonly string UpdateSql = "Update UserInfo set UserName=@UserName, DepartId=@DepartId, RoleId=@RoleId, UserStateId=@UserStateId, Age=@Age, Address=@Address,Phone=@Phone where UserId=@UserId";
public static readonly string DeleteSql = "Delete FROM UserInfo where UserId=@UserId";
public static readonly string SelectSql = "Select * FROM UserInfo";
public static readonly string SelectSqlById = "Select * FROM UserInfo where UserId =@UserId";
public static UserInfo GetUserInfoByUserName(string userName, string userPwd)
{
string sql = "Select * FROM UserInfo where UserId =@UserId and Password=@Password";
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@UserId", userName), new SqlParameter("@Password",userPwd)
};
IList<UserInfo> list = GetListBySql(sql, para);
if (list.Count > 0)
return list[0];
else
return null;
}
/// <summary>
/// 修改密码
/// </summary>
public static int Up(string Id, string Pass)
{
string sql = "Update UserInfo set Password='" + Pass + "' where UserId='" + Id + "'";
int result = DBHelper.ExecNonQuery(sql);
return result;
}
/// <summary>
/// 根据姓名查询部门
/// </summary>
/// <param name="username">姓名</param>
/// <param name="dep">部门</param>
/// <returns></returns>
public static IList<UserInfo> GetUserInfoByUserName(string username, int dep)
{
string sql = "";
if (dep != 0)
后面还有 182 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。