Esempio n. 1
0
        public void populatePunches(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            if (dictionary.Count > 0)
            {
                GridFiller.PurgeGrid(logGrid);
                string[] list = new string[3];
                for (int i = 0; i < dictionary["IDKey"].Count; i++)
                {
                    list[0] = FormatFunctions.PrettyDate(dictionary["Note"][i]);
                    list[2] = FormatFunctions.PrettyDate(dictionary["State"][i]);
                    list[1] = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]);
                    if (list[2] != "less")
                    {
                        GridFiller.rapidFillColorized(list, logGrid, bool.Parse(list[2]));
                    }
                    else
                    {
                        list[2] = "Location Log";
                        GridFiller.rapidFill(list, logGrid);
                    }
                }
            }
        }
Esempio n. 2
0
        public void populateStamps(string result)
        {
            GridFiller.PurgeHeader(HourCalcBody);
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));
            List <string> clockin  = new List <string>();
            List <string> clockout = new List <string>();

            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["IDKey"].Count; i++)
                {
                    string[] y = new string[2];
                    y[0] = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]);
                    y[1] = convertState(dictionary["State"][i]);
                    if (dictionary["State"][i] == "True")
                    {
                        GridFiller.rapidFillColorized(y, HourCalcBody, true);
                        clockin.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]));
                    }
                    else if (dictionary["State"][i] == "False")
                    {
                        GridFiller.rapidFillColorized(y, HourCalcBody, false);
                        clockout.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]));
                    }
                    else
                    {
                        GridFiller.rapidFill(y, HourCalcBody);
                    }
                }
                double x = calculateHours(clockin, clockout) / 60;
                HourDisplay.Text = "Total Hours: " + x;
            }
        }
Esempio n. 3
0
        public void populateTardiGrid(string result)
        {
            GridFiller.PurgeHeader(TardiGrid);
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));
            int sick  = 0;
            int tardy = 0;

            if (dictionary["IDKey"].Count > 0)
            {
                for (int i = 0; i < dictionary["IDKey"].Count; i++)
                {
                    GridFiller.rapidFill(new string[] { dictionary["RecordType"][i], dictionary["Date"][i], dictionary["Note"][i] }, TardiGrid);
                    if (dictionary["RecordType"][i] == "Sick")
                    {
                        sick++;
                    }
                    else if (dictionary["RecordType"][i] == "Tardy")
                    {
                        tardy++;
                    }
                }
            }
            Sick.Content = "Sick Days: " + sick;
            Late.Content = "Late Days: " + tardy;
        }
Esempio n. 4
0
        public void populateLiveFeed(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            if (dictionary.Count > 0)
            {
                string[] s = new string[] { dictionary["FName"][0], convertState(dictionary["State"][0]), dictionary["Coordinates"][0], FormatFunctions.PrettyDate(dictionary["TimeStamp"][0]), FormatFunctions.getAgeOfTimestamp(FormatFunctions.PrettyDate(dictionary["TimeStamp"][0])), dictionary["Note"][0] };
                GridFiller.rapidFill(s, LiveBody);
            }
        }
Esempio n. 5
0
 public void populateTable(string result)
 {
     string[] input = FormatFunctions.SplitToPairs(result);
     dict = FormatFunctions.createValuePairs(input);
     if (dict.Count > 0)
     {
         for (int i = 0; i < dict["Description"].Count; i++)
         {
             string[] s = new string[] { dict["Description"][i], dict["Price"][i], dict["Total"][i] };
             GridFiller.rapidFill(s, BodyGrid);
         }
     }
 }
Esempio n. 6
0
        public void populateChat(string result)
        {
            GridFiller.PurgeAllGrid(ChatStack);
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["Message"].Count; i++)
                {
                    string[] s = new string[] { FormatFunctions.PrettyDate(dictionary["Timestamp"][i]) + ":" + dictionary["FName"][i] + ":" + FormatFunctions.PrettyDate(dictionary["Message"][i]) };
                    GridFiller.rapidFill(s, ChatStack);
                }
            }
        }
Esempio n. 7
0
        public void populateTardiness(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));
            List <string> clockin  = new List <string>();
            List <string> clockout = new List <string>();

            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["IDKey"].Count; i++)
                {
                    string[] y = new string[4];
                    y[0] = FormatFunctions.PrettyDate(dictionary["Date"][i]);
                    y[1] = "";
                    y[2] = FormatFunctions.PrettyDate(dictionary["Note"][i]);
                    y[3] = FormatFunctions.PrettyDate(dictionary["RecordType"][i]);
                    GridFiller.rapidFill(y, BodyGrid);
                }
            }
        }
Esempio n. 8
0
        public void populateLiveFeed(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            if (dictionary.Count > 0)
            {
                string[] s = new string[] { dictionary["FName"][0], FormatFunctions.PrettyDate(dictionary["TimeStamp"][0]), dictionary["Coordinates"][0] };

                if (dictionary["State"][0] == "True")
                {
                    GridFiller.rapidFillColorized(s, LiveBody, true);
                }
                else if (dictionary["State"][0] == "False")
                {
                    GridFiller.rapidFillColorized(s, LiveBody, false);
                }
                else
                {
                    GridFiller.rapidFill(s, LiveBody);
                }
            }
        }
Esempio n. 9
0
        public void populateStamps(string result)
        {
            GridFiller.PurgeHeader(BodyGrid);
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));
            List <string> clockin  = new List <string>();
            List <string> clockout = new List <string>();

            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["IDKey"].Count; i++)
                {
                    string[] y = new string[4];
                    y[0] = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]);
                    y[1] = FormatFunctions.PrettyDate(dictionary["Coordinates"][i]);
                    y[2] = FormatFunctions.PrettyDate(dictionary["Note"][i]);
                    y[3] = convertState(dictionary["State"][i]);
                    if (dictionary["State"][i] == "True")
                    {
                        GridFiller.rapidFillColorized(y, BodyGrid, true);
                        clockin.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]));
                    }
                    else if (dictionary["State"][i] == "False")
                    {
                        GridFiller.rapidFillColorized(y, BodyGrid, false);
                        clockout.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]));
                    }
                    else
                    {
                        GridFiller.rapidFill(y, BodyGrid);
                    }
                }
                double x = calculateHours(clockin, clockout) / 60;
                HourDisplay.Content  = "Total Hours: " + x;
                AgentDisplay.Content = "Viewing: " + Agent.SelectedValue;
                WeekDisplay.Content  = "Week of: " + DayPicker.SelectedDate;
            }
        }