Exemplo n.º 1
0
        public ActionResult Crear()
        {
            cierreBLL         = new CierreBLLImp();
            productoCierreBLL = new CierreProductoBLLImp();
            string idMedidasString = fb.ConsecutivoModifica("CIR");
            Cierre cierre          = new Cierre()
            {
                idCierre        = idMedidasString,
                fecha           = DateTime.Now,
                usuario         = Session["usuario"].ToString(),
                idNombreEmpresa = Session["empresa"].ToString()
            };
            bool a = cierreBLL.Agregar(cierre);
            bool b = productoCierreBLL.Crear(Session["empresa"].ToString(), idMedidasString);

            return(Json(new { result = a, result2 = b }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public ActionResult Tabla2(string id)
        {
            productoCierreBLL = new CierreProductoBLLImp();
            productoBLL       = new ProductoBLLImp();
            List <CierreProducto> resultado = productoCierreBLL.BuscarCierre(id);
            String htmlCode = String.Empty;

            foreach (CierreProducto per in resultado)
            {
                Producto pro = productoBLL.BuscarPorId(per.idProducto);
                htmlCode += "<tr>" +
                            "<td>" + per.idCierreProducto + "</td>" +
                            "<td>" + per.idProducto + "</td>" +
                            "<td>" + pro.nombre + "</td>" +
                            "<td>" + per.cantidadCierre + "</td>" +
                            "<tr>";
            }
            return(Json(new { result = htmlCode }, JsonRequestBehavior.AllowGet));
        }