12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using CB.Entity;
- using CB.Interface.Infrastructure;
- using System.Collections.Generic;
- using System.Data;
- using System.Data.Common;
- using System.Data.SqlClient;
- using CB.Common;
- namespace CB.Data.SqlServer
- {
- public class PicClassManage : Repository<PicClassInfo>, IPicClassService
- {
- public PicClassManage(string interfaceId) : base(interfaceId)
- {
- }
- public override bool Save(PicClassInfo entity)
- {
- throw new System.NotImplementedException();
- }
- public override bool Update(PicClassInfo entity)
- {
- throw new System.NotImplementedException();
- }
- public override bool Delete(int Id)
- {
- throw new System.NotImplementedException();
- }
- public override PicClassInfo Get<TKey>(TKey key)
- {
- throw new System.NotImplementedException();
- }
- public override IList<PicClassInfo> ToList()
- {
- DbParameter[] parameters = new SqlParameter[] { };
- using (DataTable dt = DbHelper.ExecuteDatatable(InterfaceId, CommandType.StoredProcedure, "uzt_PicClass_GetList", parameters))
- {
- List<PicClassInfo> lists = new List<PicClassInfo>();
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- lists.Add(LoadEntity(dt.Rows[i]));
- }
- return lists;
- }
- }
- public override IList<PicClassInfo> ToList(PicClassInfo entity)
- {
- throw new System.NotImplementedException();
- }
- public override IList<PicClassInfo> ToPaging(PicClassInfo entity, int pageSize, int pageIndex, out int recordCount)
- {
- throw new System.NotImplementedException();
- }
- /// <summary>
- /// IDataReader数据转换实体
- /// </summary>
- /// <param name="row">IDataReader</param>
- /// <returns></returns>
- protected override PicClassInfo LoadEntity(IDataReader row)
- {
- return new PicClassInfo
- {
- Id = TypeConverter.ObjectToInt(row["Id"]),
- Cid = TypeConverter.ObjectToInt(row["Cid"]),
- Pid = TypeConverter.ObjectToInt(row["Pid"])
- };
- }
- /// <summary>
- /// DataRow数据转换实体
- /// </summary>
- /// <param name="row">DataRow</param>
- /// <returns></returns>
- protected override PicClassInfo LoadEntity(DataRow row)
- {
- return new PicClassInfo
- {
- Id = TypeConverter.ObjectToInt(row["Id"]),
- Cid = TypeConverter.ObjectToInt(row["Cid"]),
- Pid = TypeConverter.ObjectToInt(row["Pid"])
- };
- }
- }
- }
|