Ejemplo n.º 1
0
        public IActionResult Index()
        {
            if (EmployeeIsAdmin == false)
            {
                return(Redirect("~/Queue/Close"));
            }
            ViewData["Message"] = "Please Select an Queue to edit, or add a new Queue.";

            List <QueueModel>    QueueList    = new List <QueueModel>();
            List <EmployeeModel> EmployeeList = new List <EmployeeModel>();
            List <TaskModel>     TaskList     = new List <TaskModel>();

            EmployeeList = EmployeeQuery.GetEmployees();
            TaskList     = TaskQuery.GetTasks();
            QueueList    = QueueQuery.GetQueues(QueueList, loggedinEmployee, EmployeeIsAdmin);

            foreach (QueueModel QueueItem in QueueList)
            {
                QueueItem.Employee = EmployeeList.Find(x => x.EmployeeId.Equals(QueueItem.EmployeeId));

                QueueItem.Task = TaskList.Find(x => x.TaskId.Equals(QueueItem.TaskId));
            }


            return(View(QueueList));
        }
        public IActionResult Index()
        {
            ViewData["Message"] = "Please Select a QueueRoll to edit, or add a new QueueRoll.";

            List <QueueRollModel> QueueRollList = new List <QueueRollModel>();
            List <EmployeeModel>  EmployeeList  = new List <EmployeeModel>();
            List <TaskModel>      TaskList      = new List <TaskModel>();

            EmployeeList = EmployeeQuery.GetEmployees();
            TaskList     = TaskQuery.GetTasks();

            QueueRollList = QueueRollQuery.GetQueuesRoll(QueueRollList, loggedinEmployee, EmployeeIsAdmin);

            // TaskList.Find.First(x => x.Id == idArray).materialId

            foreach (QueueRollModel QueueRollItem in QueueRollList)
            {
                QueueRollItem.Employee = EmployeeList.Find(x => x.EmployeeId.Equals(QueueRollItem.EmployeeId));

                QueueRollItem.Task = TaskList.Find(x => x.TaskId.Equals(QueueRollItem.TaskId));
            }


            return(View(QueueRollList));
        }
Ejemplo n.º 3
0
        public IActionResult Index()
        {
            ViewData["Message"] = "Please Select an employee and specify a daterange to generate the report.";

            ReportModel Report = new ReportModel();

            Report.Employees = EmployeeQuery.GetEmployees();

            return(View(Report));
        }
Ejemplo n.º 4
0
        public IActionResult Index()
        {
            if (EmployeeIsAdmin == false)
            {
                return(Redirect("~/Employee/Close"));
            }
            ViewData["Message"] = "Please Select an employee to edit, or add a new employee.";

            List <EmployeeModel> EmployeeList = new List <EmployeeModel>();


            EmployeeList = EmployeeQuery.GetEmployees(EmployeeList);

            return(View(EmployeeList));
        }
Ejemplo n.º 5
0
        public IActionResult Index()
        {
            HomeModel             HomeLists     = new HomeModel();
            List <QueueRollModel> QueueRollList = new List <QueueRollModel>();
            List <EmployeeModel>  EmployeeList  = new List <EmployeeModel>();
            List <TaskModel>      TaskList      = new List <TaskModel>();

            EmployeeList = EmployeeQuery.GetEmployees();
            TaskList     = TaskQuery.GetTasks();

            QueueRollList = QueueRollQuery.GetQueuesRoll(QueueRollList, loggedinEmployee, EmployeeIsAdmin);

            foreach (QueueRollModel QueueRollItem in QueueRollList)
            {
                QueueRollItem.Employee = EmployeeList.Find(x => x.EmployeeId.Equals(QueueRollItem.EmployeeId));

                QueueRollItem.Task = TaskList.Find(x => x.TaskId.Equals(QueueRollItem.TaskId));
            }

            HomeLists.ActiveTasks = QueueRollList;



            ViewData["Message"] = "Please Select a queue to edit, or add a new queue.";

            List <QueueModel> QueueList = new List <QueueModel>();

            QueueList = QueueQuery.GetQueuesJoinedRoll(QueueList, loggedinEmployee, EmployeeIsAdmin);

            foreach (QueueModel QueueItem in QueueList)
            {
                QueueItem.Employee = EmployeeList.Find(x => x.EmployeeId.Equals(QueueItem.EmployeeId));

                QueueItem.Task = TaskList.Find(x => x.TaskId.Equals(QueueItem.TaskId));
            }

            HomeLists.AvailableTasks  = QueueList;
            HomeLists.EmployeeIsAdmin = EmployeeIsAdmin;
            if (loggedinEmployee > 0)
            {
                HomeLists.LoggedIn = true;
            }
            else
            {
                HomeLists.LoggedIn = false;
            }


            return(View(HomeLists));
        }
Ejemplo n.º 6
0
        public IActionResult Add()
        {
            if (EmployeeIsAdmin == false)
            {
                return(Redirect("~/Queue/Close"));
            }
            ViewData["Message"] = "Please enter the Queue information.";

            QueueModel Queue = new QueueModel();

            Database.EmployeeQueries EmployeeQuery = new Database.EmployeeQueries();
            Database.TaskQueries     TaskQuery     = new Database.TaskQueries();
            Queue.Employees = EmployeeQuery.GetEmployees();
            Queue.Tasks     = TaskQuery.GetTasks();


            return(PartialView("_Add", Queue));
        }