Exemplo n.º 1
0
        private void addStripButton_Click(object sender, EventArgs e)
        {
            EditPersonForm tmpform = new EditPersonForm(_connection, _operator.nameVal, _org.idVal);

            tmpform.FormClosed += new FormClosedEventHandler(EditPersonForm_FormClosed);
            tmpform.Owner       = this;
            tmpform.Show();
        }
Exemplo n.º 2
0
 private void EditPersonForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (sender != null)
     {
         if (sender is EditPersonForm)
         {
             EditPersonForm tmpForm = sender as EditPersonForm;
             if (tmpForm.DialogResult == DialogResult.OK)
             {
                 long personID = tmpForm.PersonId;
                 _personTable.Rows.Clear();
                 _personAdapter.Fill(_personTable);
                 _personBS.Position = _personBS.Find(PersonInfo.id, personID);
             }
         }
     }
 }
Exemplo n.º 3
0
        private void editStripButton_Click(object sender, EventArgs e)
        {
            DataRowView person = _personBS.Current as DataRowView;

            if (person == null)
            {
                MainForm.ShowInfoMessage("Необходимо выбрать запись!", "Ошибка выбора анкеты");
                return;
            }
            long           personId = (long)person[PersonInfo.id];
            EditPersonForm tmpform  = new EditPersonForm(_connection, _operator.nameVal, _org.idVal);

            tmpform.FormClosed += new FormClosedEventHandler(EditPersonForm_FormClosed);
            tmpform.Owner       = this;
            tmpform.Show();

            tmpform.PersonId = personId;
        }