コード例 #1
0
        public Pagos CrearNurc(int creado)
        {
            Pagos           nurc   = new Pagos();
            ObjectParameter IdPago = new ObjectParameter("Id_Pago", typeof(Int32));
            ObjectParameter VV     = new ObjectParameter("VValor_Mensaje", typeof(Int32));
            ObjectParameter VM     = new ObjectParameter("VMensaje", typeof(String));

            try
            {
                using (ClusmextContext context = new ClusmextContext()) {
                    context.spInsPago(creado, IdPago, VV, VM);
                    if (VV.Value.ToString() == "0")
                    {
                        int id = int.Parse(IdPago.Value.ToString());
                        nurc = context.Pagos.Where(x => x.Id_Pago == id).SingleOrDefault();
                    }
                    else
                    {
                    }
                }
            }
            catch (Exception ex) {
            }
            return(nurc);
        }