Beispiel #1
0
 public virtual List <CandidatesContract> SelectBy_CandidateId(string authId, SelectBy_CandidateIdPx px)
 {
     try {
         return
             (Can(authId, (int)PermissionEnum.Client_Candidates_SelectBy_CandidateId)
                                 ? CandidatesLogic.SelectBy_CandidateIdNow(px.CandidateId)
                                 : null);//cant
     } catch (Exception ex) {
                 #if DEBUG
         Debug.WriteLine("------------------------------");
         Debug.WriteLine("------ CandidatesServiceBase.SelectBy_CandidateId ERROR ------");
         Debug.WriteLine("------------------------------");
         Debug.WriteLine(ex.Message);
         Debug.WriteLine(ex.ToString());
         Debug.WriteLine("------------------------------");
                 #endif
         throw;
     }
 }
Beispiel #2
0
 public virtual bool Exists(string authId, string fldCandidateId)
 {
     try {
         return
             (Can(authId, (int)PermissionEnum.Client_Candidates_Exists)
                                 ? CandidatesLogic.ExistsNow((int)Convert.ChangeType(fldCandidateId, typeof(int)))
                                 : false); //cant
     } catch (Exception ex) {
                 #if DEBUG
         Debug.WriteLine("------------------------------");
         Debug.WriteLine("------ CandidatesServiceBase.Exists ERROR ------");
         Debug.WriteLine("------------------------------");
         Debug.WriteLine(ex.Message);
         Debug.WriteLine(ex.ToString());
         Debug.WriteLine("------------------------------");
                 #endif
         throw;
     }
 }
Beispiel #3
0
 public virtual CandidatesContract Get(string authId, string fldCandidateId)
 {
     try {
         if (Can(authId, (int)PermissionEnum.Client_Candidates_SelectBy_CandidateId))
         {
             var results = CandidatesLogic.SelectBy_CandidateIdNow((int)Convert.ChangeType(fldCandidateId, typeof(int)));
             return(results.Count == 0 ? null : results[0]);
         }
         return(null);                //cant
     } catch (Exception ex) {
                 #if DEBUG
         Debug.WriteLine("------------------------------");
         Debug.WriteLine("------ CandidatesServiceBase.SelectBy_CandidateId ERROR ------");
         Debug.WriteLine("------------------------------");
         Debug.WriteLine(ex.Message);
         Debug.WriteLine(ex.ToString());
         Debug.WriteLine("------------------------------");
                 #endif
         throw;
     }
 }