Esempio n. 1
0
 public void Update(CsStrategieSecurite admStrategieSecurite)
 {
     //SqlCommand cmd = new SqlCommand("spx_AdmStrategieSecurite_Update", cn);
     try
     {
         Galatee.Entity.Model.ADMSTRATEGIESECURITE entity = Entities.ConvertObject <Galatee.Entity.Model.ADMSTRATEGIESECURITE, CsStrategieSecurite>(admStrategieSecurite);
         Entities.UpdateEntity <Galatee.Entity.Model.ADMSTRATEGIESECURITE>(entity);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 2
0
 public void Insert(CsStrategieSecurite admStrategieSecurite)
 {
     try
     {
         //SqlCommand cmd = new SqlCommand("spx_AdmStrategieSecurite_Insert", cn);
         Galatee.Entity.Model.ADMSTRATEGIESECURITE entity = Entities.ConvertObject <Galatee.Entity.Model.ADMSTRATEGIESECURITE, CsStrategieSecurite>(admStrategieSecurite);
         entity.PK_ID = new Guid();
         Entities.InsertEntity <Galatee.Entity.Model.ADMSTRATEGIESECURITE>(entity);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 3
0
 public void SetActif(Guid IdStrategieSecurite)
 {
     try
     {
         using (Galatee.Entity.Model.galadbEntities context = new galadbEntities())
         {
             Galatee.Entity.Model.ADMSTRATEGIESECURITE entity = context.ADMSTRATEGIESECURITE.FirstOrDefault(pk => pk.PK_ID == IdStrategieSecurite);
             entity.ACTIF = true;
             List <Galatee.Entity.Model.ADMSTRATEGIESECURITE> lstentity = context.ADMSTRATEGIESECURITE.Where(pk => pk.PK_ID != IdStrategieSecurite).ToList();
             lstentity.ForEach(t => t.ACTIF = false);
             context.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
     }
 }