Exemplo n.º 1
0
        public ITPage(string user, string id)
        {
            InitializeComponent();
            loggedid                   = id;
            selectCell                 = null;
            proxy                      = new TTProxy();
            qeue                       = new MessageQueue();
            notificationQeue           = new MessageQueue();
            qeue.Formatter             = new XmlMessageFormatter(new Type[] { typeof(Ticket) });
            notificationQeue.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
            userT                      = proxy.GetUsers();
            this.user                  = user;
            // get tickets from a user and display them
            DataTable tickets = filterData();

            dataGridView1.DataSource = tickets;
            ticketList = Ticket.getTickets(tickets);
            userDict   = new Dictionary <string, string>();

            usersDropDown();
            ticketsDropDown();


            initializeQeue(qeue, qeuePath);
            initializeQeue(notificationQeue, notificationqeuePath);

            notificationQeue.ReceiveCompleted += notificationReceiver;
            notificationQeue.BeginReceive();
        }
Exemplo n.º 2
0
        public Login()
        {
            InitializeComponent();

            proxy     = new TTProxy();
            dataTable = proxy.GetUsers();
            var        namesList  = new List <String>();
            DataColumn dataColumn = dataTable.Columns["Name"];
            DataColumn idColumn   = dataTable.Columns["Id"];
            DataColumn roleColumn = dataTable.Columns["Role"];

            foreach (DataRow row in dataTable.Rows)
            {
                String elemName = row.Field <string>(dataColumn);
                int    elemId   = row.Field <int>(idColumn);
                string role     = row.Field <string>(roleColumn);

                users.Add(new TTService.User(elemId, elemName, role));
            }

            foreach (User user in users)
            {
                namesList.Add(user.Username);
            }

            //Setup data binding
            comboBox1.DataSource    = namesList;
            comboBox1.DisplayMember = "Name";
        }
Exemplo n.º 3
0
        public Form1()
        {
            int k;

            InitializeComponent();

            if (!MessageQueue.Exists(@".\private$\myMSMQ"))
            {
                MessageQueue.Create(@".\private$\myMSMQ");
            }

            proxy = new TTProxy();
            DataTable users = proxy.GetPeopleByRole("solver");

            for (k = 0; k < users.Rows.Count; k++)
            {
                listBox1.Items.Add(users.Rows[k][1]);   // Row 0 is empty; the author name is in column 1
            }
            DataTable unassigned_tickets = proxy.GetUnassignedTickets();

            dataGridView1.DataSource = unassigned_tickets;

            DateTime start = DateTime.Now;

            timer = new Timer(_ => UpdateTickets(start), null, 1000, 500);
        }
Exemplo n.º 4
0
        public SolverForm()
        {
            InitializeComponent();
            proxy = new TTProxy();
            users = null;
            //Hide elements
            //listBox2.Visible = false;
            //dataGridView1.Visible = false;


            UpdateByState();
        }
Exemplo n.º 5
0
        public Form1()
        {
            int k;

            InitializeComponent();

            proxy = new TTProxy();
            DataTable users = proxy.GetUsers();

            for (k = 1; k < users.Rows.Count; k++)
            {
                listBox1.Items.Add(users.Rows[k][1]);   // Row 0 is empty; the author name is in column 1
            }
        }