コード例 #1
0
        public ActionResult RegistroBeneficiario()
        {
            if (Session["CURP"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            string dato1 = Server.MapPath(@"~\Content\miarchivo.xlsx");
            string dato2 = Server.MapPath(@"~\Content\miarchivo2.xlsx");
            string CCT   = Session["pertenece"].ToString();

            List <Alumno> lista = new List <Alumno>();

            try
            {
                lista = objInstitucion.consultaErroresBenef(CCT);
            }
            catch (Exception ex) { Console.WriteLine(ex.Message); }

            InstitucionTransacciones objInstTransac = new InstitucionTransacciones();

            objInstTransac.eliminaErroresBeneficiario(CCT);

            objExcel.cargaarexcel(dato1, lista);
            objExcel.cargaFormatoPlanteles(dato2);

            return(View(lista));
        }
コード例 #2
0
        public ActionResult tabletaMP(string id)
        {
            if (string.IsNullOrEmpty((string)Session["CURP"]))
            {
                return(RedirectToAction("Index", "Home"));
            }
            string dato1 = Server.MapPath(@"~\Content\Tabletas_Errores.xlsx");
            string dato2 = Server.MapPath(@"~\Content\Tabletas_Formato.xlsx");

            ViewBag.Operacion = id;
            string pRFC = (string)Session["pertenece"];//aqui va el rfc del provedor que desea llamar

            Excel objExcel = new Excel();
            //a.cargaarexcelTabletaMPError(dato1, objProveedor.consultaErrores(pRFC));
            //a.cargaFormatoTabletaMP(dato2);
            //return View(objProveedor.consultaErrores(pRFC));

            List <Tableta> listatablet = new List <Tableta>();

            listatablet = objProveedor.consultaErrores(pRFC);
            InstitucionTransacciones objInstTransac = new InstitucionTransacciones();

            objProveedor.eliminaErroresTabletas(pRFC);

            objExcel.cargaarexcelTabletaMPError(dato1, listatablet);
            objExcel.cargaFormatoTabletaMP(dato2);

            return(View(listatablet));
        }