예제 #1
0
        private void CargarGastos()
        {
            CLS_Gastos_Contpaq gs = new CLS_Gastos_Contpaq();

            gs.MtdSeleccionarCtasNoConsidera();
            string Cadena = String.Empty;

            if (gs.Exito)
            {
                for (int i = 0; i < gs.Datos.Rows.Count; i++)
                {
                    string s = gs.Datos.Rows[i]["Id_cuenta"].ToString();;

                    if (i == 0)
                    {
                        Cadena = s;
                    }
                    else
                    {
                        Cadena = Cadena + "," + s;
                    }
                }
            }



            gridControl1.DataSource = null;
            gridControl2.DataSource = null;
            CLS_GastosSalidas Clase = new CLS_GastosSalidas();

            Clase.Parametro = radioParametro.EditValue.ToString();
            DateTime Fecha = Convert.ToDateTime(dateDel.Text.Trim());

            Clase.F_Del     = Fecha.Year.ToString() + DosCero(Fecha.Month.ToString()) + DosCero(Fecha.Day.ToString());
            Fecha           = Convert.ToDateTime(dateAl.Text.Trim());
            Clase.F_Al      = Fecha.Year.ToString() + DosCero(Fecha.Month.ToString()) + DosCero(Fecha.Day.ToString());
            Clase.Id_Activo = textActivo.Text;
            Clase.Cuentas   = Cadena;
            if (checkEmpresas.Checked)
            {
                Clase.Id_Empresa = "";
            }
            else
            {
                Clase.Id_Empresa = comboEmpresas.EditValue.ToString().Substring(0, 4);
            }

            Clase.MtdSeleccionarGastos();
            if (Clase.Exito)
            {
                gridControl2.DataSource = Clase.Datos;
            }
        }
예제 #2
0
        private void CargarGastos()
        {
            dtgReporte.DataSource = null;
            CLS_GastosSalidas Clase = new CLS_GastosSalidas();

            Clase.Moneda = radioMoneda.EditValue.ToString();
            DateTime Fecha = Convert.ToDateTime(dateDel.Text.Trim());

            Clase.F_Del      = Fecha.Year.ToString() + DosCero(Fecha.Month.ToString()) + DosCero(Fecha.Day.ToString());
            Fecha            = Convert.ToDateTime(dateAl.Text.Trim());
            Clase.F_Al       = Fecha.Year.ToString() + DosCero(Fecha.Month.ToString()) + DosCero(Fecha.Day.ToString());
            Clase.Id_Empresa = comboEmpresas.EditValue.ToString().Substring(0, 4);
            Clase.MtdSeleccionarGastosEmpresa();
            if (Clase.Exito)
            {
                dtgReporte.DataSource = Clase.Datos;
            }
        }