Exemplo n.º 1
0
        async Task IDataInjector.ProgramarCitas(int ProyectoId)
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.clsController(scope);
                    await objController.ProgramarCitasNutricionales(ProyectoId);

                    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 registrar los datos del proyecto.");
                }
            }
        }
Exemplo n.º 2
0
        async Task IDataInjector.SendNotifications()
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.clsController(scope);
                    await objController.SendNotifications();

                    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 enviar correo de prueba a los contactos");
                }
            }
        }
Exemplo n.º 3
0
        async Task IDataInjector.EnviarNotificacion(int ProyectoId)
        {
            using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope("a"))
            {
                try
                {
                    var objController = new Ekilibrate.BL.Controller.clsController(scope);
                    await objController.EnviarNotificacion(ProyectoId);

                    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 ex;
                }
            }
        }