Beispiel #1
0
 public bool Insert(TypePolicyM typePolicy)
 {
     using (var context = new DataEntities())
     {
         context.TypePolicyMs.Add(typePolicy);
         return(context.SaveChanges() > 0);
     }
 }
Beispiel #2
0
 public bool Update(TypePolicyM typePolicy)
 {
     using (var context = new DataEntities())
     {
         var typepolicyUpdate = context.TypePolicyMs.SingleOrDefault(x => x.IdPolicy == typePolicy.IdPolicy);
         typepolicyUpdate.IdPolicy = typePolicy.IdPolicy;
         typepolicyUpdate.Name     = typePolicy.Name;
         typepolicyUpdate.Active   = Convert.ToBoolean(typePolicy.Active);
         return(context.SaveChanges() > 0);
     }
 }
Beispiel #3
0
 public bool Update(TypePolicyM typepolicy)
 {
     try
     {
         return(TypePolicyproxy.Update(typepolicy));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
 public bool Insert(TypePolicyM typepolicy)
 {
     try
     {
         return(TypePolicyproxy.Insert(typepolicy));
     }
     catch (Exception)
     {
         throw;
     }
 }
        public bool Put(TypePolicyM typePolicy)
        {
            var list = TypePolicyProxy.Update(typePolicy);

            return(list);
        }
        public bool Post(TypePolicyM typePolicy)
        {
            var list = TypePolicyProxy.Insert(typePolicy);

            return(list);
        }