public override int GetAmountOfRecords() { int returnValue; using (var service = new CandidatesServiceReference.CandidatesServiceClient()) { if (this.Parameter.GetType() == typeof(int)) { if ((int)this.Parameter == -1) { returnValue = service.GetAmountOfAllRecords(); } else { returnValue = service.GetAmountOfRecords((int)this.Parameter); } } else if (this.Parameter.GetType() == typeof(byte)) { returnValue = service.GetAmountOfRecordsDecisionType((byte)this.Parameter); } else { returnValue = 0; } } return(returnValue); }
public override List <object> LoadData(int pageNumber) { List <object> returnList = new List <object>(); using (var service = new CandidatesServiceReference.CandidatesServiceClient()) { if (this.Parameter.GetType() == typeof(int)) { if ((int)this.Parameter == -1) { returnList = service.GetAllCandidatesByPage(pageNumber).Cast <object>().ToList(); } else { returnList = service.GetCandidatesByPage(pageNumber, (int)this.Parameter).Cast <object>().ToList(); } } else if (this.Parameter.GetType() == typeof(byte)) { returnList = service.GetCandidatesByPageDecisionType(pageNumber, (byte)this.Parameter).Cast <object>().ToList(); } } return(returnList); }
public void InitializeSkillsNames() { using (var service = new CandidatesServiceReference.CandidatesServiceClient()) { this.Candidate.Document = null; this.Names = service.GetNotUsedSoftSkillsNames(this.Candidate); } }