43 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			43 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | |||
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Text; | |||
|  | using System.Threading.Tasks; | |||
|  | 
 | |||
|  | namespace BLL | |||
|  | { | |||
|  |     public static class RealName_ProjectService | |||
|  |     { | |||
|  |         public static Model.SGGLDB db = Funs.DB; | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         ///  | |||
|  |         /// </summary> | |||
|  |         /// <returns></returns> | |||
|  |         public static List<Model.RealName_Project> GetRealName_ProjectList() | |||
|  |         { | |||
|  |             return (from x in Funs.DB.RealName_Project orderby x.ProCode select x).ToList(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         ///  | |||
|  |         /// </summary> | |||
|  |         /// <param name="proCode"></param> | |||
|  |         /// <returns></returns> | |||
|  |         public static string GeJTproCodeByproCode(string proCode) | |||
|  |         { | |||
|  |             string code = string.Empty; | |||
|  |             var project = Funs.DB.RealName_Project.FirstOrDefault(e => e.ProCode == proCode); | |||
|  |             if (project != null) | |||
|  |             { | |||
|  |                 code = project.JTproCode; | |||
|  |                 if (string.IsNullOrEmpty(code)) | |||
|  |                 { | |||
|  |                     code = project.ProCode; | |||
|  |                 } | |||
|  |             } | |||
|  |             return code; | |||
|  |         } | |||
|  |     } | |||
|  | } |