Exemple #1
0
        protected void OnEditSectionTypeClick(object sender, EventArgs e)
        {
            DataGridViewRow row = typesScene.SelectedRows[0];
            int             id  = (int)row.Tag;

            SEPO_TFLEX_SECTION_TYPES type = sectionTypesRepo.GetById(id);

            TFlexSpecSectionTypeDialog dialog = new TFlexSpecSectionTypeDialog(type);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                UpdateTypeRow(row, type);
            }
        }
Exemple #2
0
        protected void OnAddSectionTypeClick(object sender, EventArgs e)
        {
            int id_section = (int)scene.SelectedRows[0].Tag;

            SEPO_TFLEX_SPEC_SECTIONS section = sectionsRepo.GetQuery()
                                               .Where(x => x.ID == id_section)
                                               .FirstOrDefault();

            TFlexSpecSectionTypeDialog dialog = new TFlexSpecSectionTypeDialog(section);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                AddTypeRow(dialog.TFlexSectionType);
            }
        }