public string GuardarDocumentos() { HttpFileCollection httpFileCollection = Context.Request.Files; System.Collections.Specialized.NameValueCollection DescuentosID = Context.Request.Form; int Grupoid = int.Parse(DescuentosID["GrupoId"]); DTOGrupo objGrupo = BLLGrupo.ObtenerGrupo(Grupoid); List <DTOGrupoComprobante> lstDoc = new List <DTOGrupoComprobante>(); try { string JustificacionBeca = DescuentosID["JustificacionBe"]; HttpPostedFile httpColegiatura = httpFileCollection["DocBeca"]; Stream strCole = httpColegiatura.InputStream; lstDoc.Add(new DTOGrupoComprobante { GrupoId = Grupoid, //Justificacion = JustificacionBeca, //PagoConceptoId = objGrupo.GrupoDetalle.Cuota.PagoConceptoId, GrupoComprobanteDocumento = new DTOGrupoComprobanteDocumento { Documento = Herramientas.ConvertidorT.ConvertirStream(strCole, httpColegiatura.ContentLength) } }); } catch { } try { string JustificacionInsc = DescuentosID["JustificacionIn"]; HttpPostedFile httpInscripcion = httpFileCollection["DocBeca"]; Stream strInscrip = httpInscripcion.InputStream; lstDoc.Add(new DTOGrupoComprobante { GrupoId = Grupoid, //Justificacion = JustificacionInsc, //PagoConceptoId = objGrupo.GrupoDetalle.Cuota.PagoConceptoId, GrupoComprobanteDocumento = new DTOGrupoComprobanteDocumento { Documento = Herramientas.ConvertidorT.ConvertirStream(strInscrip, httpInscripcion.ContentLength) } }); } catch { } if (lstDoc.Count > 0) { BLLGrupoComprobante.GuardarComprobante(lstDoc); return("1"); } else { return("0"); } }