public int spInsDocumento_Pago(string FileName, int IdUser, int IdPago, int IdTipoDocto, out string NombreV) { int val = 0; NombreV = string.Empty; ObjectParameter NV = new ObjectParameter("Nombre_Virtual", typeof(String)); ObjectParameter IDD = new ObjectParameter("Id_Documento", typeof(Int32)); ObjectParameter VV = new ObjectParameter("VValor_Mensaje", typeof(Int32)); ObjectParameter VM = new ObjectParameter("VMensaje", typeof(String)); try { using (ClusmextContext context = new ClusmextContext()) { context.spInsDocumento_Pago(FileName, 1, IdUser, IdPago, IdTipoDocto, NV, IDD, VV, VM); if (VV.Value.ToString() == "0") { NombreV = NV.Value.ToString(); val = 1; } } } catch (Exception ex) { } return(val); }
public bool GuardarDocumento(int IdPago, string Nombre, int IdTipoDocto, int Creado) { bool val = false; ObjectParameter NV = new ObjectParameter("Nombre_Virtual", typeof(String)); ObjectParameter IdDcoto = new ObjectParameter("Id_Documento", typeof(Int32)); ObjectParameter VV = new ObjectParameter("VValor_Mensaje", typeof(Int32)); ObjectParameter VM = new ObjectParameter("VMensaje", typeof(String)); try { using (ClusmextContext context = new ClusmextContext()) { context.spInsDocumento_Pago(Nombre, 1, Creado, IdPago, IdTipoDocto, NV, IdDcoto, VV, VM); val = bool.Parse(VV.Value.ToString()); } } catch (Exception ex) { } return(val); }