Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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,
            });
        }
Esempio n. 3
0
        // 打开新详细窗[空白]
        private void MenuItem_openDetail_Click(object sender, EventArgs e)
        {
            DetailForm child = new DetailForm();

            child.MdiParent = this;

            child.Show();
            //SetFirstMdiWindowState();
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 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);
     }
 }