Example #1
0
        private void buttonFactAdd_Click(object sender, EventArgs e)
        {
            var Form = new FactEntityForm();

            Form.sf      = this;
            Form.StaffId = Int32.Parse(dataGridViewStaff.SelectedCells[0].Value.ToString());
            Form.Show();
        }
Example #2
0
        private void buttonFactEdit_Click(object sender, EventArgs e)
        {
            try
            {
                var Name = dataGridViewFact.SelectedCells[0].Value.ToString();
                if (String.IsNullOrEmpty(Name))
                {
                    throw new Exception("Не выбрано сведенье");
                }

                var Form = new FactEntityForm();
                Form.StaffId = Int32.Parse(dataGridViewStaff.SelectedCells[0].Value.ToString());
                Form.Name    = Name;
                Form.sf      = this;
                Form.Show();
            }
            catch (Exception gg)
            {
                MessageBox.Show(gg.Message, "SWA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }