コード例 #1
0
        private void BtnValider_Click(object sender, EventArgs e)
        {
            DateTime LaDate = new DateTime(CalendarProject.SelectionRange.Start.Year, CalendarProject.SelectionRange.Start.Month, CalendarProject.SelectionRange.Start.Day);

            if (TextBoxResponsable.Text != "")
            {
                int identifiant = SFactory.GetServiceResponsable().AddResposable(TextBoxResponsable.Text);
                SFactory.GetServiceTache().AddTache(TextboxLabel.Text, richTextBox1.Text, -1, (comboBox1.SelectedItem as dynamic).value, Convert.ToInt32(numericUpDown1.Value), (comboBox2.SelectedItem as dynamic).value, 0, LaDate);
            }
            else
            {
                SFactory.GetServiceTache().AddTache(TextboxLabel.Text, richTextBox1.Text, (ResponsableProjet.SelectedItem as dynamic).value, (comboBox1.SelectedItem as dynamic).value, Convert.ToInt32(numericUpDown1.Value), (comboBox2.SelectedItem as dynamic).value, 0, LaDate);
            }


            this.Close();
        }
コード例 #2
0
ファイル: LesProjets.cs プロジェクト: Benjamin-Clement/Projet
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (tabControl1.SelectedTab.Name)
            {
            case "tabExigence":
                if (this.Tag != null)
                {
                    List <SBExigences> LesExigence = SFactory.GetServiceExigence().GetExigencesByProjet(this.Tag.ToString());

                    SourceExigence.DataSource = LesExigence;
                    GridExigence.DataSource   = SourceExigence;
                }

                break;

            case "tabJalon":

                if (this.Tag != null)
                {
                    List <SBJalon> LesJalons = SFactory.GetServiceJalon().GetJalons();

                    SourceJalon.DataSource = LesJalons;
                    GridJalon.DataSource   = SourceJalon;
                }
                break;

            case "tabTache":

                if (this.Tag != null)
                {
                    List <SBTache> LesTache = SFactory.GetServiceTache().GetTaches();

                    SourceTache.DataSource = LesTache;
                    GridTache.DataSource   = SourceTache;
                }
                break;
            }
        }