| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CallCenterApi.BLL
- {
- public class archives
- {
- private readonly DAL.archives dal = new DAL.archives();
- /// <summary>
- /// 获取档案物资表数据信息
- /// </summary>
- /// <returns></returns>
- public DataSet GetList()
- {
- return dal.GetList();
- }
- /// <summary>
- /// 是否存在该记录
- /// </summary>
- public bool IfHave(int id)
- {
- return dal.IfHave(id);
- }
- /// <summary>
- /// 增加一条档案物资数据
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public int Add(CallCenterApi.Model.archives model)
- {
- return dal.Add(model);
- }
- /// <summary>
- /// 得到一个档案物资对象实体
- /// </summary>
- public CallCenterApi.Model.archives GetModel(int id)
- {
- return dal.GetModel(id);
- }
- /// <summary>
- /// 更新一条档案物资数据
- /// </summary>
- public bool Update(CallCenterApi.Model.archives model)
- {
- return dal.Update(model);
- }
- /// <summary>
- /// 删除一条档案物资数据
- /// </summary>
- public bool Delete(int id)
- {
- return dal.Delete(id);
- }
- /// <summary>
- /// 获取物资状态信息 用作可选的下拉框选项
- /// </summary>
- /// <returns></returns>
- public DataSet GetArchivestate()
- {
- return dal.GetArchivestate();
- }
- /// <summary>
- /// 增加物资状态数据
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public int Addarchivestate(CallCenterApi.Model.archivestate model)
- {
- return dal.Addarchivestate(model);
- }
- /// <summary>
- /// 删除一条物资状态信息
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool delarchivestate(int id)
- {
- return dal.delarchivestate(id);
- }
- /// <summary>
- /// 根据档案名称获取档案状态id
- /// </summary>
- /// <param name="statename"></param>
- /// <returns></returns>
- public int GetStateid(string statename)
- {
- return dal.GetStateid(statename);
- }
- /// <summary>
- /// 根据id 修改档案物资的状态
- /// </summary>
- /// <returns></returns>
- public bool updateState(int id, int stateid)
- {
- return dal.updateState(id,stateid);
- }
- /// <summary>
- /// 获取外部客户操作表信息
- /// </summary>
- /// <returns></returns>
- public DataSet GetCustomerBorrow()
- {
- return dal.GetCustomerBorrow();
- }
- /// <summary>
- /// 外部客户操作信息添加
- /// </summary>
- /// <returns></returns>
- public int AddCustomerBorrow(CallCenterApi.Model.customerBorrow model)
- {
- return dal.AddCustomerBorrow(model);
- }
- /// <summary>
- /// 获取客户操作表实体
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public CallCenterApi.Model.customerBorrow GetCustomerModel(int id)
- {
- return dal.GetCustomerModel(id);
- }
- /// <summary>
- /// 根据微信openid获取客户名称
- /// </summary>
- /// <param name="openid"></param>
- /// <returns></returns>
- public string GetCustomerName(string openid)
- {
- return dal.GetCustomerName(openid);
- }
- /// <summary>
- /// 修改客户操作信息
- /// </summary>
- /// <returns></returns>
- public bool UpCustomerBorrow(CallCenterApi.Model.customerBorrow model)
- {
- return dal.UpCustomerBorrow(model);
- }
- /// <summary>
- /// 删除一条客户操作信息
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool delCustomerBorrow(int id)
- {
- return dal.delCustomerBorrow(id);
- }
- /// <summary>
- /// 获取内部操作表信息
- /// </summary>
- /// <returns></returns>
- public DataSet GetinsideOperation()
- {
- return dal.GetinsideOperation();
- }
- /// <summary>
- /// 内部员工操作信息添加
- /// </summary>
- /// <returns></returns>
- public int AddinsideOperation(CallCenterApi.Model.insideOperation model)
- {
- return dal.AddinsideOperation(model);
- }
- /// <summary>
- /// 修改和互操作信息
- /// </summary>
- /// <returns></returns>
- public bool UpinsideOperation(CallCenterApi.Model.insideOperation model)
- {
- return dal.UpinsideOperation(model);
- }
- /// <summary>
- /// 获取内部员工操作表实体
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public CallCenterApi.Model.insideOperation GetinsideOperationModel(int id)
- {
- return dal.GetinsideOperationModel(id);
- }
- /// <summary>
- /// 删除一条内部员工操作信息
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool delinsideOperation(int id)
- {
- return dal.delinsideOperation(id);
- }
- /// <summary>
- /// 获取操作日志表信息
- /// </summary>
- /// <returns></returns>
- public DataSet GetOperationlog()
- {
- return dal.GetOperationlog();
- }
- /// <summary>
- /// 操作日志信息添加
- /// </summary>
- /// <returns></returns>
- public int AddOperationlog(CallCenterApi.Model.Operationlog model)
- {
- return dal.AddOperationlog(model);
- }
- /// <summary>
- /// 获得档案物资数据列表 导入部分
- /// </summary>
- public List<Model.archives> DataTableToList(DataTable dt)
- {
- List<Model.archives> modelList = new List<Model.archives>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- Model.archives model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = dal.DataRowToModelarchives(dt.Rows[n]);
- if (model != null)
- {
- modelList.Add(model);
- }
- }
- }
- return modelList;
- }
- /// <summary>
- /// 获得物资状态数据列表 导入部分
- /// </summary>
- public List<Model.archivestate> DataTableToList1(DataTable dt)
- {
- List<Model.archivestate> modelList = new List<Model.archivestate>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- Model.archivestate model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = dal.DataRowToModelarchives1(dt.Rows[n]);
- if (model != null)
- {
- modelList.Add(model);
- }
- }
- }
- return modelList;
- }
- /// <summary>
- /// 获得客户操作借阅归还数据列表
- /// </summary>
- public List<Model.customerBorrow> DataTableToListcustomerBorrow(DataTable dt)
- {
- List<Model.customerBorrow> modelList = new List<Model.customerBorrow>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- Model.customerBorrow model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = dal.DataRowToModelcustomerBorrow(dt.Rows[n]);
- if (model != null)
- {
- modelList.Add(model);
- }
- }
- }
- return modelList;
- }
- /// <summary>
- /// 获得内部员工操作出入库数据列表 导入部分 分页部分
- /// </summary>
- public List<Model.insideOperation> DataTableToListinsideOperation(DataTable dt)
- {
- List<Model.insideOperation> modelList = new List<Model.insideOperation>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- Model.insideOperation model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = dal.DataRowToModelinsideOperation(dt.Rows[n]);
- if (model != null)
- {
- modelList.Add(model);
- }
- }
- }
- return modelList;
- }
- /// <summary>
- /// 获得操作记录信息数据列表 导入部分
- /// </summary>
- public List<Model.Operationlog> DataTableToListOperationlog(DataTable dt)
- {
- List<Model.Operationlog> modelList = new List<Model.Operationlog>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- Model.Operationlog model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = dal.DataRowToModelOperationlog(dt.Rows[n]);
- if (model != null)
- {
- modelList.Add(model);
- }
- }
- }
- return modelList;
- }
- }
- }
|