Exemplo n.º 1
0
        private void SetupLists()
        {
            listView.Size     = new Size(800, 450);
            listView.Location = new Point(50, 120);

            listView.Columns.Add("Local Invoice ID", -2, HorizontalAlignment.Left);
            listView.Columns.Add("Invoice #", 100, HorizontalAlignment.Left);
            listView.Columns.Add("Customer Name", 200, HorizontalAlignment.Left);
            listView.Columns.Add("Shipping Address", 300, HorizontalAlignment.Left);
            listView.Columns.Add("Total Cost", -2, HorizontalAlignment.Left);


            listView.GridLines     = true;
            listView.Scrollable    = true;
            listView.FullRowSelect = true;
            listView.View          = System.Windows.Forms.View.Details;
            listView.DoubleClick  += listView_DoubleClick;
            this.Controls.Add(listView);

            Button viewButton = new Button();

            viewButton.Location = new Point(400, 600);
            viewButton.Size     = new Size(70, 40);
            viewButton.Text     = "View";
            viewButton.Click   += ViewButton_Click;
            this.Controls.Add(viewButton);



            list = InvoiceDatabase.SearchInvoicesByStage(3);
            foreach (Invoice l in list)
            {
                listView.Items.Add(new ListViewItem(new String[] { l.InvoiceID.ToString(), l.InvoiceNo.ToString(), l.customer.StoreName, l.customer.ShippingAddress, l.NetTotal.ToString("0.00") }));
            }
        }
Exemplo n.º 2
0
 private void RefreshView()
 {
     foreach (ListViewItem lvItem in listView.Items)
     {
         listView.Items.Remove(lvItem);
     }
     if (invoices_textBox.Text.Length == 0)
     {
         list = InvoiceDatabase.SearchInvoicesByStage(3);
     }
     else
     {
         list = InvoiceDatabase.SearchInvoicesByInvoiceNo(this.Controls["invoices_textBox"].Text);
     }
     foreach (Invoice i in list)
     {
         listView.Items.Add(new ListViewItem(new String[] { i.InvoiceID.ToString(), i.InvoiceNo, i.customer.StoreName, i.customer.ShippingAddress, i.NetTotal.ToString("0.00") }));
     }
 }
Exemplo n.º 3
0
 private void RefreshView()
 {
     foreach (ListViewItem lvItem in pickingListView.Items)
     {
         pickingListView.Items.Remove(lvItem);
     }
     foreach (ListViewItem lvItem in doubleCheckListView.Items)
     {
         doubleCheckListView.Items.Remove(lvItem);
     }
     pickingList     = InvoiceDatabase.SearchInvoicesByStage(1);
     doubleCheckList = InvoiceDatabase.SearchInvoicesByStage(2);
     foreach (Invoice l in pickingList)
     {
         pickingListView.Items.Add(new ListViewItem(new String[] { l.InvoiceID.ToString(), l.customer.StoreName, l.customer.ShippingAddress }));
     }
     foreach (Invoice l in doubleCheckList)
     {
         doubleCheckListView.Items.Add(new ListViewItem(new String[] { l.InvoiceID.ToString(), l.customer.StoreName, l.customer.ShippingAddress }));
     }
 }
Exemplo n.º 4
0
        private void SetupLists()
        {
            Label pickingLabel = new System.Windows.Forms.Label();

            pickingLabel.AutoSize = true;
            pickingLabel.Font     = new System.Drawing.Font("Microsoft Sans Serif", 13.875F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            pickingLabel.Location = new System.Drawing.Point(200, 95);
            pickingLabel.Size     = new System.Drawing.Size(238, 42);
            pickingLabel.TabIndex = 0;
            pickingLabel.Text     = "Double Check Stage";
            this.Controls.Add(pickingLabel);

            Label doubleCheckLabel = new System.Windows.Forms.Label();

            doubleCheckLabel.AutoSize = true;
            doubleCheckLabel.Font     = new System.Drawing.Font("Microsoft Sans Serif", 13.875F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            doubleCheckLabel.Location = new System.Drawing.Point(750, 95);
            doubleCheckLabel.Size     = new System.Drawing.Size(238, 42);
            doubleCheckLabel.TabIndex = 0;
            doubleCheckLabel.Text     = "Final Stage";
            this.Controls.Add(doubleCheckLabel);

            pickingListView.Size     = new Size(500, 450);
            pickingListView.Location = new Point(50, 120);

            pickingListView.Columns.Add("Local Invoice ID", -2, HorizontalAlignment.Left);
            pickingListView.Columns.Add("Customer Name", 200, HorizontalAlignment.Left);
            pickingListView.Columns.Add("Shipping Address", 200, HorizontalAlignment.Left);

            pickingListView.GridLines     = true;
            pickingListView.Scrollable    = true;
            pickingListView.FullRowSelect = true;
            pickingListView.View          = System.Windows.Forms.View.Details;
            pickingListView.DoubleClick  += PickingListView_DoubleClick;
            pickingListView.Enter        += PickingListView_Enter;
            this.Controls.Add(pickingListView);

            doubleCheckListView.Size     = new Size(500, 450);
            doubleCheckListView.Location = new Point(600, 120);

            doubleCheckListView.Columns.Add("Local Invoice ID", -2, HorizontalAlignment.Left);
            doubleCheckListView.Columns.Add("Customer Name", 200, HorizontalAlignment.Left);
            doubleCheckListView.Columns.Add("Shipping Address", 200, HorizontalAlignment.Left);

            doubleCheckListView.GridLines     = true;
            doubleCheckListView.Scrollable    = true;
            doubleCheckListView.FullRowSelect = true;
            doubleCheckListView.Enter        += DoubleCheckListView_Enter;

            doubleCheckListView.View         = System.Windows.Forms.View.Details;
            doubleCheckListView.DoubleClick += DoubleCheckListView_DoubleClick;
            this.Controls.Add(doubleCheckListView);

            Button processButton = new Button();

            processButton.Location = new Point(450, 600);
            processButton.Size     = new Size(70, 40);
            processButton.Text     = "Process";
            processButton.Click   += ProcessButton_Click;
            this.Controls.Add(processButton);

            Button deleteButton = new Button();

            deleteButton.Location = new Point(530, 600);
            deleteButton.Size     = new Size(70, 40);
            deleteButton.Text     = "Delete";
            deleteButton.Click   += DeleteButton_Click;
            this.Controls.Add(deleteButton);

            Button moveButton = new Button();

            moveButton.Location = new Point(610, 600);
            moveButton.Size     = new Size(100, 40);
            moveButton.Text     = "Move to double check";
            moveButton.Click   += MoveButton_Click;
            this.Controls.Add(moveButton);

            pickingList     = InvoiceDatabase.SearchInvoicesByStage(1);
            doubleCheckList = InvoiceDatabase.SearchInvoicesByStage(2);
            foreach (Invoice l in pickingList)
            {
                pickingListView.Items.Add(new ListViewItem(new String[] { l.InvoiceID.ToString(), l.customer.StoreName, l.customer.ShippingAddress }));
            }
            foreach (Invoice l in doubleCheckList)
            {
                doubleCheckListView.Items.Add(new ListViewItem(new String[] { l.InvoiceID.ToString(), l.customer.StoreName, l.customer.ShippingAddress }));
            }
        }