private void Er_btCancel_Click(object sender, EventArgs e) { Erea_DisEnable(); section = new Erea(); }
private void Er_dgErea_CellClick(object sender, DataGridViewCellEventArgs e) { erea.ClickCellDatagridView((DataGridView)sender, Er_txtEreaName, Er_txtNote, Er_chkActive); if (Er_dgErea.SelectedRows.Count == 1) { var kv = Er_dgErea.SelectedRows[0]; var cell = kv.Cells["id"]; int id = (int)cell.Value; //get staff information var ere = from b in db.Ereas where b.id == id select b; Erea nv = ere.ToList()[0]; Er_txtEreaName.Text = nv.Erea_Name; Er_txtNote.Text = nv.Note; Er_chkActive.Checked = (bool)nv.Active; section = nv; } }
private void Er_btAdd_Click(object sender, EventArgs e) { section = new Erea(); Erea_Enable(); }