Example #1
0
        private void FillAllPositions()
        {
            SQLConnections sql = new SQLConnections();
            var            x   = sql.GetAllPositions();

            AllPositions = x;
        }
Example #2
0
        public void SetGridToPositions()
        {
            ShowAllFilterBoxes();
            Column0Label.Content      = "Position: ";
            Column1Label.Visibility   = Visibility.Hidden;
            Column2Label.Visibility   = Visibility.Hidden;
            Column1TextBox.Visibility = Visibility.Hidden;
            Column2TextBox.Visibility = Visibility.Hidden;
            Column0Label.Content      = "Position: ";

            SQLConnections sql = new SQLConnections();

            List <Position>   positions           = sql.GetAllPositions();
            List <ColumnData> columnDataPositions = new List <ColumnData>();

            foreach (var item in positions)
            {
                ColumnData data = new ColumnData
                {
                    Column1 = item.JobTitle,
                    Column2 = null,
                    Column3 = null,
                    Column4 = null,
                    Column5 = "Update",
                    Column6 = "Delete"
                };

                columnDataPositions.Add(data);
            }
            ResultBox.ItemsSource = columnDataPositions;
        }
Example #3
0
        private void SetGridToAll()
        {
            Column0Label.Content      = "Keyword: ";
            Column1Label.Visibility   = Visibility.Hidden;
            Column2Label.Visibility   = Visibility.Hidden;
            Column1TextBox.Visibility = Visibility.Hidden;
            Column2TextBox.Visibility = Visibility.Hidden;

            SQLConnections    sql           = new SQLConnections();
            List <Jobs>       jobsAll       = sql.GetAllJobs();
            List <Location>   locationsAll  = sql.GetAllLocations();
            List <Position>   positionsAll  = sql.GetAllPositions();
            List <ColumnData> columnDataAll = new List <ColumnData>();

            foreach (var item in jobsAll)
            {
                ColumnData data = new ColumnData
                {
                    Column1 = "Job",
                    Column2 = item.CompanyName,
                    Column3 = item.CEOName,
                    Column4 = item.Rating,
                    Column5 = "Update",
                    Column6 = "Delete"
                };
                columnDataAll.Add(data);
            }
            foreach (var item in locationsAll)
            {
                ColumnData data = new ColumnData
                {
                    Column1 = "Location",
                    Column2 = item.City,
                    Column3 = item.State,
                    Column4 = item.RatingConverted,
                    Column5 = "Update",
                    Column6 = "Delete"
                };
                columnDataAll.Add(data);
            }
            foreach (var item in positionsAll)
            {
                ColumnData data = new ColumnData
                {
                    Column1 = "Position",
                    Column2 = item.JobTitle,
                    Column3 = null,
                    Column4 = null,
                    Column5 = "Update",
                    Column6 = "Delete"
                };
                columnDataAll.Add(data);
            }
            ResultBox.ItemsSource = columnDataAll;
        }