void DéconstruireP01(ref Element e) { dElement d; string CodeAttribut = ""; //PILOTE if (!(Pilote is null)) { CodeAttribut = "PILOTE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, Pilote.ID.ToString()); e.Liste.Add(d); } //ACTION_PHARE if (ActionPhare) { CodeAttribut = "ACTION_PHARE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, (ActionPhare) ? "1" : "0"); e.Liste.Add(d); } //ORDRE_ACTION_PHARE if (OrdreActionPhare > 0) { CodeAttribut = "ORDRE_ACTION_PHARE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, OrdreActionPhare.ToString()); e.Liste.Add(d); } //STATUT { CodeAttribut = "STATUT"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, Statut.ToString()); e.Liste.Add(d); } //VALIDATION_INTERNE if (!(Validation < 0)) { CodeAttribut = "VALIDATION_INTERNE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, Validation.ToString()); e.Liste.Add(d); } //DESCRIPTION if (!(Description is null)) { CodeAttribut = "DESCRIPTION"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, Description); e.Liste.Add(d); } //TYPE if (!(_type is null)) { CodeAttribut = "_TYPE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _type); e.Liste.Add(d); } //CODEPLAN if (!(_codeplan is null)) { CodeAttribut = "_CODEPLAN"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _codeplan); e.Liste.Add(d); } if (!(_axe is null)) { CodeAttribut = "_AXE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _axe); e.Liste.Add(d); } if (!(_os is null)) { CodeAttribut = "_OS"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _os); e.Liste.Add(d); } if (!(_og is null)) { CodeAttribut = "_OG"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _og); e.Liste.Add(d); } if (!(_op is null)) { CodeAttribut = "_OP"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _op); e.Liste.Add(d); } if (!(_cpl is null)) { CodeAttribut = "_CPL"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _cpl); e.Liste.Add(d); } if (!(_ordreact is null)) { CodeAttribut = "_ORDREACT"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _ordreact); e.Liste.Add(d); } if (!(_annee is null)) { CodeAttribut = "_ANNEE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _annee); e.Liste.Add(d); } if (!(_direction is null)) { CodeAttribut = "_DIRECTION"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _direction); e.Liste.Add(d); } if (!(_reference is null)) { CodeAttribut = "_REFERENCE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _reference); e.Liste.Add(d); } if (!(_ordreope is null)) { CodeAttribut = "_ORDREOPE"; d = new dElement(ID, Acces.Trouver_Attribut(Acces.type_ACTION, CodeAttribut).ID, CodeAttribut, _ordreope); e.Liste.Add(d); } }
/// <summary> /// Construtor to instanciate a CDD /// </summary> /// <param name="motif"></param> /// <param name="dateFinContrat"></param> /// <param name="qualification"></param> /// <param name="dateDebutContrat"></param> /// <param name="statut"></param> /// <param name="salaireBrut"></param> public Cdd(String motif, DateTime dateFinContrat, String qualification, DateTime dateDebutContrat, Statut statut, Decimal salaireBrut) : base(motif, dateFinContrat, qualification, dateDebutContrat, statut, salaireBrut) { }
//Transforme un plan sous la forme Element, dElement public override Element Déconstruire() { Element e = new Element(); dElement d; TypeElement type = Acces.type_PROJET; e.ID = ID; e.Element_Type = type.ID; e.Code = Code; e.Libelle = Libelle; e.Type_Element = TypeProjet; e.Actif = Actif; string CodeAttribut = ""; if (Pilote != null) { CodeAttribut = "PILOTE"; d = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Pilote.ID.ToString()); e.Liste.Add(d); } { CodeAttribut = "STATUT"; d = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Statut.ToString()); e.Liste.Add(d); } if (EnveloppeBudget != null) { CodeAttribut = "ENVELOPPE_BUDGET"; foreach (int k in EnveloppeBudget) { d = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, k.ToString()); e.Liste.Add(d); } } return(e); }
private void CreateStatut() { this.statut = new Statut(); this.statut.Libelle = "TestStatut"; }
public void setStatut(Statut new_statut, bool restart) { _statut = new_statut; if (restart == true) { switch (_statut) { case Statut.Menu: _menu.Restart(); break; case Statut.Game: _game.Restart(); break; case Statut.Menu_IG: _menuig.Restart(); break; case Statut.Help: _help.Restart(); break; case Statut.Credit: _credit.Restart(); break; } } }
/// <summary> /// Initialiser des données à la création du contexte /// </summary> /// <param name="context"></param> protected override void Seed(EcommerceContext context) { IList <Categorie> defaultCategories = new List <Categorie>(); IList <Produit> defaultProducts = new List <Produit>(); IList <Commande> defaultCommandes = new List <Commande>(); defaultCategories.Add(new Categorie() { Libelle = "Charcuterie" }); defaultCategories.Add(new Categorie() { Libelle = "Produits laitiers" }); defaultCategories.Add(new Categorie() { Libelle = "Liquides" }); defaultCategories.Add(new Categorie() { Libelle = "Vehicules" }); Categorie c = defaultCategories.First(); Categorie cVoiture = defaultCategories.Last(); defaultProducts.Add(new Produit { Code = 404, Libelle = "Balasssncoire", Description = "La boucave", Stock = 1000, Prix = 2000, CategorieId = c.Id, Categorie = c }); defaultProducts.Add(new Produit { Code = 405, Libelle = "Voiture", Description = "BMW", Stock = 100, Prix = 20000, CategorieId = cVoiture.Id, Categorie = cVoiture }); Client client = new Client { Nom = "Sevik", Prenom = "Ozcan", Actif = true }; Statut s = new Statut { Libelle = "En Cours" }; defaultCommandes.Add(new Commande { DateCommand = DateTime.Now, Client = client, ClientId = client.Id, Observation = "Première Commande", Statut = s, StatusId = s.Id }); foreach (Categorie categ in defaultCategories) { context.Categories.Add(categ); context.SaveChanges(); } foreach (Produit prd in defaultProducts) { context.Produits.Add(prd); context.SaveChanges(); } foreach (Commande commande in defaultCommandes) { context.Commandes.Add(commande); context.SaveChanges(); } base.Seed(context); }
public void DeleteStatut(Statut s) { StatutCommand sc = new StatutCommand(contexte); sc.Delete(s); }
/// <summary> /// Met à jour l'état en bas pour l'utilisateur /// </summary> /// <param name="typeEtat">texte : "Filtrage", "Ajout", "Modification", "Suppression", "Look", "" ("" = Chargement)</param> /// <param name="dao">un objet Commande_Fournisseur soit pour l'ajouter au listing, soit pour afficher qui a été modifié ou supprimé</param> public void MiseAJourEtat(string typeEtat, Statut lib) { //Je racalcul le nombre max d'élements this.recalculMax(); //En fonction de l'libion, j'affiche le message if (typeEtat == "Filtrage") { ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "filtrage des statuts terminé : " + this.listStatut.Count() + " / " + this.max; } else if (typeEtat == "Ajout") { //J'ajoute la commande_fournisseur dans le linsting this.listStatut.Add(lib); //Je racalcul le nombre max d'élements après l'ajout this.recalculMax(); ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Ajout d'un statut dénommé '" + lib.Libelle + "' effectué avec succès. Nombre d'élements : " + this.listStatut.Count() + " / " + this.max; } else if (typeEtat == "Modification") { //Je raffraichis mon datagrid this._DataGridMain.Items.Refresh(); ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Modification du statut dénommé : '" + lib.Libelle + "' effectuée avec succès. Nombre d'élements : " + this.listStatut.Count() + " / " + this.max; } else if (typeEtat == "Suppression") { //Je supprime de mon listing l'élément supprimé this.listStatut.Remove(lib); //Je racalcul le nombre max d'élements après la suppression this.recalculMax(); ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Suppression du statut dénommé : '" + lib.Libelle + "' effectuée avec succès. Nombre d'élements : " + this.listStatut.Count() + " / " + this.max; } else if (typeEtat == "Look") { } else { ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Chargement des statuts terminé : " + this.listStatut.Count() + " / " + this.max; } //Je retri les données dans le sens par défaut this.triDatas(); //J'arrete la progressbar ((App)App.Current)._theMainWindow.parametreMain.progressBarMainWindow.IsIndeterminate = false; }
public void AddStatut(Statut s) { StatutCommand sc = new StatutCommand(contexte); sc.Add(s); }
public Statut UpdateStatut(Statut s) { StatutCommand sc = new StatutCommand(contexte); return(sc.Update(s)); }
/// <summary> /// Ajouter le Statut en base à partir du contexte /// </summary> /// <param name="s">statut à ajouter</param> /// <returns>Identifiant du Statut ajouté</returns> public int Ajouter(Statut s) { _contexte.Statuts.Add(s); return(_contexte.SaveChanges()); }
public void EditStatut(Statut s) { StatutCommand stat = new StatutCommand(_context); stat.Modifier(s); }
public int AddStatut(Statut s) { StatutCommand stat = new StatutCommand(_context); return(stat.Ajouter(s)); }
/// <summary> /// Constructor to instanciate a temporary contract /// </summary> /// <param name="motif"></param> /// <param name="dateFinContrat"></param> /// <param name="qualification"></param> /// <param name="dateDebutContrat"></param> /// <param name="statut"></param> /// <param name="salaireBrut"></param> public ContratProvisoire(String motif, DateTime dateFinContrat, String qualification, DateTime dateDebutContrat, Statut statut, Decimal salaireBrut) : base(qualification, dateDebutContrat, statut, salaireBrut) { Motif = motif; DateFinContrat = dateFinContrat; }
/// <summary> /// Constructor to instanciate a stage /// </summary> /// <param name="ecole"></param> /// <param name="mission"></param> /// <param name="motif"></param> /// <param name="dateFinContrat"></param> /// <param name="qualification"></param> /// <param name="dateDebutContrat"></param> /// <param name="statut"></param> /// <param name="salaireBrut"></param> public Stage(String ecole, String mission, String motif, DateTime dateFinContrat, String qualification, DateTime dateDebutContrat, Statut statut, Decimal salaireBrut) : base(motif, dateFinContrat, qualification, dateDebutContrat, statut, salaireBrut) { Ecole = ecole; Mission = mission; }
public void Dot_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { switch (Toggled1) { case Statut.NoPicked: Back.Fill = On; Toggled1 = Statut.Present; Dot.Margin = RightSide; OldToggled = Statut.NoPicked; break; case Statut.Present: Back.Fill = Partial; Toggled1 = Statut.Partiel; Dot.Margin = MiddleSide; OldToggled = Statut.Present; break; case Statut.NoPresent: Back.Fill = Partial; Toggled1 = Statut.Partiel; Dot.Margin = MiddleSide; OldToggled = Statut.NoPresent; break; case Statut.Partiel: if (OldToggled == Statut.Present) { Back.Fill = No; Toggled1 = Statut.NoPresent; Dot.Margin = LeftSide; OldToggled = Statut.Partiel; } else { Back.Fill = On; Toggled1 = Statut.Present; Dot.Margin = RightSide; OldToggled = Statut.Partiel; } break; } /*if (Name == "chkWspSelectAll") * { * var parent1 = VisualTreeHelper.GetParent(this); * while (!(parent1 is PageSelectSecteur)) * { * parent1 = VisualTreeHelper.GetParent(parent1); * } * (parent1 as PageSelectSecteur).ChkWspSelectAll_OnChecked(sender, e); * }*/ /*Back.Fill = On; * Toggled1 = true; * Dot.Margin = RightSide; * Dot.Fill = new SolidColorBrush(Color.FromRgb(255,255,255));*/ /*var parent = VisualTreeHelper.GetParent(this); * while (!(parent is Page2)) * { * parent = VisualTreeHelper.GetParent(parent); * } * (parent as Page2).ChkWspSelect_OnChecked(sender, e);*/ /* * } * else//si on -> OnUnChecked * {*/ /*if (Name == "chkWspSelectAll") * { * var parent1 = VisualTreeHelper.GetParent(this); * while (!(parent1 is PageSelectSecteur)) * { * parent1 = VisualTreeHelper.GetParent(parent1); * } * (parent1 as PageSelectSecteur).ChkWspSelectAll_OnUnchecked(sender, e); * }*/ /*Back.Fill = Off; * Toggled1 = false; * Dot.Margin = LeftSide; * Dot.Fill = new SolidColorBrush(Color.FromRgb(255, 255, 255)); * var parent = VisualTreeHelper.GetParent(this); * while (!(parent is Page2)) * { * parent = VisualTreeHelper.GetParent(parent); * } * (parent as Page2).ChkWspSelect_OnUnchecked(sender, e); * }*/ }
public Cdi(String qualification, DateTime dateDebutContrat, Statut statut, Decimal salaireBrut) : base(qualification, dateDebutContrat, statut, salaireBrut) { }
/// <summary> /// Ajoute une nouvelle condition de réglement fonction à la liste à l'aide d'une nouvelle fenêtre /// </summary> public Statut Add() { //Affichage du message "ajout en cours" ((App)App.Current)._theMainWindow.parametreMain.progressBarMainWindow.IsIndeterminate = true; ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Ajout d'un statut en cours ..."; //Initialisation de la fenêtre StatutWindow statutWindow = new StatutWindow(); //Création de l'objet temporaire Statut tmp = new Statut(); //Mise de l'objet temporaire dans le datacontext statutWindow.DataContext = tmp; //booléen nullable vrai ou faux ou null bool? dialogResult = statutWindow.ShowDialog(); if (dialogResult.HasValue && dialogResult.Value == true) { //Si j'appuie sur le bouton Ok, je renvoi l'objet banque se trouvant dans le datacontext de la fenêtre return (Statut)statutWindow.DataContext; } else { try { //On détache la commande ((App)App.Current).mySitaffEntities.Detach((Statut)statutWindow.DataContext); } catch (Exception) { } //Si j'appuie sur le bouton annuler, je préviens que j'annule mon ajout ((App)App.Current)._theMainWindow.parametreMain.progressBarMainWindow.IsIndeterminate = false; this.recalculMax(); ((App)App.Current)._theMainWindow.parametreMain.textBlockMainWindow.Text = "Ajout d'un statut annulé : " + this.listStatut.Count() + " / " + this.max; return null; } }
public void DataTest() { Human hu01 = new Human() { LastName = "Brice", FirstName = "DeNice" }; Human hu02 = new Human() { LastName = "Sam", FirstName = "MeVa" }; Human hu03 = new Human() { LastName = "Tina", FirstName = "Dorteur" }; Human hu04 = new Human() { LastName = "Patrick", FirstName = "Brubru" }; Human hu05 = new Human() { LastName = "Malissa", FirstName = "LaMalisse" }; Human hu06 = new Human() { LastName = "Rama", FirstName = "Wade" }; Human hu07 = new Human() { LastName = "Lebron", FirstName = "Kanes" }; Human hu08 = new Human() { LastName = "Vince", FirstName = "Vainqueur" }; Human hu09 = new Human() { LastName = "Roberto", FirstName = "Donoro" }; Human hu10 = new Human() { LastName = "Sarah", FirstName = "Croche" }; Town to01 = new Town() { Number = 1, Name = "Sannois" }; Town to02 = new Town() { Number = 2, Name = "Paris" }; Town to03 = new Town() { Number = 3, Name = "Londres" }; Slice si01 = new Slice() { Number = 1, Name = "Kid" }; Slice si02 = new Slice() { Number = 2, Name = "Young adult" }; Slice si03 = new Slice() { Number = 3, Name = "Adult" }; Slice si04 = new Slice() { Number = 4, Name = "Mature" }; Slice si05 = new Slice() { Number = 5, Name = "Inactive" }; Gender ge01 = new Gender() { Number = 1, Name = "Male" }; Gender ge02 = new Gender() { Number = 2, Name = "Female" }; Statut st01 = new Statut() { Number = 1, Name = "Living" }; Statut st02 = new Statut() { Number = 2, Name = "Dead" }; //vivant à Sannois hu01.Town = to01; hu02.Town = to01; hu03.Town = to01; //vivant à Paris hu04.Town = to02; hu05.Town = to02; hu06.Town = to02; hu07.Town = to02; //vivant à Londres hu08.Town = to03; hu09.Town = to03; hu10.Town = to03; //Kid hu01.Slice = si01; hu02.Slice = si01; hu03.Slice = si01; hu04.Slice = si01; hu05.Slice = si01; hu06.Slice = si01; //Young adult hu07.Slice = si02; hu08.Slice = si02; hu09.Slice = si02; hu10.Slice = si02; //Male hu01.Gender = ge01; hu04.Gender = ge01; hu07.Gender = ge01; hu08.Gender = ge01; hu09.Gender = ge01; //Female hu02.Gender = ge02; hu03.Gender = ge02; hu05.Gender = ge02; hu06.Gender = ge02; hu10.Gender = ge02; //Living hu01.Statut = st01; hu02.Statut = st01; hu03.Statut = st01; hu04.Statut = st01; hu05.Statut = st01; hu06.Statut = st01; hu07.Statut = st01; hu08.Statut = st01; hu09.Statut = st01; hu10.Statut = st01; Town[] towns = new Town[3]; towns[0] = to01; towns[1] = to02; towns[2] = to03; Slice[] slices = new Slice[5]; slices[0] = si01; slices[1] = si02; slices[2] = si03; slices[3] = si04; slices[4] = si05; Gender[] genders = new Gender[2]; genders[0] = ge01; genders[1] = ge02; Statut[] statuts = new Statut[2]; statuts[0] = st01; statuts[1] = st02; Human[] humen = new Human[10]; humen[0] = hu01; humen[1] = hu02; humen[2] = hu03; humen[3] = hu04; humen[4] = hu05; humen[5] = hu06; humen[6] = hu07; humen[7] = hu08; humen[8] = hu09; humen[9] = hu10; stub.InsertTownList(towns); stub.InsertSliceList(slices); stub.InsertGenderList(genders); stub.InsertStatutList(statuts); stub.InsertHumanList(humen); }
// String _test; public Game1() { // _test = ""; graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; TargetElapsedTime = TimeSpan.FromTicks(333333); graphics.SupportedOrientations = DisplayOrientation.Portrait | DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; // graphics.SupportedOrientations = DisplayOrientation.Portrait; //graphics.PreferredBackBufferWidth = 480; //graphics.PreferredBackBufferHeight = 800; graphics.ApplyChanges(); _menu = new Menu(this); _menuig = new MenuIg(this); _game = new Game(this); _help = new Help(this); _credit = new Credit(this); _statut = Statut.Menu; // this.Window.CurrentOrientation = DisplayOrientation.Portrait; // this.Window.Title = "Tetris"; // this.Window.OrientationChanged += new EventHandler<EventArgs>(OnOrientationChanged); }
public void Initialiser() { NCoup = 0; Resultat = Statut.NonDefini; NombrePropose = 0; }