123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Models;
- using DAL;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Data.SqlClient;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DAL
- {
- public class InvitationLetterService
- {
- List<Position> excuteSql(string sql, params SqlParameter[] param)
- {
- return ServiceBase<Position>.excuteSql(new Position(), "Position", sql, CommandType.Text, param);
- }
- Position excuteType(string sql, params SqlParameter[] param)
- {
- //查询结果放入对象集合
- List<Position> hdList = excuteSql(sql, param);
- //判断集合是否为空
- if (hdList == null || hdList.Count == 0)
- //返回null
- return null;
- //返回单个对象
- return hdList[0];
- }
- public List<Position> GetAllJobTitleCn()
- {
- return excuteSql("select * from Position where Isdel=0");
- }
- public Position GetAllByJobTitleCn(string JobTitleCn)
- {
- return excuteType("select * from Position where Isdel=0 and JobTitleCn='"+ JobTitleCn + "'");
- }
- }
- }
|