public void Listar_Facturas()
        {
            try
            {
                string Condicion = "";

                if (cb_buscar.Text == "No. Contrato")
                {
                    Condicion = "(A.ID_FACTURA =" + Txt_Buscar.Text + ")";
                }
                if (cb_buscar.Text == "Cedula" || cb_buscar.Text == "")
                {
                    Condicion = "(B.NUMERO_IDENTIFICACION LIKE'%" + Txt_Buscar.Text + "%')";
                }
                if (cb_buscar.Text == "Cliente" || cb_buscar.Text == "")
                {
                    Condicion = "(B.NOMBRE LIKE'%" + Txt_Buscar.Text + "%')";
                }
                if (cb_buscar.Text == "Cobrador")
                {
                    Condicion = "(C.NOMBRE LIKE'%" + Txt_Buscar.Text + "%')";
                }
                if (cb_buscar.Text == "Estado")
                {
                    Condicion = "(E.DESCRIPCION LIKE'%" + Txt_Buscar.Text + "%')";
                }
                DG.DataSource = S_Factura.Listar_Facturas(Condicion + " AND A.ID_ESTADO<>1 ORDER BY A.ID_FACTURA DESC");
            }
            catch
            {
            }
        }
Пример #2
0
        public void Listar_Facturas()
        {
            string Condicion = "(B.NOMBRE LIKE'%" + Txt_Buscar.Text + "%' OR A.ID_FACTURA LIKE'%" + Txt_Buscar.Text + "%') ORDER BY A.ID_FACTURA DESC";

            DG.DataSource  = S_Factura.Listar_Facturas(Condicion);
            Lbl_Total.Text = "Total de Registros:  " + DG.RowCount.ToString();
            Cambiar_Color_Filas();
        }
Пример #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            DateTime desde     = dt_desde.Value;
            DateTime hasta     = dt_hasta.Value;
            string   Condicion = "(CONVERT(smalldatetime, CONVERT(char(10), A.FECHA, 103), 103) >= '" + desde.Date.ToString("yyyy-MM-dd") + "' and CONVERT(smalldatetime, CONVERT(char(10), A.FECHA, 103), 103) <= '" + hasta.Date.ToString("yyyy-MM-dd") + "')";

            DG.DataSource  = S_Factura.Listar_Facturas(Condicion);
            Lbl_Total.Text = "Total de Registros:  " + DG.RowCount.ToString();
            Cambiar_Color_Filas();
        }
Пример #4
0
        public void Listar_Facturas()
        {
            string Condicion = "(B.NOMBRE LIKE'%" + Txt_Buscar.Text + "%' OR A.ID_FACTURA LIKE'%" + Txt_Buscar.Text + "%') AND A.MONTO_PENDIENTE>0 AND A.ID_ESTADO=1 ORDER BY A.ID_FACTURA DESC";

            DG.DataSource = S_Factura.Listar_Facturas(Condicion);
        }