/// <summary> /// 条件查询 /// </summary> /// <param name="condition">查询条件</param> /// <returns>查询结果</returns> public IList <Meterial> Select(dynamic condition) { string SQL = SQLBuilder.BuildSelectSQL(condition, TableName); var meterials = Connection.QuerySql <Meterial>(SQL, (object)condition); return(meterials); }
/// <summary> /// 条件查询 /// </summary> /// <param name="condition">查询条件</param> /// <returns>查询结果</returns> public IList <Dishes> Select(dynamic condition) { string SQL = SQLBuilder.BuildSelectSQL(condition, TableName); var dishess = Connection.QuerySql <Dishes>(SQL, (object)condition); return(dishess); }
/// <summary> /// 查询全部未删除的数据 /// </summary> /// <returns>查询结果</returns> public IList <Meterial> SelectAll() { string SQL = SQLBuilder.BuildSelectSQL(new { is_deleted = false }, TableName); var meterials = Connection.QuerySql <Meterial>(SQL, new { is_deleted = false }); return(meterials); }
/// <summary> /// 条件查询 /// </summary> /// <param name="condition">查询条件</param> /// <returns>查询结果</returns> public IList <VisitRecord> Select(dynamic condition) { string SQL = SQLBuilder.BuildSelectSQL(condition, TableName); var records = Connection.QuerySql <VisitRecord>(SQL, (object)condition); return(records); }
/// <summary> /// 查询全部未删除的数据 /// </summary> /// <returns>查询结果</returns> public IList <Dishes> SelectAll() { string SQL = SQLBuilder.BuildSelectSQL(new { is_deleted = false }, TableName); var dishess = Connection.QuerySql <Dishes>(SQL, new { is_deleted = false }); return(dishess); }
/// <summary> /// 条件查询 /// </summary> /// <param name="condition">查询条件</param> /// <returns>查询结果</returns> public IList <Employee> Select(dynamic condition) { string SQL = SQLBuilder.BuildSelectSQL(condition, TableName); var employees = Connection.QuerySql <Employee>(SQL, (object)condition); return(employees); }
/// <summary> /// 条件查询 /// </summary> /// <param name="condition">查询条件</param> /// <returns>查询结果</returns> public IList <Order> Select(dynamic condition) { string SQL = SQLBuilder.BuildSelectSQL(condition, TableName); var orders = Connection.QuerySql <Order>(SQL, (object)condition); return(orders); }
/// <summary> /// 查询全部未删除的数据 /// </summary> /// <returns>查询结果</returns> public IList <Consumer> SelectAll() { string SQL = SQLBuilder.BuildSelectSQL(new { is_deleted = false }, TableName); var consumers = Connection.QuerySql <Consumer>(SQL, new { is_deleted = false }); return(consumers); }
/// <summary> /// 获取材料列表 /// </summary> /// <param name="dishes_id">给定菜品id</param> /// <returns>材料id列表</returns> public IList <Consume> GetConsumeMeterials(string dishes_id) { var con = new { dishes_id = dishes_id }; string SQL = SQLBuilder.BuildSelectSQL(con, TableName); var meterials = Connection.QuerySql <Consume>(SQL, (Object)con); return(meterials); }
/// <summary> /// 查看账户密码是否存在 /// </summary> /// <param name=""></param> /// <returns></returns> public bool IsRight(Employee employee) { string SQL = SQLBuilder.BuildSelectSQL(new { employee_name = employee.employee_name, password = employee.password }, TableName); var result = Connection.QuerySql <Employee>(SQL, employee); if (result.Count == 0) { return(false); } else { employee.titel_name = result[0].titel_name; return(true); } }