public void UploadEmployeePerformanceData(Guid userId, EmployeePerformance performanceData) { var employeePerformance = SerializeEmployeePerformance(performanceData); var date = DateTime.Now.ToString(); UploadEmployeeFile(userId, "Performance " + date, employeePerformance); }
public EmployeePerformance GetEmployeePerformanceData(string userName) { var employeePerformance = new EmployeePerformance(); employeePerformance.categoryInfo = GetCategoryInfo(userName); employeePerformance.statusInfo = GetStatusInfo(userName); employeePerformance.knowledgeBaseInfo = GetKnowledgeBaseInfo(userName); return(employeePerformance); }
private string SerializeEmployeePerformance(EmployeePerformance performanceData) { var categories = SerializeCategories(performanceData.categoryInfo); var statuses = SerializeStatuses(performanceData.statusInfo); var knowledgeBases = SerializeKnowledgeBases(performanceData.knowledgeBaseInfo); var SerializedRawData = categories + "\n" + statuses + "\n" + knowledgeBases; //just return some raw stuff for now. Later maybe actually calculate some stats return(SerializedRawData); }
static void Main(string[] args) { var dbAccess = new DatabaseAccess(); var employees = dbAccess.GetListOfHelpDeskEmployees(); foreach (var employee in employees) { var performanceData = new EmployeePerformance(); performanceData = dbAccess.GetEmployeePerformanceData(employee.UserName); var hrSystem = new HrSystem(); hrSystem.UploadEmployeePerformanceData(employee.UserId, performanceData); } }