| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CallCenterApi.BLL
- {
- /// <summary>
- /// T_Repository_List_log
- /// </summary>
- public partial class T_Repository_List_log
- {
- private readonly CallCenterApi.DAL.T_Repository_List_log dal = new CallCenterApi.DAL.T_Repository_List_log();
- public T_Repository_List_log()
- { }
- #region Method
- /// <summary>
- /// 是否存在该记录
- /// </summary>
- public bool Exists(int F_LogId)
- {
- return dal.Exists(F_LogId);
- }
- /// <summary>
- /// 增加一条数据
- /// </summary>
- public int Add(CallCenterApi.Model.T_Repository_List_log model)
- {
- return dal.Add(model);
- }
- /// <summary>
- /// 更新一条数据
- /// </summary>
- public bool Update(CallCenterApi.Model.T_Repository_List_log model)
- {
- return dal.Update(model);
- }
- /// <summary>
- /// 得到一个对象实体
- /// </summary>
- public CallCenterApi.Model.T_Repository_List_log GetModel(int F_LogId)
- {
- return dal.GetModel(F_LogId);
- }
- /// <summary>
- /// 获得数据列表
- /// </summary>
- public DataSet GetList(string strWhere)
- {
- return dal.GetList(strWhere);
- }
- /// <summary>
- /// 获得前几行数据
- /// </summary>
- public DataSet GetList(int Top, string strWhere, string filedOrder)
- {
- return dal.GetList(Top, strWhere, filedOrder);
- }
- /// <summary>
- /// 获得数据列表
- /// </summary>
- public List<CallCenterApi.Model.T_Repository_List_log> GetModelList(string strWhere)
- {
- DataSet ds = dal.GetList(strWhere);
- return DataTableToList(ds.Tables[0]);
- }
- /// <summary>
- /// 获得数据列表
- /// </summary>
- public List<CallCenterApi.Model.T_Repository_List_log> DataTableToList(DataTable dt)
- {
- List<CallCenterApi.Model.T_Repository_List_log> modelList = new List<CallCenterApi.Model.T_Repository_List_log>();
- int rowsCount = dt.Rows.Count;
- if (rowsCount > 0)
- {
- CallCenterApi.Model.T_Repository_List_log model;
- for (int n = 0; n < rowsCount; n++)
- {
- model = new CallCenterApi.Model.T_Repository_List_log();
- if (dt.Rows[n]["F_LogId"] != null && dt.Rows[n]["F_LogId"].ToString() != "")
- {
- model.F_LogId = int.Parse(dt.Rows[n]["F_LogId"].ToString());
- }
- if (dt.Rows[n]["F_RepositoryId"] != null && dt.Rows[n]["F_RepositoryId"].ToString() != "")
- {
- model.F_RepositoryId = int.Parse(dt.Rows[n]["F_RepositoryId"].ToString());
- }
- if (dt.Rows[n]["F_DeptId"] != null && dt.Rows[n]["F_DeptId"].ToString() != "")
- {
- model.F_DeptId = int.Parse(dt.Rows[n]["F_DeptId"].ToString());
- }
- if (dt.Rows[n]["F_Key"] != null && dt.Rows[n]["F_Key"].ToString() != "")
- {
- model.F_Key = dt.Rows[n]["F_Key"].ToString();
- }
- if (dt.Rows[n]["F_Title"] != null && dt.Rows[n]["F_Title"].ToString() != "")
- {
- model.F_Title = dt.Rows[n]["F_Title"].ToString();
- }
- if (dt.Rows[n]["F_MainDept"] != null && dt.Rows[n]["F_MainDept"].ToString() != "")
- {
- model.F_MainDept = dt.Rows[n]["F_MainDept"].ToString();
- }
- if (dt.Rows[n]["F_PublicPhone1"] != null && dt.Rows[n]["F_PublicPhone1"].ToString() != "")
- {
- model.F_PublicPhone1 = dt.Rows[n]["F_PublicPhone1"].ToString();
- }
- if (dt.Rows[n]["F_PublicPhone2"] != null && dt.Rows[n]["F_PublicPhone2"].ToString() != "")
- {
- model.F_PublicPhone2 = dt.Rows[n]["F_PublicPhone2"].ToString();
- }
- if (dt.Rows[n]["F_PrivatePhone1"] != null && dt.Rows[n]["F_PrivatePhone1"].ToString() != "")
- {
- model.F_PrivatePhone1 = dt.Rows[n]["F_PrivatePhone1"].ToString();
- }
- if (dt.Rows[n]["F_PrivatePhone2"] != null && dt.Rows[n]["F_PrivatePhone2"].ToString() != "")
- {
- model.F_PrivatePhone2 = dt.Rows[n]["F_PrivatePhone2"].ToString();
- }
- if (dt.Rows[n]["F_Points"] != null && dt.Rows[n]["F_Points"].ToString() != "")
- {
- model.F_Points = dt.Rows[n]["F_Points"].ToString();
- }
- if (dt.Rows[n]["F_BaseAnswer"] != null && dt.Rows[n]["F_BaseAnswer"].ToString() != "")
- {
- model.F_BaseAnswer = dt.Rows[n]["F_BaseAnswer"].ToString();
- }
- if (dt.Rows[n]["F_EndAnswer"] != null && dt.Rows[n]["F_EndAnswer"].ToString() != "")
- {
- model.F_EndAnswer = dt.Rows[n]["F_EndAnswer"].ToString();
- }
- if (dt.Rows[n]["F_DealType"] != null && dt.Rows[n]["F_DealType"].ToString() != "")
- {
- model.F_DealType = dt.Rows[n]["F_DealType"].ToString();
- }
- if (dt.Rows[n]["F_LegalLimitTime"] != null && dt.Rows[n]["F_LegalLimitTime"].ToString() != "")
- {
- model.F_LegalLimitTime = dt.Rows[n]["F_LegalLimitTime"].ToString();
- }
- if (dt.Rows[n]["F_PromiseLimitTime"] != null && dt.Rows[n]["F_PromiseLimitTime"].ToString() != "")
- {
- model.F_PromiseLimitTime = dt.Rows[n]["F_PromiseLimitTime"].ToString();
- }
- if (dt.Rows[n]["F_IsPay"] != null && dt.Rows[n]["F_IsPay"].ToString() != "")
- {
- model.F_IsPay = int.Parse(dt.Rows[n]["F_IsPay"].ToString());
- }
- if (dt.Rows[n]["F_PayMoney"] != null && dt.Rows[n]["F_PayMoney"].ToString() != "")
- {
- model.F_PayMoney = decimal.Parse(dt.Rows[n]["F_PayMoney"].ToString());
- }
- if (dt.Rows[n]["F_OfficeAddress"] != null && dt.Rows[n]["F_OfficeAddress"].ToString() != "")
- {
- model.F_OfficeAddress = dt.Rows[n]["F_OfficeAddress"].ToString();
- }
- if (dt.Rows[n]["F_Object"] != null && dt.Rows[n]["F_Object"].ToString() != "")
- {
- model.F_Object = dt.Rows[n]["F_Object"].ToString();
- }
- if (dt.Rows[n]["F_BusLine"] != null && dt.Rows[n]["F_BusLine"].ToString() != "")
- {
- model.F_BusLine = dt.Rows[n]["F_BusLine"].ToString();
- }
- if (dt.Rows[n]["F_OfficeTime"] != null && dt.Rows[n]["F_OfficeTime"].ToString() != "")
- {
- model.F_OfficeTime = dt.Rows[n]["F_OfficeTime"].ToString();
- }
- if (dt.Rows[n]["F_OtherDept"] != null && dt.Rows[n]["F_OtherDept"].ToString() != "")
- {
- model.F_OtherDept = dt.Rows[n]["F_OtherDept"].ToString();
- }
- if (dt.Rows[n]["F_OtherPublicPhone"] != null && dt.Rows[n]["F_OtherPublicPhone"].ToString() != "")
- {
- model.F_OtherPublicPhone = dt.Rows[n]["F_OtherPublicPhone"].ToString();
- }
- if (dt.Rows[n]["F_OtherPrivatePhone"] != null && dt.Rows[n]["F_OtherPrivatePhone"].ToString() != "")
- {
- model.F_OtherPrivatePhone = dt.Rows[n]["F_OtherPrivatePhone"].ToString();
- }
- if (dt.Rows[n]["F_Remark"] != null && dt.Rows[n]["F_Remark"].ToString() != "")
- {
- model.F_Remark = dt.Rows[n]["F_Remark"].ToString();
- }
- if (dt.Rows[n]["F_BaseOn"] != null && dt.Rows[n]["F_BaseOn"].ToString() != "")
- {
- model.F_BaseOn = dt.Rows[n]["F_BaseOn"].ToString();
- }
- if (dt.Rows[n]["F_Process"] != null && dt.Rows[n]["F_Process"].ToString() != "")
- {
- model.F_Process = dt.Rows[n]["F_Process"].ToString();
- }
- if (dt.Rows[n]["F_Material"] != null && dt.Rows[n]["F_Material"].ToString() != "")
- {
- model.F_Material = dt.Rows[n]["F_Material"].ToString();
- }
- if (dt.Rows[n]["F_Template"] != null && dt.Rows[n]["F_Template"].ToString() != "")
- {
- model.F_Template = dt.Rows[n]["F_Template"].ToString();
- }
- if (dt.Rows[n]["F_PayInfo"] != null && dt.Rows[n]["F_PayInfo"].ToString() != "")
- {
- model.F_PayInfo = dt.Rows[n]["F_PayInfo"].ToString();
- }
- if (dt.Rows[n]["F_File"] != null && dt.Rows[n]["F_File"].ToString() != "")
- {
- model.F_File = dt.Rows[n]["F_File"].ToString();
- }
- if (dt.Rows[n]["F_State"] != null && dt.Rows[n]["F_State"].ToString() != "")
- {
- model.F_State = int.Parse(dt.Rows[n]["F_State"].ToString());
- }
- if (dt.Rows[0]["F_IsUrgent"] != null && dt.Rows[0]["F_IsUrgent"].ToString() != "")
- {
- model.F_IsUrgent = int.Parse(dt.Rows[0]["F_IsUrgent"].ToString());
- }
- if (dt.Rows[n]["F_CreateBy"] != null && dt.Rows[n]["F_CreateBy"].ToString() != "")
- {
- model.F_CreateBy = dt.Rows[n]["F_CreateBy"].ToString();
- }
- if (dt.Rows[n]["F_CreateOn"] != null && dt.Rows[n]["F_CreateOn"].ToString() != "")
- {
- model.F_CreateOn = DateTime.Parse(dt.Rows[n]["F_CreateOn"].ToString());
- }
- if (dt.Rows[n]["F_Action"] != null && dt.Rows[n]["F_Action"].ToString() != "")
- {
- model.F_Action = int.Parse(dt.Rows[n]["F_Action"].ToString());
- }
- modelList.Add(model);
- }
- }
- return modelList;
- }
- /// <summary>
- /// 获得数据列表
- /// </summary>
- public DataSet GetAllList()
- {
- return GetList("");
- }
- /// <summary>
- /// 分页获取数据列表
- /// </summary>
- public int GetRecordCount(string strWhere)
- {
- return dal.GetRecordCount(strWhere);
- }
- /// <summary>
- /// 分页获取数据列表
- /// </summary>
- public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
- {
- return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
- }
- #endregion Method
- }
- }
|