예제 #1
0
        public void UploadEmployeePerformanceData(Guid userId, EmployeePerformance performanceData)
        {
            var employeePerformance = SerializeEmployeePerformance(performanceData);
            var date = DateTime.Now.ToString();

            UploadEmployeeFile(userId, "Performance " + date, employeePerformance);
        }
예제 #2
0
        public EmployeePerformance GetEmployeePerformanceData(string userName)
        {
            var employeePerformance = new EmployeePerformance();

            employeePerformance.categoryInfo      = GetCategoryInfo(userName);
            employeePerformance.statusInfo        = GetStatusInfo(userName);
            employeePerformance.knowledgeBaseInfo = GetKnowledgeBaseInfo(userName);
            return(employeePerformance);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
            }
        }