Exemple #1
0
        public ActionResult RequestDetails(int id = 0 /*id de la lista de pedidos*/, int error = 0)
        {
            int area = stock.GetUserData(int.Parse(Session["IdUser"].ToString())).Id_Area.Value;

            ViewBag.ID        = id;                        //Id de la lista
            ViewBag.Papeleria = stock.GetPapeleria();
            ViewBag.Lista     = stock.GetListaPedidos(id); //InvSolicitud
            ViewBag.Error     = 0;
            ViewBag.ErrorMsg  = string.Empty;
            ViewBag.ListInfo  = stock.GetListaPedido(id);

            ViewBag.Permission = false;

            if (area == 1 || area == 1007)
            {
                ViewBag.Permission = true;
            }

            switch (error)
            {
            case 1:
                ViewBag.Error    = 1;
                ViewBag.ErrorMsg = "Verifica que no haya campos obligatorios incompletos o incorrectos";
                break;
            }

            return(View(stock.GetRawPedido(/*id*/)));
        }