internal void New(int type, string text) { Type = type; isNew = true; dauvp = null; AvecFrais = null; SansFrais = null; if (type == 0) { dauvp = new DAUVP(); dauvp.name = text; sql.addDAUVP(dauvp); } else if (type == 1) { AvecFrais = new AvecFrais(); AvecFrais.name = text; sql.addAvecFrais(this.AvecFrais); } else { SansFrais = new SansFrais(); SansFrais.name = text; sql.addSansFrais(this.SansFrais); } this.PageType(); }
/// <summary> /// Nouvelle Fiche /// </summary> /// <param name="type"></param> public void New(int type) { Type = type; isNew = true; dauvp = null; AvecFrais = null; SansFrais = null; if (type == 0) { dauvp = new DAUVP(); } else if (type == 1) { AvecFrais = new AvecFrais(); } else { SansFrais = new SansFrais(); } this.PageType(); }
/// <summary> /// Ouvrir une fiche /// </summary> /// <param name="type"></param> /// <param name="id"></param> public void Open(int type, int id) { isNew = false; Type = type; dauvp = null; AvecFrais = null; SansFrais = null; if (type == 0) { dauvp = this.sql.getD(id); } else if (type == 1) { AvecFrais = this.sql.GetAF(id); } else { SansFrais = this.sql.GetSF(id); } // mm.rebind(); this.PageType(); }