App_Code/DDL/D.DAL/ArchiveDAL.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace D.DAL
{
using D.DBUtility;
using D.Entity;
using System;
using System.Collections.Generic;
using System.Data.OleDb;
public class ArchiveDAL
{
private List<ArchiveInfo> _list = new List<ArchiveInfo>();
private int count;
private List<ArchiveInfo> list = new List<ArchiveInfo>();
public ArchiveDAL()
{
this.LoadData();
}
public bool Delete(int archiveId)
{
OleDbParameter parameter = new OleDbParameter("ArchiveId", archiveId);
AccessHelper.ExecuteNonQuery("DELETE From [Archive] WHERE ArchiveId=?", new OleDbParameter[] { parameter });
this.LoadData();
return true;
}
public void GetAll()
{
this._list = this.list;
this.count = this.list.Count;
}
public List<ArchiveInfo> GetByClassId(int classId)
{
this._list = this.list.FindAll
(
delegate (ArchiveInfo ar)
{
return ar.ClassId == classId;
}
);
this.count = this._list.Count;
return this._list;
}
public ArchiveInfo GetById(int id)
{
return this.list.Find(delegate (ArchiveInfo ar) {
return ar.ArchiveId == id;
});
}
public List<ArchiveInfo> GetByPage(int startIndex, int endIndex)
{
List<ArchiveInfo> list = new List<ArchiveInfo>((endIndex - startIndex) + 1);
startIndex--;
while (startIndex < endIndex)
{
list.Add(this._list[startIndex]);
后面还有 76 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
