/// <summary> /// 数据条数 /// </summary> /// <param name="model">模型</param> /// <param name="connection">连接</param> /// <param name="transaction">事务</param> /// <returns>对象列表</returns> public int SelectCount(Erplogin_Role_View model = null, IDbConnection connection = null, IDbTransaction transaction = null) { var query = new LambdaQuery <Erplogin_Role_View>(); if (model != null) { if (!model.erpLoginId.IsNullOrEmpty()) { query.Where(p => p.erpLoginId == model.erpLoginId); } if (!model.ErproleId.IsNullOrEmpty()) { query.Where(p => p.ErproleId == model.ErproleId); } if (!model.erpLoginName.IsNullOrEmpty()) { query.Where(p => p.erpLoginName == model.erpLoginName); } if (!model.erpLoginPwd.IsNullOrEmpty()) { query.Where(p => p.erpLoginPwd == model.erpLoginPwd); } if (!model.ErproleName.IsNullOrEmpty()) { query.Where(p => p.ErproleName == model.ErproleName); } if (!model.ERProlePower.IsNullOrEmpty()) { query.Where(p => p.ERProlePower == model.ERProlePower); } } return(query.GetQueryCount(connection, transaction)); }
public Erplogin_Role_Views(Erplogin_Role_View user) { //Id this.erpLoginId = user.erpLoginId; //角色Id this.ErproleId = user.ErproleId; //账号 this.erpLoginName = user.erpLoginName; //角色名 this.ErproleName = user.ErproleName; //密码 this.erpLoginPwd = user.erpLoginPwd; //权限 this.ERProlePower = user.ERProlePower; }
/// <summary> /// 根据分页筛选数据 /// </summary> /// <param name="Key">主键</param> /// <param name="start">开始数据</param> /// <param name="PageSize">页面长度</param> /// <param name="desc">排序</param> /// <param name="model">对象</param> /// <returns>对象列表</returns> public List <Erplogin_Role_View> SelectByPage(string Key, int start, int PageSize, bool desc, Erplogin_Role_View model, string SelectFiled) { return(Erplogin_Role_ViewOper.Instance.SelectByPage(Key, start, PageSize, desc, model)); }
/// <summary> /// 数据条数 /// </summary> /// <param name="model">模型</param> /// <returns>对象列表</returns> public int SelectCount(Erplogin_Role_View model) { return(Erplogin_Role_ViewOper.Instance.SelectCount(model)); }
/// <summary> /// 筛选全部数据 /// </summary> /// <param name="model">模型</param> /// <returns>对象列表</returns> public List <Erplogin_Role_View> SelectByModel(Erplogin_Role_View model) { return(Erplogin_Role_ViewOper.Instance.SelectAll(model)); }
/// <summary> /// 筛选全部数据 /// </summary> /// <param name="model">模型</param> /// <param name="connection">连接</param> /// <param name="transaction">事务</param> /// <returns>对象列表</returns> public List <Erplogin_Role_View> SelectAll(Erplogin_Role_View model = null, string SelectFiled = null, IDbConnection connection = null, IDbTransaction transaction = null) { var query = new LambdaQuery <Erplogin_Role_View>(); if (model != null) { if (!model.erpLoginId.IsNullOrEmpty()) { query.Where(p => p.erpLoginId == model.erpLoginId); } if (!model.ErproleId.IsNullOrEmpty()) { query.Where(p => p.ErproleId == model.ErproleId); } if (!model.erpLoginName.IsNullOrEmpty()) { query.Where(p => p.erpLoginName == model.erpLoginName); } if (!model.erpLoginPwd.IsNullOrEmpty()) { query.Where(p => p.erpLoginPwd == model.erpLoginPwd); } if (!model.ErproleName.IsNullOrEmpty()) { query.Where(p => p.ErproleName == model.ErproleName); } if (!model.ERProlePower.IsNullOrEmpty()) { query.Where(p => p.ERProlePower == model.ERProlePower); } } if (SelectFiled != null) { SelectFiled = SelectFiled.ToLowerInvariant(); if (SelectFiled.Contains("erploginid,")) { query.Select(p => new { p.erpLoginId }); } if (SelectFiled.Contains("erproleid,")) { query.Select(p => new { p.ErproleId }); } if (SelectFiled.Contains("erploginname,")) { query.Select(p => new { p.erpLoginName }); } if (SelectFiled.Contains("erploginpwd,")) { query.Select(p => new { p.erpLoginPwd }); } if (SelectFiled.Contains("erprolename,")) { query.Select(p => new { p.ErproleName }); } if (SelectFiled.Contains("erprolepower,")) { query.Select(p => new { p.ERProlePower }); } } return(query.GetQueryList(connection, transaction)); }
/// <summary> /// 根据分页筛选数据 /// </summary> /// <param name="Key">主键</param> /// <param name="start">开始数据</param> /// <param name="PageSize">页面长度</param> /// <param name="desc">排序</param> /// <param name="model">对象</param> /// <param name="connection">连接</param> /// <param name="transaction">事务</param> /// <returns>对象列表</returns> public List <Erplogin_Role_View> SelectByPage(string Key, int start, int PageSize, bool desc = true, Erplogin_Role_View model = null, string SelectFiled = null, IDbConnection connection = null, IDbTransaction transaction = null) { var query = new LambdaQuery <Erplogin_Role_View>(); if (model != null) { if (!model.erpLoginId.IsNullOrEmpty()) { query.Where(p => p.erpLoginId == model.erpLoginId); } if (!model.ErproleId.IsNullOrEmpty()) { query.Where(p => p.ErproleId == model.ErproleId); } if (!model.erpLoginName.IsNullOrEmpty()) { query.Where(p => p.erpLoginName == model.erpLoginName); } if (!model.erpLoginPwd.IsNullOrEmpty()) { query.Where(p => p.erpLoginPwd == model.erpLoginPwd); } if (!model.ErproleName.IsNullOrEmpty()) { query.Where(p => p.ErproleName == model.ErproleName); } if (!model.ERProlePower.IsNullOrEmpty()) { query.Where(p => p.ERProlePower == model.ERProlePower); } } if (SelectFiled != null) { SelectFiled = SelectFiled.ToLowerInvariant(); if (SelectFiled.Contains("erploginid,")) { query.Select(p => new { p.erpLoginId }); } if (SelectFiled.Contains("erproleid,")) { query.Select(p => new { p.ErproleId }); } if (SelectFiled.Contains("erploginname,")) { query.Select(p => new { p.erpLoginName }); } if (SelectFiled.Contains("erploginpwd,")) { query.Select(p => new { p.erpLoginPwd }); } if (SelectFiled.Contains("erprolename,")) { query.Select(p => new { p.ErproleName }); } if (SelectFiled.Contains("erprolepower,")) { query.Select(p => new { p.ERProlePower }); } } if (Key != null) { query.OrderByKey(Key, desc); } return(query.GetQueryPageList(start, PageSize, connection, transaction)); }