public void OpenDetailCallBack(object sender, OpenDetailEventArgs e) { // ZhongcihaoDlg dlg = (ZhongcihaoDlg)sender; for (int i = 0; i < e.Paths.Length; i++) { DetailForm child = null; if (!(Control.ModifierKeys == Keys.Control)) { child = this.TopDetailForm; } if (child == null) { child = new DetailForm(); child.MdiParent = this; child.Show(); } else { child.Activate(); } child.LoadRecord(e.Paths[i], null); } }
private void btnOpenDetails_Click(object sender, EventArgs e) { if (lsttrash.SelectedItems.Count <= 0) { MessageBox.Show("צריך לבחור שורה בטבלה"); return; } int id = int.Parse(lsttrash.SelectedItems[0].SubItems[5].Text); SqlDataReader reader; People p = new People(); p.ID = id; reader = People.ReadById(p.ID); while (reader.Read()) { PeopleManipulations.ReaderToPeople(ref p, ref reader, true, true); } reader.Close(); DBFunction.CloseConnections(); p.OpenForTrashPeople = true; DetailForm detail = new DetailForm(p); detail.Show(); ShiduchActivity.insertActivity( new ShiduchActivity() { Action = (int)ShiduchActivity.ActionType.openForms, Date = DateTime.Now, PeopleId = id, UserId = GLOBALVARS.MyUser.ID, }); }
// 打开新详细窗[空白] private void MenuItem_openDetail_Click(object sender, EventArgs e) { DetailForm child = new DetailForm(); child.MdiParent = this; child.Show(); //SetFirstMdiWindowState(); }
private void btn_Edit_Click(object sender, EventArgs e) { try { string id = dataGridView1.SelectedRows[0].Cells["ID_Employee"].Value.ToString(); DetailForm df = new DetailForm(); df.showup(id); df.updateNV += update; df.del += show; df.Show(); }catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_Add_Click(object sender, EventArgs e) { try { DetailForm df = new DetailForm(); df.addnv += add; df.updateNV += update; df.del += show; df.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }