Пример #1
0
 public int Insert(EServicesProxies EServiceProxy)
 {
     try
     {
         using (var db = new HCMEntities())
         {
             db.EServicesProxies.Add(EServiceProxy);
             db.SaveChanges();
             return(EServiceProxy.EServiceProxyID);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 public int Revoke(EServicesProxies EServiceProxy)
 {
     try
     {
         using (var db = new HCMEntities())
         {
             EServicesProxies EServiceProxyObj = db.EServicesProxies.FirstOrDefault(x => x.EServiceProxyID.Equals(EServiceProxy.EServiceProxyID));
             EServiceProxyObj.EServiceProxyStatusID = EServiceProxy.EServiceProxyStatusID;
             EServiceProxyObj.EndDate         = EServiceProxy.EndDate;
             EServiceProxyObj.IsActive        = EServiceProxy.IsActive;
             EServiceProxyObj.LastUpdatedDate = EServiceProxy.LastUpdatedDate;
             EServiceProxyObj.LastUpdatedBy   = EServiceProxy.LastUpdatedBy;
             return(db.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }