public Form2(ClsKeys Key) { InitializeComponent(); this.Load += new EventHandler(Form2_Load); this.Btn_Save.Click += new EventHandler(Btn_Save_Click); this.Employee = new DataObjects.Employee(null); this.Employee.Load(Key); }
void Form1_Load(object sender, EventArgs e) { this.Employee = new DataObjects.Employee(); this.dataGridView1.DataSource = this.Employee.List(); this.dataGridView1.AutoGenerateColumns = true; }