Пример #1
0
 private void BtnAddRecord_Click(object sender, EventArgs e)
 {
     using (Add_EditSalesRecord addRecord = new Add_EditSalesRecord())
     {
         if (addRecord.ShowDialog() == DialogResult.OK)
         {
             GUIFunctions.addNewRecord(tlpDataRecords, rowIndex);
             rowIndex++;
         }
     }
 }
Пример #2
0
        private void Main_Load(object sender, EventArgs e)
        {
            List <SalesRecord> allSales = SalesDatabase.GetAllSales();

            foreach (SalesRecord s in allSales)
            {
                GUIFunctions.addNewRecord(tlpDataRecords, rowIndex, s);
                rowIndex++;
            }
            foreach (Label l in tlpDataRecords.Controls)
            {
                l.MouseClick += new MouseEventHandler(selectRow);
            }
        }