Example #1
0
        private void CantidadTotalRubrosyProductos(DateTime fecha)
        {
            ProductoFacade prodFac = new ProductoFacade();
            categoriaFacade catFac = new categoriaFacade();
            ltotalproduc.Content = prodFac.getTotalProductosbyMes(fecha).ToString();
            ltotalrubros.Content = catFac.getTotalCategoriabyMes(fecha).ToString();


        }
Example #2
0
        private void calendar1_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
        {


            if (txtFechaReporte != null) //Because the calendar may render prior to the textbox
            {
                //year = calendarReportesPagoRubro.DisplayDate.Year.ToString();
                month = calendarReportesPagoRubro.DisplayDate.ToString("y");
                MesRubroProd = calendarReportesPagoRubro.DisplayDate;
                //CantidadTotalRubrosyProductos(MesRubroProd);
                ProductoFacade prodFac = new ProductoFacade();
                categoriaFacade catFac = new categoriaFacade();
                int p = prodFac.getTotalProductosbyMes(MesRubroProd);
                int r = catFac.getTotalCategoriabyMes(MesRubroProd);
                CantidadTotalRubrosyProductos(MesRubroProd);
                //MessageBox.Show(MesRubroProd.Month.ToString()+":rubro:"+r+"-producto:"+p);
                /*if (calendarReportesPagoRubro.DisplayDate.Month < 10)
                {
                    month = "0" + month;
                }*/
                txtFechaReporte.Text = month;
                //txtFechaReporte.Text = string.Format("{0}-{1}", year, month);
                //txtFechaReporte.Text = string.Format("{0}-{1}", year, month);
            }
        }
Example #3
0
        private void CantidadTotalRubrosyProductos(DateTime fecha)
        {
            ProductoFacade prodFac = new ProductoFacade();
            categoriaFacade catFac = new categoriaFacade();
            int p = prodFac.getTotalProductosbyMes(fecha);
            int c = catFac.getTotalCategoriabyMes(fecha);
            if (p == 0 || c == 0)
            {
                ltotalproduc.Content = p.ToString();
                ltotalrubros.Content = c.ToString();
            }
            else
            {
                ltotalproduc.Content = p.ToString("#,#", CultureInfo.InvariantCulture);
                ltotalrubros.Content = c.ToString("#,#", CultureInfo.InvariantCulture);
            }



        }