Пример #1
0
        public static Firm EditFirm(Firm data)
        {
            var win = new FirmEditorForm();

            win.SetData(data);
            if (win.ShowDialog() == DialogResult.OK)
            {
                return(win.GetData());
            }
            return(null);
        }
Пример #2
0
        public static Firm AddFirm()
        {
            var win = new FirmEditorForm();
            var id  = DataManager.FirmGetNewId();

            win.lbId.Text            = id.ToString();
            win.cbSpec.SelectedIndex = 0;
            win.cbToo.SelectedIndex  = 0;
            if (win.ShowDialog() == DialogResult.OK)
            {
                return(win.GetData());
            }
            return(null);
        }