private void addRentalRecordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var addRentalRecord = new AddEditRentalRecord();

            addRentalRecord.ShowDialog();
            addRentalRecord.MdiParent = this;
        }
        private void btnAddRecord_Click(object sender, EventArgs e)
        {
            var addRentalRecord = new AddEditRentalRecord
            {
                MdiParent = this.MdiParent
            };

            addRentalRecord.Show();                 //Difference way to initialize object
        }
        private void btnEditRecord_Click(object sender, EventArgs e)
        {
            try
            {
                //get id of selected row
                var id = (int)gvRecordList.SelectedRows[0].Cells["Id"].Value;

                //query database for record
                var record = _db.CarRentalRecords.FirstOrDefault(q => q.id == id);

                //launch AddEditVehicle window with data
                var addEditRentalRecord = new AddEditRentalRecord(record); // kyite tak name pay los ya
                addEditRentalRecord.MdiParent = this.MdiParent;
                addEditRentalRecord.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Error : {ex.Message}");
            }
        }