Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Multi_Demo
- {
- public partial class detailedForm : Form
- {
- public detailedForm()
- {
- InitializeComponent();
- }
- private void dataGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- InvoiceInfo.theInvoice = mainForm.theInvoice[dataGrid.SelectedCells[0].RowIndex];
- }
- private void detailedForm_Shown(object sender, EventArgs e)
- {
- dataGrid.ColumnCount = 5;
- dataGrid.Columns[0].Name = "Invoice Number";
- dataGrid.Columns[1].Name = "Invoice Date";
- dataGrid.Columns[2].Name = "Customer Number";
- dataGrid.Columns[3].Name = "Invoice Amount";
- dataGrid.Columns[4].Name = "Aging";
- for (int currentIndex = 0; currentIndex < mainForm.arraySize; currentIndex++)
- {
- String[] aRow = new String[]{mainForm.theInvoice[currentIndex].number.ToString(),
- mainForm.theInvoice[currentIndex].date.ToString(),
- mainForm.theInvoice[currentIndex].customerNumber.ToString(),
- mainForm.theInvoice[currentIndex].invoiceAmount.ToString("c"), "NET/"+
- mainForm.theInvoice[currentIndex].Aging.ToString()};
- dataGrid.Rows.Add(aRow);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement