示例#1
0
        public FindOpenHelpDeskTicketsDataSet FindOpenHelpDeskTickets()
        {
            try
            {
                aFindOpenHelpDeskTicketsDataSet      = new FindOpenHelpDeskTicketsDataSet();
                aFindOpenHelpDeskTicketsTableAdapter = new FindOpenHelpDeskTicketsDataSetTableAdapters.FindOpenHelpDeskTicketsTableAdapter();
                aFindOpenHelpDeskTicketsTableAdapter.Fill(aFindOpenHelpDeskTicketsDataSet.FindOpenHelpDeskTickets);
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Help Desk Class // Find Open Help Desk Tickets " + Ex.Message);
            }

            return(aFindOpenHelpDeskTicketsDataSet);
        }
示例#2
0
        private void ResetControls()
        {
            //setting variable
            int    intCounter;
            int    intNumberOfRecords;
            string strFullName;

            try
            {
                txtComputerName.Text  = "";
                txtCurrentUpdte.Text  = "";
                txtExtension.Text     = "";
                txtTicketUpdates.Text = "";

                TheFindOpenHelpDeskTicketsDataSet = TheHelpDeskClass.FindOpenHelpDeskTickets();

                TheOpenHelpDeskTicketsDataSet.openhelpdesktickets.Rows.Clear();

                intNumberOfRecords = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    OpenHelpDeskTicketsDataSet.openhelpdeskticketsRow NewTicketRow = TheOpenHelpDeskTicketsDataSet.openhelpdesktickets.NewopenhelpdeskticketsRow();

                    NewTicketRow.FirstName       = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined[intCounter].FirstName;
                    NewTicketRow.LastName        = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined[intCounter].LastName;
                    NewTicketRow.ReportedProblem = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined[intCounter].ReportedProblem;
                    NewTicketRow.TicketDate      = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined[intCounter].TicketDate;
                    NewTicketRow.TicketID        = TheFindOpenHelpDeskTicketsAssignedDataSet.FindOpenHelpDeskTicketsAssgined[intCounter].TicketID;

                    TheOpenHelpDeskTicketsDataSet.openhelpdesktickets.Rows.Add(NewTicketRow);
                }

                dgrOpenTickets.ItemsSource = TheFindOpenHelpDeskTicketsDataSet.FindOpenHelpDeskTickets;

                TheFindSortedHelpDeskProblemTypeDataSet = TheHelpDeskClass.FindSortedHelpDeskProblemType();

                intNumberOfRecords = TheFindSortedHelpDeskProblemTypeDataSet.FindSortedHelpDeskProblemType.Rows.Count;
                cboProblemType.Items.Clear();
                cboProblemType.Items.Add("Select Problem Type");

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    cboProblemType.Items.Add(TheFindSortedHelpDeskProblemTypeDataSet.FindSortedHelpDeskProblemType[intCounter].ProblemType);
                }

                cboProblemType.SelectedIndex = 0;

                cboTicketStatus.Items.Clear();
                cboTicketStatus.Items.Add("Select Status");
                cboTicketStatus.Items.Add("OPEN");
                cboTicketStatus.Items.Add("IN PROCESS");
                cboTicketStatus.Items.Add("WAITING ON USER");
                cboTicketStatus.Items.Add("WAITING ON PARTS");
                cboTicketStatus.Items.Add("CLOSED");
                cboTicketStatus.SelectedIndex = 0;

                TheFindEmployeeByDepartmentDataSet = TheEmployeeClass.FindEmployeeByDepartment("INFORMATION TECHNOLOGY");

                cboSelectEmployee.Items.Clear();
                cboSelectEmployee.Items.Add("Select Employee");

                intNumberOfRecords = TheFindEmployeeByDepartmentDataSet.FindEmployeeByDepartment.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    strFullName  = TheFindEmployeeByDepartmentDataSet.FindEmployeeByDepartment[intCounter].FirstName + " ";
                    strFullName += TheFindEmployeeByDepartmentDataSet.FindEmployeeByDepartment[intCounter].LastName;

                    cboSelectEmployee.Items.Add(strFullName);
                }

                cboSelectEmployee.SelectedIndex = 0;

                TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Update Help Desk Tickets");
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Update Help Desk Tickets // Reset Controls " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }