public PayByPaypalController(IEngineDb _Metodo, IEngineProyect _Funcion, IEnginePaypal _Paypal, SudokuContext _Context) { this.Metodo = _Metodo; this.Context = _Context; this.Funcion = _Funcion; this.Paypal = _Paypal; }
public ManagerController(IEngineDb _Metodo, IEngineProyect _Funcion, IEngineNotificacion _Notificacion, SudokuContext _Context) { this.Metodo = _Metodo; this.Context = _Context; this.Funcion = _Funcion; this.Notificacion = _Notificacion; }
public AsistenciaClaseApiController(IEngineTool _tool, IEngineDb _metodo, IEngineProject _funcion, IEngineNotify _notyfy) { Tool = _tool; Metodo = _metodo; Funcion = _funcion; Notify = _notyfy; }
public bool EnviarNuevaNotificacion(IEngineNotificacion Notificacion, IEngineDb Metodo, string email = "", string type = "", string password = "") { bool resultado = false; EstructuraMail model = new EstructuraMail(); resultado = CadenaBase64Valida(email); if (resultado) { email = DecodeBase64(email); } if (type == EngineData.Test) { string enlaze = CrearEnlazePrueba(Metodo, email); model = SetEstructuraMailTest(enlaze, email, model); } else if (type == EngineData.Register) { password = DecodeBase64(password); string enlaze = CrearEnlazeRegistro(Metodo, email, password); model = SetEstructuraMailRegister(enlaze, email, model); } else if (type == EngineData.RegisterManager) { string enlaze = CrearEnlazeRegistroGerente(Metodo, email); model = SetEstructuraMailRegisterManager(enlaze, email, model); } resultado = Notificacion.EnviarMailNotificacion(model); return(resultado); }
public bool ConstruirSucesoLog(string cadena, IEngineDb Metodo) { string [] x = cadena.Split('*'); SucesoLog modelo = new SucesoLog() { Fecha = DateTime.UtcNow, Excepcion = x[0], Metodo = x[1], Email = x[2] }; return(Metodo.InsertarSucesoLog(modelo)); }
public Cliente ConstruirActualizarClienteTest(IEngineDb Metodo, string email, string identidad) { Guid guid = Metodo.ObtenerIdentidadCliente(email); Cliente R = new Cliente() { Email = email, FechaActivacionPrueba = DateTime.UtcNow, EstatusEnvioNotificacion = true, Identidad = guid }; return(R); }
public ActivarCliente ConstruirActivarCliente(IEngineDb Metodo, string email, string password) { Guid guid = Metodo.ObtenerIdentidadCliente(email); ActivarCliente R = new ActivarCliente() { Email = email, Password = password, FechaActivacion = DateTime.UtcNow, Estatus = true, Identidad = guid }; return(R); }
public string CrearEnlazeRegistroGerente(IEngineDb Metodo, string email) { string fecha = Convert.ToString(DateTime.UtcNow).Replace(" ", "*"); fecha = fecha.Replace(".", "+"); string link = string.Empty; link = EngineData.EndPointValidation; link = link + "Id=" + "0&"; link = link + "email=" + ConvertirBase64(email); link = link + "&identidad=" + EncodeMd5(Metodo.ObtenerIdentidadGerente(email).ToString()); link = link + "&status=" + "1"; link = link + "&date=" + fecha; link = link + "&type=" + EngineData.RegisterManager; link = link + "&cultureInfo=" + EngineData.GetCultura(); return(link); }
public string CrearEnlazeRestablecerPassword(IEngineDb Metodo, string email, string codigo) { string fecha = Convert.ToString(DateTime.UtcNow).Replace(" ", "*"); fecha = fecha.Replace(".", "+"); string link = string.Empty; link = EngineData.EndPointValidation; link = link + "Id=" + "1&"; link = link + "email=" + ConvertirBase64(email); link = link + "&ide=" + ConvertirBase64(codigo); link = link + "&identidad=" + EncodeMd5(Metodo.ObtenerIdentidadCliente(email).ToString()); link = link + "&status=" + "0"; link = link + "&date=" + fecha; link = link + "&type=" + EngineData.ResetPassword; link = link + "&cultureInfo=" + EngineData.GetCultura(); return(link); }
public CompanyApiController(IEngineTool _tool, IEngineDb _metodo, IEngineNotify _notificacion) { Tool = _tool; Metodo = _metodo; Notificacion = _notificacion; }
public PersonApiController(IEngineTool _tool, IEngineDb _metodo) { Tool = _tool; Metodo = _metodo; }
public DevicesCompany BuilDeviceCompany(Company company, RegisterDevice device, IEngineDb Metodo) { string[] arrayUser = { device.Email, device.User }; UserApi userApi = Metodo.GetUser(arrayUser); DevicesCompany devicesCompany = new DevicesCompany() { IdCompany = company.Id, IdUserApi = userApi.Id, IdTypeUser = 2, CreateDate = DateTime.UtcNow, Phone = device.Phone, Dni = device.Dni, Nombre = device.Nombre }; return(devicesCompany); }
public GameController(IEngineDb _Metodo, IEngineProyect _Funcion, SudokuContext _Context) { this.Metodo = _Metodo; this.Context = _Context; this.Funcion = _Funcion; }
public DeviceApiController(IEngineTool _tool, IEngineDb _metodo, IEngineProject _funcion) { Tool = _tool; Metodo = _metodo; Funcion = _funcion; }
public bool BuildXlsxAsistenciaClase(List <AsistenciaClase> asis, IEngineDb Metodo) { string nombreProfesor = Metodo.NameDevice(asis[0].DniAdm); Excel.Application application = new Excel.Application(); Excel.Workbook workbook = application.Workbooks.Add(System.Reflection.Missing.Value); Excel.Worksheet worksheet = workbook.ActiveSheet; worksheet.Cells[1, 1] = "Institucion"; worksheet.Cells[1, 2] = Metodo.GetCompanyName(asis[0].IdCompany); worksheet.get_Range("A1", "B1").Interior.Color = Color.Black; worksheet.get_Range("A1", "B1").Font.Color = Color.White; worksheet.Cells[2, 1] = "Fecha"; worksheet.Cells[2, 2] = "Materia"; worksheet.Cells[2, 3] = "Grado"; worksheet.Cells[2, 4] = "Grupo"; worksheet.Cells[2, 5] = "DI - Profesor"; worksheet.get_Range("A2", "E2").Interior.Color = Color.Black; worksheet.get_Range("A2", "E2").Font.Color = Color.White; worksheet.Cells[3, 1] = DateTime.Now.Date.ToString("dd/MM/yyyy"); worksheet.Cells[3, 2] = asis[0].Materia; worksheet.Cells[3, 3] = asis[0].Grado; worksheet.Cells[3, 4] = asis[0].Grupo; worksheet.Cells[3, 5] = asis[0].DniAdm + " - " + nombreProfesor; worksheet.Cells[5, 1] = "NÂȘ"; worksheet.Cells[5, 2] = "Nombre"; worksheet.Cells[5, 3] = "Apellido"; worksheet.Cells[5, 4] = "Documento de Identidad"; worksheet.Cells[5, 5] = "Fecha"; worksheet.Cells[5, 6] = "Estado"; worksheet.get_Range("A5", "F5").Interior.Color = Color.Black; worksheet.get_Range("A5", "F5").Font.Color = Color.White; int row = 6; int index = 1; foreach (var I in asis) { try { worksheet.Range["A" + row.ToString(), "F" + row.ToString()].Font.Color = System.Drawing.Color.Black; worksheet.Range["A" + row.ToString(), "F" + row.ToString()].Font.Size = 10; var P = Metodo.GetPerson(I.Dni); worksheet.Cells[row, 1] = index.ToString(); worksheet.Cells[row, 2] = P.Nombre; worksheet.Cells[row, 3] = P.Apellido; worksheet.Cells[row, 4] = I.Dni; worksheet.Cells[row, 5] = DateTime.Now.Date.ToString("dd/MM/yyyy"); worksheet.Cells[row, 6] = Estado(I.Status); index++; row++; } catch (Exception ex) { string error = ex.ToString(); } } application.Columns.AutoFit(); application.Rows.AutoFit(); application.Columns.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; application.Rows.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; application.DisplayAlerts = false; string nombreArchivo = NombreArchivo(asis, nombreProfesor); string path = System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/" + nombreArchivo); // CrearDirectorioSiNoExiste(HttpContext.Current.Server.MapPath("~/App_Data")); workbook.SaveAs(path); workbook.Close(); application.Quit(); string emailTo = Metodo.EmailCompany(asis[0].IdCompany); EngineNotify notify = new EngineNotify(); notify.EnviarEmail(emailTo, nombreArchivo, path, false); return(true); }
public AsistenciaComedorApiController(IEngineTool _tool, IEngineDb _metodo) { Tool = _tool; Metodo = _metodo; }
public UserController(EngineContext _context, IEngineDb _Metodo, IEngineLogical _Funcion) { context = _context; Metodo = _Metodo; Funcion = _Funcion; }
public DevicesCompany BuilDeviceCompany(List <RegisterDevice> listDevice, RegisterDevice device, IEngineDb Metodo) { string[] arrayUser = { device.Email, device.User }; UserApi userApi = Metodo.GetUser(arrayUser); if (userApi != null) { DevicesCompany devicesCompany = new DevicesCompany() { IdCompany = listDevice[0].IdCompany, IdUserApi = userApi.Id, IdTypeUser = 2, CreateDate = DateTime.UtcNow, Phone = device.Phone, Dni = device.Dni, Nombre = device.Nombre }; return(devicesCompany); } return(null); }