Exemple #1
0
        private void ToolStripButton3_Click(object sender, EventArgs e)
        {
            VehicleTypeForm frm = new VehicleTypeForm();

            frm.Text      = "New Vehicle Type";
            frm.TopLevel  = false;
            frm.MdiParent = this.MdiParent;
            frm.Show();
        }
Exemple #2
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var rowIndex = dgvVehicleTypeList.SelectedRows[0].Index;

            VehicleType vehicleType = Get(rowIndex);

            if (vehicleType != null)
            {
                VehicleTypeForm frm = new VehicleTypeForm(vehicleType);
                frm.Text      = "Edit Vehicle Type";
                frm.TopLevel  = false;
                frm.MdiParent = this.MdiParent;
                frm.Show();
            }
        }
Exemple #3
0
        private void dgvVehicleTypeList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var rowIndex = e.RowIndex;

            if (rowIndex >= 0)
            {
                VehicleType vehicleType = Get(rowIndex);
                if (vehicleType != null)
                {
                    VehicleTypeForm frm = new VehicleTypeForm(vehicleType);
                    frm.Name      = "Edit Vehicle Type";
                    frm.TopLevel  = false;
                    frm.MdiParent = this.MdiParent;
                    frm.Show();
                }
            }
        }