private void BtnCalcular(object sender, EventArgs e) { DateTime fch1 = ((FechaTransaccion)AFechaInicio.SelectedItem).Fecha; DateTime fch2 = ((FechaTransaccion)AFechaFinal.SelectedItem).Fecha; DateTime par1 = new DateTime(fch1.Year, fch1.Month, 1); DateTime par2 = new DateTime(fch2.Year, fch2.Month, 1); par2 = (par2.AddMonths(1)).AddDays(-1); var ss = _lstExcel.ToList(); CuentaCL.LLenarConSaldos(par1, par2, ss, GlobalConfig.Compañia); //if (!checkCuentasConSaldo.Checked) //{ // ss = new CuentaCL().QuitarCuentasSinSaldos(ss); //} CargarFormulario(); // //Distribu(); //using (SaveFileDialog sfd = new SaveFileDialog() { Filter = "Excel|*.xlsx", FileName = $"REPORTE DE PERDIDAS Y GANANCIAS {GlobalConfig.Compañia.ToString()}" }) //{ // if (sfd.ShowDialog() == DialogResult.OK) // { // ReporteExcel.createGenericList(excel, sfd.FileName); // } //} }
private void CargarDatos() { ListaCuentas = CuentaCL.GetAll(GlobalConfig.Compañia); var lstDts = new FechaTransaccionCL().GetAllActive(GlobalConfig.Compañia, GlobalConfig.Usuario); AFechaFinal.DataSource = lstDts; var lstBfchFnl = new List <FechaTransaccion> { (from c1 in lstDts select c1).OrderByDescending(x => x.Fecha).LastOrDefault() }; AFechaInicio.DataSource = lstBfchFnl; SetCuentasEnLista(); CrearColumnasParaNombre(); }
private void CargarDatos() { var lst = CuentaCL.GetAll(GlobalConfig.Compañia); var lstDts = new FechaTransaccionCL().GetAllActive(GlobalConfig.Compañia, GlobalConfig.Usuario); _lstExcel = from c in lst where c.TipoCuenta.TipoCuenta == TipoCuenta.Ingreso || c.TipoCuenta.TipoCuenta == TipoCuenta.Egreso || c.TipoCuenta.TipoCuenta == TipoCuenta.Costo_Venta select c; AFechaFinal.DataSource = lstDts; var lstBfchFnl = new List <FechaTransaccion> { (from c1 in lstDts select c1).OrderByDescending(x => x.Fecha).LastOrDefault() }; AFechaInicio.DataSource = lstBfchFnl; CrearColumnasParaNombre(); }
private void BtnCalcular(object sender, EventArgs e) { DateTime fch1 = ((FechaTransaccion)AFechaInicio.SelectedItem).Fecha; DateTime fch2 = ((FechaTransaccion)AFechaFinal.SelectedItem).Fecha; //var cuentasSitucaion = ListaCuentas.; //var cuentasPerdida = lstPerdidas; CuentaCL.LLenarConSaldos(fch1, fch2, ListaCuentas, GlobalConfig.Compañia); //CuentaCL.LLenarConSaldoB(par1, par2, cuentasPerdida, GlobalConfig.Compañia); //if (!checkCuentasConSaldo.Checked) //{ // ListaCuentas = new CuentaCL().QuitarCuentasSinSaldos(ListaCuentas); //} CargarFormulario(); }