1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Data.Common;
- using CB.Common;
- using CB.Entity;
- using CB.Interface.Infrastructure;
- namespace CB.Data.SqlServer
- {
- public class UsersManage : Repository<UserInfo>, IUsersService
- {
- public UsersManage(string interfaceId)
- : base(interfaceId)
- {
- }
- public override bool Save(UserInfo entity)
- {
- throw new NotImplementedException();
- }
- public override bool Update(UserInfo entity)
- {
- throw new NotImplementedException();
- }
- public override bool Delete(int Id)
- {
- throw new NotImplementedException();
- }
- public override UserInfo Get<TKey>(TKey key)
- {
- throw new NotImplementedException();
- }
- public override IList<UserInfo> ToList()
- {
- throw new NotImplementedException();
- }
- public override IList<UserInfo> ToList(UserInfo entity)
- {
- throw new NotImplementedException();
- }
- public override IList<UserInfo> ToPaging(UserInfo entity, int pageSize, int pageIndex, out int recordCount)
- {
- throw new NotImplementedException();
- }
- protected override UserInfo LoadEntity(DataRow dr)
- {
- return new UserInfo
- {
- Uid = TypeConverter.ObjectToInt(dr["Uid"]),
- UserName = dr["UserName"].ToString().Trim(),
- UserPWD = dr["UserPWD"].ToString(),
- NickName = dr["NickName"].ToString().Trim(),
- GroupId = TypeConverter.ObjectToInt(dr["GroupId"]),
- Times = TypeConverter.ObjectToInt(dr["Times"]),
- LastVisit = TypeConverter.ObjectToDateTime(dr["LastVisit"], DateTime.MinValue),
- LastIp = dr["LastIp"].ToString().Trim(),
- RegDate = TypeConverter.ObjectToDateTime(dr["OSInfo"], DateTime.MinValue),
- RegIp = dr["RegIp"].ToString().Trim()
- };
- }
- protected override UserInfo LoadEntity(IDataReader reader)
- {
- return new UserInfo
- {
- Uid = TypeConverter.ObjectToInt(reader["Uid"]),
- UserName = reader["UserName"].ToString().Trim(),
- UserPWD = reader["UserPWD"].ToString(),
- NickName = reader["NickName"].ToString().Trim(),
- GroupId = TypeConverter.ObjectToInt(reader["GroupId"]),
- Times = TypeConverter.ObjectToInt(reader["Times"]),
- LastVisit = TypeConverter.ObjectToDateTime(reader["LastVisit"], DateTime.MinValue),
- LastIp = reader["LastIp"].ToString().Trim(),
- RegDate = TypeConverter.ObjectToDateTime(reader["OSInfo"], DateTime.MinValue),
- RegIp = reader["RegIp"].ToString().Trim()
- };
- }
- }
- }
|