示例#1
0
        [TestMethod] //Listar
        public void ListarProformas()
        {
            List <ProformaWS.Proforma> listaproformas = new List <ProformaWS.Proforma>();

            try
            {
                listaproformas = proxy.Listar().ToList();
                Assert.IsTrue(listaproformas.Count > 0);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(ex.Message, "");
            }
        }
示例#2
0
        public ActionResult Create(ProformaWS.Proforma proforma)
        {
            try
            {
                ProformaWS.ProformaServiceClient proxy = new ProformaWS.ProformaServiceClient();
                proxy.Agregar(proforma);

                ViewBag.message = "Creado";

                return(View("Index", proxy.Listar().ToList()));
            }
            catch
            {
                return(View());
            }
        }
示例#3
0
        //
        // GET: /Proforma/

        public ActionResult Index()
        {
            ProformaWS.ProformaServiceClient proxy = new ProformaWS.ProformaServiceClient();
            return(View(proxy.Listar().ToList()));
        }