Example #1
0
        public void Update(TypePoint element)
        {
            var typePointToUpdate = this.GetByIdPrivate(element.Id);

            typePointToUpdate.Libelle = element.Libelle;
            base.Update(typePointToUpdate);
        }
        public bool UpdateTypePoint(TypePoint typePoint)
        {
            if (typePoint == null || typePoint.Id < 1)
            {
                return(false);
            }

            this._uow.TypePointRepo.Update(typePoint);
            this._uow.Save();
            return(true);
        }
Example #3
0
 public int Add(TypePoint element)
 {
     try
     {
         var result = base.Add(element.ToDataEntity());
         return(result.Id);
     }
     catch
     {
         return(0);
     }
 }
Example #4
0
        public static TypePointModel ToModel(this TypePoint bo)
        {
            if (bo == null)
            {
                return(null);
            }

            return(new TypePointModel
            {
                Id = bo.Id,
                Libelle = bo.Libelle,
            });
        }
Example #5
0
        public static TypePointEntity ToDataEntity(this TypePoint model)
        {
            if (model == null)
            {
                return(null);
            }

            return(new TypePointEntity
            {
                Id = model.Id,
                Libelle = model.Libelle
            });
        }
        public bool AddTypePoint(TypePoint typePoint)
        {
            if (typePoint != null)
            {
                int lastId = this._uow.TypePointRepo.Add(typePoint);
                if (lastId > 0)
                {
                    typePoint.Id = lastId;
                }
                return(true);
            }

            return(false);
        }
Example #7
0
        public PointAltitude(double anAltitude, int index)
        {
            altitude = anAltitude;
            if (index == 0)
            {
                typePoint = TypePoint.COTE;
            }
            else
            {
                typePoint = TypePoint.SOMMET;
            }


            altitudeTextBlock.Text     = altitude.ToString();
            altitudeTextBlock.FontSize = 9;
            altitudeTextBlock.Height   = 10;
            altitudeTextBlock.Width    = 20;
        }