예제 #1
0
파일: StaffForm.cs 프로젝트: cxxxxxxd/SWA
        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();
        }
예제 #2
0
파일: StaffForm.cs 프로젝트: cxxxxxxd/SWA
        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);
            }
        }