【小程序】【在线缴费系统】(三)管理端功能-登录-数据库+逻辑处理
导读部分
教程目录:http://www.sufeinet.com/thread-40967-1-1.html
教程部分
数据库设计:
Model层:
[C#] 纯文本查看 复制代码 using SufeiDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace zaixianjiaofei_demo.Model.data
{
/// <summary>
/// 系统登录用户信息表
/// </summary>
public class sys_user
{
[OrmLiteField(IsPrimaryKey = true, InsertIgnore = true)]
public int id { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string username { get; set; }
/// <summary>
/// 密码
/// </summary>
public string pwd { get; set; }
/// <summary>
/// 用户类型(1超级管理员, 0校区管理员)
/// </summary>
public int usertype { get; set; }
/// <summary>
/// 添加时间
/// </summary>
[OrmLiteField(Ignore = true)]
public DateTime addtime { get; set; }
/// <summary>
/// 添加时间str
/// </summary>
[OrmLiteField(Ignore = true)]
public string addtimestr { get { return addtime.ToString("yyyy-MM-dd HH:mm:ss"); } }
/// <summary>
/// 是否已删除(0否, 1是)
/// </summary>
public int isdel { get; set; }
}
}
BLL层:
[C#] 纯文本查看 复制代码
using zaixianjiaofei_demo.Model.data;
using SufeiDAL.BaseApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace zaixianjiaofei_demo.BLL.data
{
public class sys_userBLL : BaseDAL<sys_user>
{
/// <summary>
/// 数据库链接字符串
/// </summary>
protected override string ConnName
{
get { return DALConfig.Zaixianjiaofei; }
}
}
}
|