|  |  | 
 |  |  |         { | 
 |  |  |             StringBuilder sqlBuilder = new StringBuilder(); | 
 |  |  |             sqlBuilder.Append("select top 1 HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationInBillMain where HBillType='3790' "); | 
 |  |  |             sqlBuilder.Append(" and HICMOBillNo=@icmoBillNo "); | 
 |  |  |             sqlBuilder.Append(" and HProcExchBillNo=@icmoBillNo "); | 
 |  |  |             sqlBuilder.Append(" and HProcID=@hProcID"); | 
 |  |  |             var model = SqlPools.GetInstance("YqnConn").GetModel<Models.M_StationBillMail>(sqlBuilder.ToString(), new {  icmoBillNo,hProcID }); | 
 |  |  |             return model; | 
 |  |  | 
 |  |  |         { | 
 |  |  |             StringBuilder sqlBuilder = new StringBuilder(); | 
 |  |  |             sqlBuilder.Append("select top 1 HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationOutBillMain where HBillType in ('3791','4788') "); | 
 |  |  |             sqlBuilder.Append(" and HICMOBillNo=@icmoBillNo "); | 
 |  |  |             sqlBuilder.Append(" and HProcExchBillNo=@icmoBillNo "); | 
 |  |  |             sqlBuilder.Append(" and HProcID=@hProcID"); | 
 |  |  |             var model = SqlPools.GetInstance("YqnConn").GetModel<Models.M_StationBillMail>(sqlBuilder.ToString(), new { icmoBillNo, hProcID }); | 
 |  |  |             return model; | 
 |  |  | 
 |  |  |         public static List<Models.M_StationBillMail> GetStationInBillMailList(string icBillNo) | 
 |  |  |         { | 
 |  |  |             StringBuilder sqlBuilder = new StringBuilder(); | 
 |  |  |             sqlBuilder.Append("select HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationInBillMain where HBillType='3790' and HICMOBillNo=@icBillNo"); | 
 |  |  |             sqlBuilder.Append("select HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationInBillMain where HBillType='3790' and HProcExchBillNo=@icBillNo"); | 
 |  |  |             var list = SqlPools.GetInstance("YqnConn").GetModelList<Models.M_StationBillMail>(sqlBuilder.ToString(), new { icBillNo }); | 
 |  |  |             return list; | 
 |  |  |         } | 
 |  |  | 
 |  |  |         public static List<Models.M_StationBillMail> GetStationOutBillMailList(string icBillNo) | 
 |  |  |         { | 
 |  |  |             StringBuilder sqlBuilder = new StringBuilder(); | 
 |  |  |             sqlBuilder.Append("select HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationOutBillMain where HBillType in ('3791','4788') and HICMOBillNo=@icBillNo"); | 
 |  |  |             sqlBuilder.Append("select HBillType,HInterID,HDate,HBillNo,HICMOBillNo,HEmpID,HProcID from Sc_StationOutBillMain where HBillType in ('3791','4788') and HProcExchBillNo=@icBillNo"); | 
 |  |  |             var list = SqlPools.GetInstance("YqnConn").GetModelList<Models.M_StationBillMail>(sqlBuilder.ToString(), new { icBillNo }); | 
 |  |  |             return list; | 
 |  |  |         } |