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, 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 key) { throw new NotImplementedException(); } public override IList ToList() { throw new NotImplementedException(); } public override IList ToList(UserInfo entity) { throw new NotImplementedException(); } public override IList 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() }; } } }