VisaCustomerService.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Models;
  6. using System.Data.SqlClient;
  7. using System.Data;
  8. namespace DAL
  9. {
  10. public class VisaCustomerService
  11. {
  12. List<VisaCustomer> excuteSql(string sql, params SqlParameter[] param)
  13. {
  14. return ServiceBase<VisaCustomer>.excuteSql(new VisaCustomer(), "VisaCustomer", sql, CommandType.Text, param);
  15. }
  16. VisaCustomer excuteType(string sql, params SqlParameter[] param)
  17. {
  18. //查询结果放入对象集合
  19. List<VisaCustomer> hdList = excuteSql(sql, param);
  20. //判断集合是否为空
  21. if (hdList == null || hdList.Count == 0)
  22. //返回null
  23. return null;
  24. //返回单个对象
  25. return hdList[0];
  26. }
  27. //增Add
  28. public bool Add(VisaCustomer Dov, out int id)
  29. {
  30. string sql = "insert into VisaCustomer values(@Diid,@Type,@LastName,@FirstName,@OldName,@Marriage,@Phone,@BirthCity,@BirthProvince,"
  31. + "@BirthDay,@Tel,@Email,@IdCard,@IdStartDate,@IdEndDate,@IdCardAddress,@Address,@HighestEducation,@PostCodes,@Client,@ClientAddress,@ClientPostCodes,@Job,@WorkDate,@Wage,@ClientPhone,"
  32. + "@ClientFax,@ClientEmail,@ClientLeader,@ClientLeaderJob,@WorkState,@IsGetSchengen,@StartTime,@EndTime,"
  33. + "@IsFinger,@FingerDate,@CostBearers,@TableOpName,@TableOpTel,@TableDate,"
  34. + "@Party,@Nationality,@Sex,@WeddingDate,@DivorceDate,@MateName,@MateBirthDay,@MateBirthCity,@MateBirthCountry,@MateAddress,@MateClient,@MateClientAddress,"
  35. + "@MateJob,@VisitCountry,@Paper,@Papent,@PhD,@IsVisitUC,@USADate,@USADays,@CanDate,@CanDays,@IsUSAVia,@GetUSAVisaDate,@GetUPPlace,"
  36. + "@USAVisaCate,@USAVisaCode,@USAFinger,@IsRejected,@RejectedDate,@RejectedPlace,@RejectedVisa,@IsRevoke,@IsLose,@LoseDate,@LoseCode,@IsUSAVisa,"
  37. + "@MateUSA,@MateIden,@WHUSA,@WHIden,@ParentUSA,@ParentIden,@ChildUSA,@ChildIden,@BroUSA,@BroIden,@Social,@IsArmy,@ArmyState,@ApplyDate,"
  38. + "@Oper,@OpDate,@passportNumber,@Isdel);SELECT @@IDENTITY";
  39. SqlParameter[] parameter = new SqlParameter[]{
  40. new SqlParameter("Diid",Dov.Diid),
  41. new SqlParameter("Type",Dov.Type),
  42. new SqlParameter("LastName",Dov.LastName),
  43. new SqlParameter("FirstName",Dov.FirstName),
  44. new SqlParameter("OldName",Dov.OldName),
  45. new SqlParameter("Marriage",Dov.Marriage),
  46. new SqlParameter("Phone",Dov.Phone),
  47. new SqlParameter("BirthCity",Dov.BirthCity),
  48. new SqlParameter("BirthProvince",Dov.BirthProvince),
  49. new SqlParameter("BirthDay",Dov.BirthDay),
  50. new SqlParameter("Tel",Dov.Tel),
  51. new SqlParameter("Email",Dov.Email),
  52. new SqlParameter("IdCard",Dov.IdCard),
  53. new SqlParameter("IdStartDate",Dov.IdStartDate),
  54. new SqlParameter("IdEndDate",Dov.IdEndDate),
  55. new SqlParameter("IdCardAddress",Dov.IdCardAddress),
  56. new SqlParameter("HighestEducation",Dov.HighestEducation),
  57. new SqlParameter("Address",Dov.Address),
  58. new SqlParameter("PostCodes",Dov.PostCodes),
  59. new SqlParameter("Client",Dov.Client),
  60. new SqlParameter("ClientAddress",Dov.ClientAddress),
  61. new SqlParameter("ClientPostCodes",Dov.ClientPostCodes),
  62. new SqlParameter("Job",Dov.Job),
  63. new SqlParameter("WorkDate",Dov.WorkDate),
  64. new SqlParameter("Wage",Dov.Wage),
  65. new SqlParameter("ClientPhone",Dov.ClientPhone),
  66. new SqlParameter("ClientFax",Dov.ClientFax),
  67. new SqlParameter("ClientEmail",Dov.ClientEmail),
  68. new SqlParameter("ClientLeader",Dov.ClientLeader),
  69. new SqlParameter("ClientLeaderJob",Dov.ClientLeaderJob),
  70. new SqlParameter("WorkState",Dov.WorkState),
  71. new SqlParameter("IsGetSchengen",Dov.IsGetSchengen),
  72. new SqlParameter("StartTime",Dov.StartTime),
  73. new SqlParameter("EndTime",Dov.EndTime),
  74. new SqlParameter("IsFinger",Dov.IsFinger),
  75. new SqlParameter("FingerDate",Dov.FingerDate),
  76. new SqlParameter("CostBearers",Dov.CostBearers),
  77. new SqlParameter("TableOpName",Dov.TableOpName),
  78. new SqlParameter("TableOpTel",Dov.TableOpTel),
  79. new SqlParameter("TableDate",Dov.TableDate),
  80. new SqlParameter("Party",Dov.Party),
  81. new SqlParameter("Nationality",Dov.Nationality),
  82. new SqlParameter("Sex",Dov.Sex),
  83. new SqlParameter("WeddingDate",Dov.WeddingDate),
  84. new SqlParameter("DivorceDate",Dov.DivorceDate),
  85. new SqlParameter("MateName",Dov.MateName),
  86. new SqlParameter("MateBirthDay",Dov.MateBirthDay),
  87. new SqlParameter("MateBirthCity",Dov.MateBirthCity),
  88. new SqlParameter("MateBirthCountry",Dov.MateBirthCountry),
  89. new SqlParameter("MateAddress",Dov.MateAddress),
  90. new SqlParameter("MateClient",Dov.MateClient),
  91. new SqlParameter("MateClientAddress",Dov.MateClientAddress),
  92. new SqlParameter("MateJob",Dov.MateJob),
  93. new SqlParameter("VisitCountry",Dov.VisitCountry),
  94. new SqlParameter("Paper",Dov.Paper),
  95. new SqlParameter("Papent",Dov.Papent),
  96. new SqlParameter("PhD",Dov.PhD),
  97. new SqlParameter("IsVisitUC",Dov.IsVisitUC),
  98. new SqlParameter("USADate",Dov.USADate),
  99. new SqlParameter("USADays",Dov.USADays),
  100. new SqlParameter("CanDate",Dov.CanDate),
  101. new SqlParameter("CanDays",Dov.CanDays),
  102. new SqlParameter("IsUSAVia",Dov.IsUSAVia),
  103. new SqlParameter("GetUSAVisaDate",Dov.GetUSAVisaDate),
  104. new SqlParameter("GetUPPlace",Dov.GetUPPlace),
  105. new SqlParameter("USAVisaCate",Dov.USAVisaCate),
  106. new SqlParameter("USAVisaCode",Dov.USAVisaCode),
  107. new SqlParameter("USAFinger",Dov.USAFinger),
  108. new SqlParameter("IsRejected",Dov.IsRejected),
  109. new SqlParameter("RejectedDate",Dov.RejectedDate),
  110. new SqlParameter("RejectedPlace",Dov.RejectedPlace),
  111. new SqlParameter("RejectedVisa",Dov.RejectedVisa),
  112. new SqlParameter("IsRevoke",Dov.IsRevoke),
  113. new SqlParameter("IsLose",Dov.IsLose),
  114. new SqlParameter("LoseDate",Dov.LoseDate),
  115. new SqlParameter("LoseCode",Dov.LoseCode),
  116. new SqlParameter("IsUSAVisa",Dov.IsUSAVisa),
  117. new SqlParameter("MateUSA",Dov.MateUSA),
  118. new SqlParameter("MateIden",Dov.MateIden),
  119. new SqlParameter("WHUSA",Dov.WHUSA),
  120. new SqlParameter("WHIden",Dov.WHIden),
  121. new SqlParameter("ParentUSA",Dov.ParentUSA),
  122. new SqlParameter("ParentIden",Dov.ParentIden),
  123. new SqlParameter("ChildUSA",Dov.ChildUSA),
  124. new SqlParameter("ChildIden",Dov.ChildIden),
  125. new SqlParameter("BroUSA",Dov.BroUSA),
  126. new SqlParameter("BroIden",Dov.BroIden),
  127. new SqlParameter("Social",Dov.Social),
  128. new SqlParameter("IsArmy",Dov.IsArmy),
  129. new SqlParameter("ArmyState",Dov.ArmyState),
  130. new SqlParameter("ApplyDate",Dov.ApplyDate),
  131. new SqlParameter("Oper",Dov.Oper),
  132. new SqlParameter("OpDate",Dov.OpDate),
  133. new SqlParameter("@passportNumber",Dov.passportNumber),
  134. new SqlParameter("Isdel",Dov.Isdel)
  135. };
  136. int obj = Convert.ToInt32(SqlHelper.ExecuteScalar(sql, CommandType.Text, parameter));
  137. if (obj > 0)
  138. {
  139. id = obj;
  140. return true;
  141. }
  142. id = 0;
  143. return false;
  144. }
  145. //改Update
  146. public bool Edit(VisaCustomer Dov)
  147. {
  148. string sql = "update VisaCustomer set Type=@Type,LastName=@LastName,FirstName=@FirstName,OldName=@OldName,Marriage=@Marriage,Phone=@Phone,"
  149. + "BirthCity=@BirthCity,BirthProvince=@BirthProvince,BirthDay=@BirthDay,Tel=@Tel,Email=@Email,IdCard=@IdCard,IdStartDate=@IdStartDate,IdEndDate=@IdEndDate,"
  150. + "IdCardAddress=@IdCardAddress,HighestEducation=@HighestEducation,Address=@Address,PostCodes=@PostCodes,"
  151. + "Client=@Client,ClientAddress=@ClientAddress,ClientPostCodes=@ClientPostCodes,Job=@Job,WorkDate=@WorkDate,Wage=@Wage,"
  152. + "ClientPhone=@ClientPhone,ClientFax=@ClientFax,ClientEmail=@ClientEmail,ClientLeader=@ClientLeader,"
  153. + "ClientLeaderJob=@ClientLeaderJob,WorkState=@WorkState,IsGetSchengen=@IsGetSchengen,StartTime=@StartTime,EndTime=@EndTime,"
  154. + "IsFinger=@IsFinger,FingerDate=@FingerDate,CostBearers=@CostBearers,"
  155. + "TableOpName=@TableOpName,TableOpTel=@TableOpTel,TableDate=@TableDate,Party=@Party,Nationality=@Nationality,"
  156. + "Sex=@Sex,WeddingDate=@WeddingDate,DivorceDate=@DivorceDate,MateName=@MateName,MateBirthDay=@MateBirthDay,MateBirthCity=@MateBirthCity,"
  157. + "MateBirthCountry=@MateBirthCountry,MateAddress=@MateAddress,MateClient=@MateClient,MateClientAddress=@MateClientAddress,MateJob=@MateJob,"
  158. + "VisitCountry=@VisitCountry,Paper=@Paper,Papent=@Papent,PhD=@PhD,IsVisitUC=@IsVisitUC,USADate=@USADate,USADays=@USADays,CanDate=@CanDate,"
  159. + "CanDays=@CanDays,IsUSAVia=@IsUSAVia,GetUSAVisaDate=@GetUSAVisaDate,GetUPPlace=@GetUPPlace,USAVisaCate=@USAVisaCate,USAVisaCode=@USAVisaCode,USAFinger=@USAFinger,"
  160. + "IsRejected=@IsRejected,RejectedDate=@RejectedDate,RejectedPlace=@RejectedPlace,RejectedVisa=@RejectedVisa,IsRevoke=@IsRevoke,IsLose=@IsLose,"
  161. + "LoseDate=@LoseDate,LoseCode=@LoseCode,IsUSAVisa=@IsUSAVisa,MateUSA=@MateUSA,MateIden=@MateIden,WHUSA=@WHUSA,WHIden=@WHIden,ParentUSA=@ParentUSA,"
  162. + "ParentIden=@ParentIden,ChildUSA=@ChildUSA,ChildIden=@ChildIden,BroUSA=@BroUSA,BroIden=@BroIden,Social=@Social,IsArmy=@IsArmy,ArmyState=@ArmyState,"
  163. + "ApplyDate=@ApplyDate,Oper=@Oper,OpDate=@OpDate,passportNumber=@passportNumber,Isdel=@Isdel where Id = @Id";
  164. SqlParameter[] parameter = new SqlParameter[]{
  165. new SqlParameter("Type",Dov.Type),
  166. new SqlParameter("LastName",Dov.LastName),
  167. new SqlParameter("FirstName",Dov.FirstName),
  168. new SqlParameter("OldName",Dov.OldName),
  169. new SqlParameter("Marriage",Dov.Marriage),
  170. new SqlParameter("Phone",Dov.Phone),
  171. new SqlParameter("BirthCity",Dov.BirthCity),
  172. new SqlParameter("BirthProvince",Dov.BirthProvince),
  173. new SqlParameter("BirthDay",Dov.BirthDay),
  174. new SqlParameter("Tel",Dov.Tel),
  175. new SqlParameter("Email",Dov.Email),
  176. new SqlParameter("IdCard",Dov.IdCard),
  177. new SqlParameter("IdStartDate",Dov.IdStartDate),
  178. new SqlParameter("IdEndDate",Dov.IdEndDate),
  179. new SqlParameter("IdCardAddress",Dov.IdCardAddress),
  180. new SqlParameter("HighestEducation",Dov.HighestEducation),
  181. new SqlParameter("Address",Dov.Address),
  182. new SqlParameter("PostCodes",Dov.PostCodes),
  183. new SqlParameter("Client",Dov.Client),
  184. new SqlParameter("ClientAddress",Dov.ClientAddress),
  185. new SqlParameter("ClientPostCodes",Dov.ClientPostCodes),
  186. new SqlParameter("Job",Dov.Job),
  187. new SqlParameter("WorkDate",Dov.WorkDate),
  188. new SqlParameter("Wage",Dov.Wage),
  189. new SqlParameter("ClientPhone",Dov.ClientPhone),
  190. new SqlParameter("ClientFax",Dov.ClientFax),
  191. new SqlParameter("ClientEmail",Dov.ClientEmail),
  192. new SqlParameter("ClientLeader",Dov.ClientLeader),
  193. new SqlParameter("ClientLeaderJob",Dov.ClientLeaderJob),
  194. new SqlParameter("WorkState",Dov.WorkState),
  195. new SqlParameter("IsGetSchengen",Dov.IsGetSchengen),
  196. new SqlParameter("StartTime",Dov.StartTime),
  197. new SqlParameter("EndTime",Dov.EndTime),
  198. new SqlParameter("IsFinger",Dov.IsFinger),
  199. new SqlParameter("FingerDate",Dov.FingerDate),
  200. new SqlParameter("CostBearers",Dov.CostBearers),
  201. new SqlParameter("TableOpName",Dov.TableOpName),
  202. new SqlParameter("TableOpTel",Dov.TableOpTel),
  203. new SqlParameter("TableDate",Dov.TableDate),
  204. new SqlParameter("Party",Dov.Party),
  205. new SqlParameter("Nationality",Dov.Nationality),
  206. new SqlParameter("Sex",Dov.Sex),
  207. new SqlParameter("WeddingDate",Dov.WeddingDate),
  208. new SqlParameter("DivorceDate",Dov.DivorceDate),
  209. new SqlParameter("MateName",Dov.MateName),
  210. new SqlParameter("MateBirthDay",Dov.MateBirthDay),
  211. new SqlParameter("MateBirthCity",Dov.MateBirthCity),
  212. new SqlParameter("MateBirthCountry",Dov.MateBirthCountry),
  213. new SqlParameter("MateAddress",Dov.MateAddress),
  214. new SqlParameter("MateClient",Dov.MateClient),
  215. new SqlParameter("MateClientAddress",Dov.MateClientAddress),
  216. new SqlParameter("MateJob",Dov.MateJob),
  217. new SqlParameter("VisitCountry",Dov.VisitCountry),
  218. new SqlParameter("Paper",Dov.Paper),
  219. new SqlParameter("Papent",Dov.Papent),
  220. new SqlParameter("PhD",Dov.PhD),
  221. new SqlParameter("IsVisitUC",Dov.IsVisitUC),
  222. new SqlParameter("USADate",Dov.USADate),
  223. new SqlParameter("USADays",Dov.USADays),
  224. new SqlParameter("CanDate",Dov.CanDate),
  225. new SqlParameter("CanDays",Dov.CanDays),
  226. new SqlParameter("IsUSAVia",Dov.IsUSAVia),
  227. new SqlParameter("GetUSAVisaDate",Dov.GetUSAVisaDate),
  228. new SqlParameter("GetUPPlace",Dov.GetUPPlace),
  229. new SqlParameter("USAVisaCate",Dov.USAVisaCate),
  230. new SqlParameter("USAVisaCode",Dov.USAVisaCode),
  231. new SqlParameter("USAFinger",Dov.USAFinger),
  232. new SqlParameter("IsRejected",Dov.IsRejected),
  233. new SqlParameter("RejectedDate",Dov.RejectedDate),
  234. new SqlParameter("RejectedPlace",Dov.RejectedPlace),
  235. new SqlParameter("RejectedVisa",Dov.RejectedVisa),
  236. new SqlParameter("IsRevoke",Dov.IsRevoke),
  237. new SqlParameter("IsLose",Dov.IsLose),
  238. new SqlParameter("LoseDate",Dov.LoseDate),
  239. new SqlParameter("LoseCode",Dov.LoseCode),
  240. new SqlParameter("IsUSAVisa",Dov.IsUSAVisa),
  241. new SqlParameter("MateUSA",Dov.MateUSA),
  242. new SqlParameter("MateIden",Dov.MateIden),
  243. new SqlParameter("WHUSA",Dov.WHUSA),
  244. new SqlParameter("WHIden",Dov.WHIden),
  245. new SqlParameter("ParentUSA",Dov.ParentUSA),
  246. new SqlParameter("ParentIden",Dov.ParentIden),
  247. new SqlParameter("ChildUSA",Dov.ChildUSA),
  248. new SqlParameter("ChildIden",Dov.ChildIden),
  249. new SqlParameter("BroUSA",Dov.BroUSA),
  250. new SqlParameter("BroIden",Dov.BroIden),
  251. new SqlParameter("Social",Dov.Social),
  252. new SqlParameter("IsArmy",Dov.IsArmy),
  253. new SqlParameter("ArmyState",Dov.ArmyState),
  254. new SqlParameter("ApplyDate",Dov.ApplyDate),
  255. new SqlParameter("Oper",Dov.Oper),
  256. new SqlParameter("OpDate",Dov.OpDate),
  257. new SqlParameter("Isdel",Dov.Isdel),
  258. new SqlParameter("@passportNumber",Dov.passportNumber),
  259. new SqlParameter("Id",Dov.Id)
  260. };
  261. if (SqlHelper.ExecuteNonQuery(sql, CommandType.Text, parameter) > 0)
  262. return true;
  263. return false;
  264. }
  265. public List<VisaCustomer> GetPage(int pageIndex, out int sumPage, out int totalRecord, string Name)
  266. {
  267. string[] name = { "", "", "", "" };
  268. if (!string.IsNullOrEmpty(Name))
  269. {
  270. for (int i = 0; i < Name.Length; i++)
  271. {
  272. name[i] = Name.Substring(i, 1);
  273. }
  274. }
  275. string sqlwhere = "IsDel = 0 and (LastName like '%" + name[0] + "%' or FirstName like '%" + name[1] + "%')";
  276. return PageBase<VisaCustomer>.excutePageSql(new VisaCustomer(), "VisaCustomer", "VisaCustomer", "*", "id asc", sqlwhere, 20, pageIndex, out sumPage, out totalRecord);
  277. }
  278. public List<VisaCustomer> GetByDiid(int diid)
  279. {
  280. return excuteSql("select * from VisaCustomer where diid=" + diid + " and Isdel=0;");
  281. }
  282. /// <summary>
  283. ///
  284. /// </summary>
  285. /// <param name="LastName">姓</param>
  286. /// <param name="Name">名</param>
  287. /// <param name="Tel">电话</param>
  288. /// <returns></returns>
  289. public VisaCustomer GetByTypeNameTel(string LastName, string Name, string Tel)
  290. {
  291. return excuteType("select * from VisaCustomer where IsDel = 0 and FirstName = '" + Name + "' and LastName = '" + LastName + "' and Tel='" + Tel + "'");
  292. }
  293. public VisaCustomer GetByName( string LastName, string FirstName)
  294. {
  295. return excuteType("select * from VisaCustomer where LastName='"+LastName+"' and FirstName='"+FirstName+"' and Isdel=0;");
  296. }
  297. public VisaCustomer GetByDiidAndName(int Diid,string LastName, string FirstName)
  298. {
  299. return excuteType("select * from VisaCustomer where Diid=" + Diid + " and LastName='" + LastName + "' and FirstName='" + FirstName + "' and Isdel=0;");
  300. }
  301. public bool del(int id)
  302. {
  303. if ((SqlHelper.ExecuteNonQuery("update VisaCustomer set IsDel = 1 where Id=@Id", CommandType.Text, new SqlParameter("@Id", id))) > 0)
  304. return true;
  305. return false;
  306. }
  307. /// <summary>
  308. /// 按签证表类型删除
  309. /// </summary>
  310. /// <param name="id"></param>
  311. /// <param name="type"></param>
  312. /// <returns></returns>
  313. public bool DelByType(int id,int type)
  314. {
  315. string sql = "update VisaCustomer set Isdel=1 where Id=@Id and Type=@Type";
  316. SqlParameter[] parameter = new SqlParameter[]{
  317. new SqlParameter("Type",type),
  318. new SqlParameter("Id",id)
  319. };
  320. if (SqlHelper.ExecuteNonQuery(sql, CommandType.Text, parameter) > 0)
  321. return true;
  322. return false;
  323. }
  324. public VisaCustomer GetByID(int id)
  325. {
  326. return excuteType("select * from VisaCustomer where IsDel = 0 and Id = " + id);
  327. }
  328. /// <summary>
  329. /// 根据有编号修改diid
  330. /// </summary>
  331. /// <param name="id">id</param>
  332. /// <param name="diid">diid</param>
  333. public bool GetUpdateDiid(int id, int diid)
  334. {
  335. if ((SqlHelper.ExecuteNonQuery("update VisaCustomer set Diid = @diid where Id=@Id", CommandType.Text, new SqlParameter("@diid", diid), new SqlParameter("@Id", id))) > 0)
  336. return true;
  337. return false;
  338. }
  339. /// <summary>
  340. /// 用于签证客户表检索功能
  341. /// 操作者:雷怡
  342. /// 操作时间:2021.7.15 17:52
  343. /// </summary>
  344. /// <param name="LastName">姓</param>
  345. /// <param name="FirstName">名</param>
  346. /// <param name="IdCard">身份证</param>
  347. /// <param name="id">条件查询的数据编号</param>
  348. /// <returns></returns>
  349. public List<VisaCustomer> GetByNameAndCard(string LastName, string FirstName, string IdCard, int id)
  350. {
  351. string sql = "select * from VisaCustomer where Isdel=0 and id != '" + id + "' ";
  352. if (LastName != "" || LastName != null)
  353. {
  354. sql += " and LastName = '" + LastName + "' and FirstName = '" + FirstName + "'";
  355. }
  356. sql += " and Idcard = '" + IdCard + "'";
  357. return excuteSql(sql);
  358. }
  359. /// <summary>
  360. /// 身份证查询信息
  361. /// </summary>
  362. /// <param name="IdCard"></param>
  363. /// <returns></returns>
  364. public List<VisaCustomer> GetByNameAndCard(string IdCard)
  365. {
  366. string sql = "select * from VisaCustomer where Isdel=0 and Idcard = '" + IdCard + "' ";
  367. return excuteSql(sql);
  368. }
  369. /// <summary>
  370. /// 雷怡 2021-08-31 11:28
  371. /// 查询所有
  372. /// </summary>
  373. /// <returns></returns>
  374. public List<VisaCustomer> GetAll()
  375. {
  376. return excuteSql("select * from VisaCustomer where Isdel=0;");
  377. }
  378. }
  379. }