internal GroupeParlementaireModel(Organe rawOrgane) : base(rawOrgane)
 {
     Deputes     = new HashSet <DeputeModel>();
     Debut       = rawOrgane.ViMoDe.DateDebut.Value;
     Fin         = rawOrgane.ViMoDe.DateFin;
     Legislature = (int)rawOrgane.Legislature;
 }
예제 #2
0
        private async void button2_Click(object sender, EventArgs e)
        {
            string reponse = (sender as Button).Text;

            if (reponse != "")
            {
                if (first)
                {
                    organe = new Organe {
                        nomOrgane = reponse
                    };
                    first = false;
                }

                if (next_item != "")
                {
                    if (next_item == AnswerTypeEnum.typeMaux.ToString())
                    {
                        organe.typeMaux = reponse;
                    }
                    else
                    if (next_item == AnswerTypeEnum.localisation.ToString())
                    {
                        organe.localisation = reponse;
                    }
                }

                Context insertObject = new Context(medicament, organe, answer, question);

                var json_result = await rules.ExecuteAsyncjson(insertObject, name_container);

                var result = json_result.SmartSingleResponse;

                if (result.question.description != null)
                {
                    LoadLayout(result, tableLayoutQuestion, 2, 1);
                }

                if (result.answer.descp != null)
                {
                    int nbResult = result.answer.descp.Count;
                    columnCount = 2;
                    rowCount    = nbResult / 2;
                    LoadLayout(result, tableLayoutResponse, columnCount, rowCount);
                }

                if (result.medicament.nomMedic != null)
                {
                    MessageBox.Show(this, "Nom du medicament " + result.medicament.nomMedic, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Form_controls form_controls = new Form_controls();
                    form_controls.EnableDisableButtonControls(false, this);
                }
                next_item = result.answer.type;
            }
            else
            {
                MessageBox.Show("Sélectionner une réponse svp");
            }
        }
예제 #3
0
        internal OrganeModel(Organe rawOrgane)
        {
            this.Uid  = rawOrgane.Uid.ToLowerInvariant();
            this.Nom  = rawOrgane.Libelle;
            this.Type = rawOrgane.CodeType;

            _modelStorage.Register(this.Uid, this);
        }
예제 #4
0
        private async void Valider_Click(object sender, EventArgs e)
        {
            var reponse = Convert.ToString(comboRep.SelectedItem);

            if (reponse != "")
            {
                if (first)
                {
                    organe = new Organe {
                        nomOrgane = reponse
                    };
                    first = false;
                }

                if (next_item != "")
                {
                    if (next_item == AnswerTypeEnum.typeMaux.ToString())
                    {
                        organe.typeMaux = reponse;
                    }
                    else
                    if (next_item == AnswerTypeEnum.localisation.ToString())
                    {
                        organe.localisation = reponse;
                    }
                }

                Context insertObject = new Context(medicament, organe, answer, question);

                var json = await rules.ExecuteAsyncjson(insertObject, name_container);

                var result = json.SmartSingleResponse;
                labelQuestions.Text = result.question.description;

                LoadComboItems(result);

                if (result.medicament.nomMedic != null)
                {
                    MessageBox.Show(this, "Nom du medicament " + result.medicament.nomMedic, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Valider.Enabled = false;
                }
                next_item = result.answer.type;
            }
            else
            {
                MessageBox.Show("Sélectionner une réponse svp");
            }
        }