Example #1
0
        public void UpdageGeneration(EquinoxeExtend.Shared.Object.Record.Generation iNewGeneration)
        {
            if (iNewGeneration.GenerationId < 1)
            {
                throw new Exception("L'id de la génération est invalide");
            }

            if (iNewGeneration.CreatorGUID == null)
            {
                throw new Exception("L'id du createur n'est pas valide");
            }

            if (iNewGeneration.ProjectName.IsNullOrEmpty())
            {
                throw new Exception("Le nom du projet est invalide");
            }

            if (iNewGeneration.SpecificationId < 1)
            {
                throw new Exception("L'id de la specification est invalide");
            }

            //Modification de l'enregistrement
            var theEntity = new T_E_Generation();

            theEntity.Merge(iNewGeneration);
            DBRecordDataService.Update(theEntity);
        }
Example #2
0
        public long NewGeneration(EquinoxeExtend.Shared.Object.Record.Generation iNewGeneration)
        {
            if (iNewGeneration.GenerationId < 1)
            {
                throw new Exception("L'id de la génération est invalide");
            }

            if (iNewGeneration.CreatorGUID == null)
            {
                throw new Exception("L'id du createur n'est pas valide");
            }

            if (iNewGeneration.ProjectName.IsNullOrEmpty())
            {
                throw new Exception("Le nom du projet est invalide");
            }

            if (iNewGeneration.SpecificationId < 1)
            {
                throw new Exception("L'id de la specification est invalide");
            }

            //Création de l'enregistrement
            var newEntity = new T_E_Generation();

            newEntity.Merge(iNewGeneration);

            return(DBRecordDataService.Add <T_E_Generation>(newEntity).GenerationId);
        }