Ejemplo n.º 1
0
 public List<Documento> ObtenerFacturasXEstadoXSocioNegocio(string pCodSN, string pEstadoFactura)
 {
     var documentos = new List<Documento>();
     var ds = EjecutarConsulta("dbo.ObtenerFacturasXEstadoXSN", new List<SqlParameter>()
                                 {
                                     new SqlParameter("pCodSN", pCodSN),
                                     new SqlParameter("pEstadoFactura", pEstadoFactura)
                                 });
     if (ds != null && ds.Tables != null && ds.Tables[0] != null && ds.Tables[0].Rows != null)
     {
         foreach (DataRow row in ds.Tables[0].Rows)
         {
             SocNegocio socNeg = new SocNegocio();
             socNeg.Codigo = row["_Cuenta"].ToString();
             documentos.Add(new Documento()
             {
                 IdDocumento = int.Parse(row["IdDocumento"].ToString()),
                 Consecutivo = row["Consecutivo"].ToString(),
                 Fecha1 = DateTime.Parse(row["Fecha"].ToString()),
                 Subtotal = double.Parse(row["Subtotal"].ToString()),
                 Total = double.Parse(row["Total"].ToString()),
                 SocioNegocio = socNeg
             });
         }
     }
     return documentos;
 }
Ejemplo n.º 2
0
 public int ObtenerIDMonedaCuentaDeMayorXCodigo(string CodigoSN)
 {
     int IdMoneda_Cuenta_Socio = 0;
     var ds = EjecutarConsulta("dbo.ObtenerCuentaDeMayorXCodigo", new List<SqlParameter>(){
             new SqlParameter("CodigoSN", CodigoSN)
     });
     if (ds != null && ds.Tables != null && ds.Tables[0] != null && ds.Tables[0].Rows != null)
     {
         foreach (DataRow row in ds.Tables[0].Rows)
         {
             var socio = new SocNegocio();
             socio.IdMoneda = int.Parse(row["IDMoneda"].ToString());
             IdMoneda_Cuenta_Socio = socio.IdMoneda;
         }
     }
     return IdMoneda_Cuenta_Socio;
 }
Ejemplo n.º 3
0
 public string ObtenerCuentaDeMayorXCodigo(string CodigoSN)
 {
     string Cuenta_Socio = "";
     var ds = EjecutarConsulta("dbo.ObtenerCuentaDeMayorXCodigo", new List<SqlParameter>(){
             new SqlParameter("CodigoSN", CodigoSN)
     });
     if (ds != null && ds.Tables != null && ds.Tables[0] != null && ds.Tables[0].Rows != null)
     {
         foreach (DataRow row in ds.Tables[0].Rows)
         {
             var socio = new SocNegocio();
             socio.CuentaAsociada = row["CC"].ToString();
             Cuenta_Socio = socio.CuentaAsociada;
         }
     }
     return Cuenta_Socio;
 }