示例#1
0
        //DETALLES DEL ENVIO
        public ActionResult DetallesEnvio(string id)
        {
            string name    = TempData["username"].ToString();
            string nameRol = TempData["rol"].ToString();
            int    codUser = Int32.Parse(TempData["codUser"].ToString());

            ViewBag.name         = name;
            ViewBag.rol          = nameRol;
            TempData["username"] = name;
            TempData["rol"]      = nameRol;
            TempData["codUser"]  = codUser;
            int cod = Int32.Parse(id);

            DAOUsuario dataU  = DAOUsuario.getInstance();
            string     today  = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss tt");
            string     accion = "Detalles del envio " + id;

            dataU.insertarAccion(codUser, 2, today, accion);

            DAOEnvio     data     = DAOEnvio.getInstance();
            Envio        detalles = data.detallesEnvio(cod);
            List <Envio> envios   = new List <Envio>();

            envios.Add(detalles);
            return(View(envios));
        }
示例#2
0
        public ActionResult RegresoDetallesEnvio(Envio m)
        {
            string name    = TempData["username"].ToString();
            string nameRol = TempData["rol"].ToString();
            int    codUser = Int32.Parse(TempData["codUser"].ToString());

            ViewBag.name         = name;
            ViewBag.rol          = nameRol;
            TempData["username"] = name;
            TempData["rol"]      = nameRol;
            TempData["codUser"]  = codUser;

            //int cod = Int32.Parse(m.cod);
            DAOEnvio     data     = DAOEnvio.getInstance();
            Envio        detalles = data.detallesEnvio(m.cod);
            List <Envio> envios   = new List <Envio>();

            envios.Add(detalles);
            return(View("~/Views/EnviarPaquete/DetallesEnvio.cshtml", envios));
        }