private void buttonWithholdingReason_Click(object sender, EventArgs e)
        {
            if (this._specimen != null)
            {
                TextInputDialog tid = new TextInputDialog(buttonDataWithholdingReason.Text, this._specimen.DataWithholdingReason);

                // Dialog zentrieren
                tid.Location = new Point((this.Size.Width) / 2 - (tid.Size.Width) / 2, this.Location.Y);

                if (tid.ShowDialog() == DialogResult.OK)
                {
                    this._specimen.DataWithholdingReason = tid.Value;
                }
            }
        }
        private void buttonNotes_Click(object sender, EventArgs e)
        {
            TextInputDialog tid = new TextInputDialog("Notes", this._iu.Notes);
            // Dialog zentrieren
            tid.Location = new Point((this.Size.Width) / 2 - (tid.Size.Width) / 2, this.Location.Y);

            if (tid.ShowDialog() == DialogResult.OK)
            {
                if(this._iu != null)
                    this._iu.Notes = tid.Value;
            }
        }
        private void buttonOriginalNotes_Click(object sender, EventArgs e)
        {
            if (this._specimen != null)
            {
                TextInputDialog tid = new TextInputDialog(buttonOriginalNotes.Text, this._specimen.OriginalNotes);

                // Dialog zentrieren
                tid.Location = new Point((this.Size.Width) / 2 - (tid.Size.Width) / 2, this.Location.Y);

                if (tid.ShowDialog() == DialogResult.OK)
                {
                    this._specimen.OriginalNotes = tid.Value;
                }
            }
        }
예제 #4
0
        private void buttonChangeName_Click(object sender, EventArgs e)
        {
            if (this._agent != null)
            {
                TextInputDialog tid = new TextInputDialog("New Collectors Name", this._agent.CollectorsName);
                // Dialog zentrieren
                tid.Location = new Point((this.Size.Width) / 2 - (tid.Size.Width) / 2, this.Location.Y);

                if (tid.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        DataFunctions.Instance.Remove(this._agent);
                    }
                    catch (Exception ex)
                    {
                        Cursor.Current = Cursors.Default;
                        MessageBox.Show("Name can't be changed. ("+ex.Message+")", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                        return;
                    }
                    this._agent.CollectorsName = tid.Value;
                    this.textBoxCollectorsName.Text = tid.Value;
                    this.changed = true;
                }
            }
        }