Example #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.");
                }
            }
        }
Example #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");
                }
            }
        }
Example #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;
                }
            }
        }