Esempio n. 1
0
        private void buttonStaffAdd_Click(object sender, EventArgs e)
        {
            var Form = new StaffEntityForm();

            Form.sf = this;
            Form.Show();
        }
Esempio n. 2
0
        private void buttonStaffEdit_Click(object sender, EventArgs e)
        {
            try
            {
                var sSId = dataGridViewStaff.SelectedCells[0].Value.ToString();
                if (String.IsNullOrEmpty(sSId))
                {
                    throw new Exception("Не выбран сотрудник");
                }

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