Beispiel #1
0
        public static List <Struct_Factura> GetFacturasBetweenDates(DateTime START, DateTime END, int p_UserID, bool p_printed, TipoDeFactura TF)
        {
            string T;

            switch (TF)
            {
            case TipoDeFactura.FacturaA: T = "A"; break;

            case TipoDeFactura.FacturaB: T = "B"; break;

            case TipoDeFactura.FacturaC: T = "C"; break;

            case TipoDeFactura.FacturaX: T = "X"; break;

            case TipoDeFactura.Presupuesto: T = "P"; break;

            default: T = "0"; break;
            }
            Data2.Connection.D_Factura Conn = new Connection.D_Factura();
            List <Struct_Factura>      FL   = new List <Struct_Factura>();
            List <DataTable>           DT_L = Conn.GetFacturasBetweenDates(p_UserID, START, END, T, p_printed);

            if (DT_L[0] != null)
            {
                foreach (DataRow R in DT_L[0].Rows)
                {
                    FL.Add(new Struct_Factura(R));
                }
            }

            if (DT_L[1] != null)
            {
                foreach (DataRow R in DT_L[1].Rows)
                {
                    Struct_Remito  _Remito = new Struct_Remito(R);
                    Struct_Factura _F      = new Struct_Factura(_Remito);
                    FL.Add(_F);
                }
            }


            if (FL.Count > 0)
            {
                return(FL);
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
 public Struct_Factura(Struct_Remito RemitoToParse)
 {
     IsRemito = true;
     Remito   = RemitoToParse;
 }