public CRUDSelController GetCRUDSelController(DBase db, Type businessLogicType, Type crudFormType, string gridTitle, string crudFormTitle) { CRUDSelController result; BusinessLogic businessLogic = BusinessLogicFactory.GetBusinessLogicInstance(db, businessLogicType); result = new CRUDSelController(businessLogic, gridTitle, crudFormTitle, crudFormType); return(result); }
private void notasDeDébitoToolStripMenuItem_Click(object sender, EventArgs e) { ComprobantesBL FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.NotaDebito); CRUDComprobantesController result = new CRUDComprobantesController(FacturasBL, "Notas de Débito", "Notas de Débito", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); }
private void AvisoFacturasProgramadas() { ComprobantesBL comprobantes = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; Int32 pendientesHoy = comprobantes.HasComprobantesProgramados(); if (pendientesHoy > 0) { MessageBox.Show("Tiene " + pendientesHoy.ToString() + " comprobantes programados pendientes de emisión."); } }
private void detallesToolStripMenuItem_Click(object sender, EventArgs e) { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { CRUDComprobantesController crudComprobantes = new CRUDComprobantesController(BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)), "Comprobantes", "Comprobantes", typeof(ComprobantesCRUD)); crudComprobantes.Comprobantes = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; crudComprobantes.Empresas = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(EmpresasBL)) as EmpresasBL; crudComprobantes.GenerarArchivoDetallePeriodo(); MessageBox.Show("Se ha generado con éxito el archivo de detalles", "Archivo de detalles generado", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void mnuCompras_NotasDebito_Click(object sender, EventArgs e) { ComprobantesComprasBL notasDebitoBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesComprasBL)) as ComprobantesComprasBL; notasDebitoBL.SetTipoFilter(TiposComprobantesList.NotaDebito); CRUDComprobantesComprasController result = new CRUDComprobantesComprasController(notasDebitoBL, "Notas de Débito de Proveedores", "Notas de Débito de Proveedores", typeof(ComprobantesComprasCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); }
private void mnuAfip_LibroIVACompras_Click(object sender, EventArgs e) { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { new LibroComprasAFIPController( BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesComprasBL)) as ComprobantesComprasBL, BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(EmpresasBL)) as EmpresasBL ).Generar(); } if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { ShowPeriodo(ShowComprobantesComprasReport); } }
private void emitirPendientesToolStripMenuItem_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; frmSplash.Show(); EmpresasBL EmpresasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(EmpresasBL)) as EmpresasBL; ComprobantesBL FacturasBL; FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; //FacturasBL.SetTipoFilter(TiposComprobantesList.Factura); List <TiposComprobantesList> tipos = new List <TiposComprobantesList>(); tipos.Add(TiposComprobantesList.Factura); tipos.Add(TiposComprobantesList.NotaCredito); tipos.Add(TiposComprobantesList.NotaDebito); FacturasBL.SetTiposFilter(tipos); FacturasBL.SetEstadoFilter(Comprobantes.EstadoPendiente); FacturasBL.SetEmisionHoyFilter(); ArrayList facturasPend = new ArrayList(); facturasPend.AddRange(FacturasBL.GetDataSource()); CRUDComprobantesController result = new CRUDComprobantesController(FacturasBL, "Facturas", "Facturas", typeof(ComprobantesCRUD)); bool verReporteAux; string nroComp; int index = 1; Empresas emp = null; foreach (Comprobantes comp in facturasPend) { frmSplash.TextoContador = String.Format("{0} de {1}", index.ToString(), facturasPend.Count.ToString()); frmSplash.Refresh(); nroComp = null; verReporteAux = comp.VerReporte; comp.VerReporte = false; result.EmitirComprobante(comp, out nroComp, false); if (nroComp == "-1") { throw new Exception("Hubo un error emitiendo los comprobantes."); } PersistirUltimoNroCbanteComprobante(comp); comp.VerReporte = verReporteAux; index++; emp = comp.Empresa; } EmpresasBL.SaveOrUpdate(emp); frmSplash.Hide(); Cursor.Current = Cursors.Default; }
private void emitirFacturaToolStripMenuItem_Click(object sender, EventArgs e) { Thread thrdStatus = new Thread(new ParameterizedThreadStart(Status.CheckStatus)); thrdStatus.IsBackground = true; thrdStatus.Start(this); ComprobantesBL FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.Factura); CRUDComprobantesController result = new CRUDComprobantesController(FacturasBL, "Facturas", "Facturas", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowCRUDForm(); }
public CRUDController GetCRUDController(DBase db, Type businessLogicType, Type crudFormType, string gridTitle, string crudFormTitle, bool repeatCreate) { CRUDController result = null; CRUDControllerIdentifier key = new CRUDControllerIdentifier(businessLogicType, crudFormType, gridTitle, crudFormTitle); if (!crudControllerList.Contains(key)) { BusinessLogic businessLogic = BusinessLogicFactory.GetBusinessLogicInstance(db, businessLogicType); result = new CRUDController(businessLogic, gridTitle, crudFormTitle, crudFormType, repeatCreate); childControllerManager.SetChildControllers(result); crudControllerList.Add(key, result); } else { result = (CRUDController)crudControllerList[key]; } return(result); }
public CRUDOnlineController GetCRUDController(DBase db, Type businessLogicType, string gridTitle) { CRUDOnlineController result = null; CRUDControllerIdentifier key = new CRUDControllerIdentifier(businessLogicType, typeof(GridOnLineForm), gridTitle); if (!crudControllerList.Contains(key)) { BusinessLogic businessLogic = BusinessLogicFactory.GetBusinessLogicInstance(db, businessLogicType); result = new CRUDOnlineController(businessLogic, gridTitle); crudControllerList.Add(key, result); } else { result = (CRUDOnlineController)crudControllerList[key]; } return(result); }
public async Task MakeChannelAsync([Remainder] string newChannelName = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetMakeChannelLogic(GetType(), Context, newChannelName).ExecuteAsync());
public void ShowProductosReport(DateTime fechaDesde, DateTime fechaHasta) { new ReportViewer().Open(ReportManager.GetReportProductos(BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ProductosBL)), fechaDesde, fechaHasta)); }
private void bbMain_ItemClick(object sender, ItemEventArgs e) { CRUDComprobantesController result; ComprobantesBL FacturasBL; switch (e.Item.Key) { case "Productos": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(ProductosBL), typeof(ProductosCRUD), "Productos", "Productos").ShowGrid(); break; } case "Clientes": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(ClientesBL), typeof(ClientesCRUD), "Clientes", "Clientes").ShowGrid(); break; } case "Rubros": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(RubrosBL), typeof(IdDescripcionCRUD), "Rubros", "Rubros").ShowGrid(); break; } case "Clases": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(ClasesBL), typeof(IdDescripcionCRUD), "Clases", "Clases").ShowGrid(); break; } case "Tipos Contribuyente": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(TiposContribuyentesBL), typeof(TiposContribuyentesCRUD), "Tipos Contribuyentes", "Tipos Contribuyentes").ShowGrid(); break; } case "Empresa": { CRUDControllerManager.Instance.GetCRUDController(db, typeof(EmpresasBL), typeof(EmpresasCRUD), "Empresas", "Empresas").ShowGrid(); break; } case "Facturacion": { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { ShowPeriodoYTipo(ShowFacturacionReport); } break; } case "ProductosTOP": { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { ShowPeriodo(ShowProductosReport); } break; } case "LibroIVA": { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { ShowPeriodo(ShowComprobantesReport); } break; } case "Usuarios": { if (SecurityManager.Instance.HavePermissions(new FuncionReportes())) { ShowPeriodoYTipo(ShowFacturacionUsuariosReport); } break; } case "Comprobantes": { //CRUDControllerManager.Instance.GetCRUDController(db, typeof(ComprobantesBL), typeof(ComprobantesCRUD), "Comprobantes", "Comprobantes").ShowGrid(); //CRUDComprobantesController result = new CRUDComprobantesController(BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)), "Comprobantes", "Comprobantes", typeof(ComprobantesCRUD)); //CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); //result.ShowGrid(); FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.Factura); result = new CRUDComprobantesController(FacturasBL, "Facturas", "Facturas", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); break; } case "Pendientes": { FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; //FacturasBL.SetTipoFilter(TiposComprobantesList.Factura); List <TiposComprobantesList> tipos = new List <TiposComprobantesList>(); tipos.Add(TiposComprobantesList.Factura); tipos.Add(TiposComprobantesList.NotaCredito); tipos.Add(TiposComprobantesList.NotaDebito); FacturasBL.SetTiposFilter(tipos); FacturasBL.SetEstadoFilter(Comprobantes.EstadoPendiente); result = new CRUDComprobantesController(FacturasBL, "Pendientes", "Facturas", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); break; } case "EmitirComprobante": { Thread thrdStatus = new Thread(new ParameterizedThreadStart(Status.CheckStatus)); thrdStatus.IsBackground = true; thrdStatus.Start(this); FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.Factura); result = new CRUDComprobantesController(FacturasBL, "Facturas", "Facturas", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowCRUDForm(); break; } case "NotaCredito": { FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.NotaCredito); result = new CRUDComprobantesController(FacturasBL, "Notas de Crédito", "Notas de Crédito", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); break; } case "NotaDebito": { FacturasBL = BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)) as ComprobantesBL; FacturasBL.SetTipoFilter(TiposComprobantesList.NotaDebito); result = new CRUDComprobantesController(FacturasBL, "Notas de Débito", "Notas de Débito", typeof(ComprobantesCRUD)); CRUDControllerManager.Instance.GetCRUDChildControllerManager().SetChildControllers(result); result.ShowGrid(); break; } } }
public async Task GitHubJoinTeamAsync([Remainder] string args = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetGitHubJoinTeamLogic(GetType(), Context, args).ExecuteAsync());
public async Task GitHubListTeamsAsync([Remainder] string gitHubTeamSlug = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetGitHubListTeamMembersLogic(GetType(), Context, gitHubTeamSlug).ExecuteAsync());
private async Task JoinProjectAsync([Remainder] string projectName) => await ReplyAsync(embed : await BusinessLogicFactory.GetJoinProjectLogic(GetType(), Context, projectName).ExecuteAsync());
public async Task InfoAsync() => await ReplyAsync(embed : await BusinessLogicFactory.GetInfoLogic(GetType(), Context).ExecuteAsync());
public async Task PingAsync() => await ReplyAsync(embed : await BusinessLogicFactory.GetPingLogic(GetType(), Context, Context.Client.Latency).ExecuteAsync());
public void ShowFacturacionUsuariosReport(DateTime fechaDesde, DateTime fechaHasta, TipoPeriodo tipo) { new ReportViewer().Open(ReportManager.GetReportFacturacionUsuarios(BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesBL)), fechaDesde, fechaHasta, tipo)); }
public void ShowComprobantesComprasReport(DateTime fechaDesde, DateTime fechaHasta) { new ReportViewer().Open(ReportManager.GetReportComprobantesCompras(BusinessLogicFactory.GetBusinessLogicInstance(db, typeof(ComprobantesComprasBL)) as ComprobantesComprasBL, fechaDesde, fechaHasta)); }
private async Task ListProjectsAsync() => await ReplyAsync(embed : await BusinessLogicFactory.GetListProjectsLogic(GetType(), Context).ExecuteAsync());
internal static IPresentationLogic CreatePresentationLogic(IConfiguration configuration) { var businessLogic = BusinessLogicFactory.CreateBusinessLogic(); return(new PresentationLogic(configuration, businessLogic)); }
public RankingController() { _rankingService = BusinessLogicFactory.GetRankingService(); }
public async Task LeetAsync([Remainder] string title = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetLeetLogic(GetType(), Context, title).ExecuteAsync());
public async Task GitHubListTeamsAsync() => await ReplyAsync(embed : await BusinessLogicFactory.GetGitHubListTeamsLogic(GetType(), Context).ExecuteAsync());
public async Task LeetAnsAsync([Remainder] string answer = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetLeetAnsLogic(GetType(), Context, answer).ExecuteAsync());
public async Task GitHubJoinOrgAsync([Remainder] string gitHubEmail = "") => await ReplyAsync(embed : await BusinessLogicFactory.GetGitHubJoinOrgLogic(GetType(), Context, gitHubEmail).ExecuteAsync());
public async Task GetExcuseAsync() => await ReplyAsync(embed : await BusinessLogicFactory.ExcuseGeneratorLogic(GetType(), Context).ExecuteAsync());
public NewsController() { _newsService = BusinessLogicFactory.GetNewsService(); }
public EventsController() { _eventsService = BusinessLogicFactory.GetEventsService(); }