Ejemplo n.º 1
0
        //RIESGO
        async Task <Int32> IDataInjector.CreateRiesgo(Ekilibrate.Model.Entity.Participante.clsRiesgoBase Data)
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.Participante.clsRiesgo(scope);
                    var result        = await objController.Create(Data);

                    var DBContext = scope.Resolve <DBTrnContext>();
                    DBContext.CommitTransaction();
                    return(result);
                }
                catch (FaultException ex)
                {
                    throw ex;
                }
                catch (Exception)
                {
                    throw new FaultException("Error al registrar los datos de riesgo.");
                }
            }
        }
Ejemplo n.º 2
0
        async Task IDataInjector.DeleteRiesgo(int ID_PARTICIPANTE)
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.Participante.clsRiesgo(scope);
                    await objController.Delete(ID_PARTICIPANTE);

                    var DBContext = scope.Resolve <DBTrnContext>();
                    DBContext.CommitTransaction();
                }
                catch (FaultException ex)
                {
                    throw ex;
                }
                catch (Exception ex)
                {
                    var objController = new Ekilibrate.BL.Common.clsLog(scope);
                    objController.GuardarLog(ex);
                    throw new FaultException("Error al eliminar datos de riesgo.");
                }
            }
        }
Ejemplo n.º 3
0
        async Task IDataInjector.UpdateRiesgo(Ekilibrate.Model.Entity.Participante.clsRiesgoBase Data)
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.Participante.clsRiesgo(scope);
                    await objController.Update(Data);

                    var DBContext = scope.Resolve <DBTrnContext>();
                    DBContext.CommitTransaction();
                }
                catch (FaultException ex)
                {
                    throw ex;
                }
                catch (Exception ex)
                {
                    var objController = new Ekilibrate.BL.Common.clsLog(scope);
                    objController.GuardarLog(ex);
                    throw new FaultException("Error al actualizar datos de riesgo.");
                }
            }
        }