Esempio n. 1
0
        protected bool Save()
        {
            EntityTemplate entityTemplate;

            if (_entityTemplate == null)
            {
                entityTemplate = new EntityTemplate();
            }
            else
            {
                entityTemplate = _entityTemplate;
            }

            for (int ix = flowLayoutPanel1.Controls.Count - 1; ix >= 0; ix--)
            {
                Control c = flowLayoutPanel1.Controls[ix];
                if (c is BehavioralTestTemplateSessionControl)
                {
                    BehavioralTestTemplateSessionControl bc = (BehavioralTestTemplateSessionControl)c;
                    bc.Save();
                }
            }

            _BehavioralTestTemplate.Name = txtName.Text;
            _BehavioralTestTemplate.BehavioralTestType = (BehavioralTestType)(cmbBehavioralTestType.SelectedItem);
            entityTemplate.SaveBehavioralTest(_BehavioralTestTemplate);
            if (CallerForm is ListForm <EntityTemplate> )
            {
                (CallerForm as ListForm <EntityTemplate>).OrderRefresh(entityTemplate);
            }

            return(true);
        }
Esempio n. 2
0
        void AddSessionControl(Session session, int index)
        {
            BehavioralTestTemplateSessionControl session1 = new BehavioralTestTemplateSessionControl(_BehavioralTestTemplate, index, errorProvider);

            session1.TabIndex = 61;
            session1.Tag      = session;
            flowLayoutPanel1.Controls.Add(session1);
        }
        void AddSessionControl(Session session, int index)
        {
            BehavioralTestTemplateSessionControl session1 = new BehavioralTestTemplateSessionControl(_BehavioralTestTemplate, index, errorProvider);

            session1.TabIndex = 61;
            session1.Tag = session;
            flowLayoutPanel1.Controls.Add(session1);
        }