Example #1
0
        void CargarDetalleDesdeDB()
        {
            GestionDataSet.GetDetalleFacturaDataTable DT = new GestionDataSet.GetDetalleFacturaDataTable();
            GestionDataSetTableAdapters.GetDetalleFacturaTableAdapter TA = new GestionDataSetTableAdapters.GetDetalleFacturaTableAdapter();
            TA.Fill(DT, Id, UserId);
            if (DT.Rows.Count > 0)
            {
                MiDetalle = new List <Struct_DetalleFactura>();
                foreach (DataRow _Row in DT.Rows)
                {
                    Struct_DetalleFactura _DetalleFactura = new Struct_DetalleFactura(_Row, UserId);

                    MiDetalle.Add(_DetalleFactura);
                }
            }
        }
Example #2
0
 public void GetDetalleFactura(int IdUser, int IdFactura, ref Class.XmlSerializaers.Factura F)
 {
     GestionDataSet.GetDetalleFacturaDataTable DT = new GestionDataSet.GetDetalleFacturaDataTable();
     GestionDataSetTableAdapters.GetDetalleFacturaTableAdapter TA = new GestionDataSetTableAdapters.GetDetalleFacturaTableAdapter();
     TA.Fill(DT, IdFactura, IdUser);
     if (DT.Rows.Count > 0)
     {
         F.MiDetalle = new List <Class.XmlSerializaers.Detalle>();
         if (DT.Rows[0][0].ToString() != "null")
         {
             for (int a = 0; a < DT.Rows.Count; a++)
             {
                 F.MiDetalle.Add(new Class.XmlSerializaers.Detalle(DT.Rows[a]));
             }
         }
     }
 }