Пример #1
0
        private void tlAdd_Click(object sender, EventArgs e)
        {
            frm_examedit frm = new frm_examedit();

            frm.IsAdd = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                tlSearch.PerformClick();
            }
        }
Пример #2
0
        private void tlEdit_Click(object sender, EventArgs e)
        {
            if (grdLibrary.SelectedRows == null || grdLibrary.SelectedRows.Count < 1)
            {
                return;
            }

            string       id   = grdLibrary.SelectedRows[0].Cells["lid"].Value.ToString();
            var          data = grdLibrary.DataSource as List <EMLIBRARY>;
            frm_examedit frm  = new frm_examedit();

            frm.Entity = data.FirstOrDefault(p => p.LID == id);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                tlSearch.PerformClick();
            }
        }