示例#1
0
        public Documentation(Web.Models.GeoEnsElecPortionEqPp GeoEqPp, TypeDocument d, CleOuvrage cleOuvrage)
        {
            // TODO: Complete member initialization

            this.cleOuvrage = cleOuvrage;
            this.Cle = GeoEqPp.Id;
            this.CodeEquipement = GeoEqPp.CodeEquipement;
            this.Designation = d;
            this.Dossier = d.Parent.Libelle;
            this.TypeOuvrage = null;
            this.NumeroVersion = null;
            this.Libelle = null;
            this.DateEnregistrement = null;
            this.DocumentUrl = null;
            this.ClePp = GeoEqPp.ClePp;
            this.CleEnsElectrique = GeoEqPp.CleEnsElectrique;
            this.ClePortion = GeoEqPp.ClePortion;

            this.LibelleEe = GeoEqPp.LibelleEe;
            this.LibellePortion = GeoEqPp.LibellePortion;
            if (cleOuvrage == CleOuvrage.CleEquipement)
            {
                this.CleEquipement = GeoEqPp.CleEquipement;
                this.LibelleEquipement = GeoEqPp.LibelleEquipement;
            }
            this.LibellePp = GeoEqPp.LibellePp;
            this.Code = GeoEqPp.Code;
        }
示例#2
0
 public Document(CleOuvrage typeOuvrage, int cleOuvrage = 0, string numeroVersion = null, string libelle = null, bool archive = false, TypeDocument designation = null)
 {
     TypeOuvrage = typeOuvrage;
     CleOuvrage = cleOuvrage;
     NumeroVersion = numeroVersion;
     if (libelle != null && libelle.StartsWith(this.PrefixeFileName))
     {
         libelle = libelle.Remove(0, this.PrefixeFileName.Length);
     }
     initDocument(libelle, archive, designation);
 }
示例#3
0
 public Document(string libelle = null, bool archive = false, TypeDocument designation = null)
 {
     initDocument(libelle, archive, designation);
 }
示例#4
0
 private void initDocument(string libelle = null, bool archive = false, TypeDocument designation = null)
 {
     Libelle = libelle;
     LibelleOriginal = libelle;
     Archive = archive;
     Designation = designation;
     DesignationOriginale = designation;
     PropertyChanged += (o, e) =>
     {
         if (e.PropertyName == "Archive" || e.PropertyName == "NumeroVersion")
         {
             this.IsModified = true;
         }
         else if (e.PropertyName == "Designation" && !this.IsNew)
         {
             this.IsMoved = true;
         }
         else if (e.PropertyName == "Libelle")
         {
             this.IsNewEntity = true;
         }
     };
 }