/// <summary> /// Carregar a tela de alteração de senha /// </summary> /// <returns>view de alteração</returns> //[AcceptVerbs(HttpVerbs.Get)] //public ActionResult MudarSenha() //{ // this.InicializaView(); // if (this.Logado != ((char)Enums.Logado.Sim).ToString()) // { // return this.RedirectToAction("Login", "Login"); // } // return this.View("MudarSenha", this.mudarSenhaViewModel); //} public int listaTramites() { if (this.TramitesNotificao.Count > 0) { return(1); } else { var n0203TRABusiness = new N0203TRABusiness(); var listaTram = n0203TRABusiness.PesquisaTramitesUsuario(Convert.ToInt64(this.CodigoUsuarioLogado)); if (listaTram.Count > 0) { ListaN0203TRAPesquisaa = new List <ListaN0203TRAPesquisa>(); foreach (var item in listaTram) { ListaN0203TRAPesquisaa.Add((ListaN0203TRAPesquisa)item); } } } this.TramitesNotificao = ListaN0203TRAPesquisaa; return(2); }
public JsonResult ImprimirRelatorioTransacao(long NumReg) { try { List <RelatorioTransacoes> listaRelatorio = new List <RelatorioTransacoes>(); N0203TRABusiness N0203TRABusiness = new N0203TRABusiness(); string msgRetorno = "Nenhum Registro Encontrado."; listaRelatorio = N0203TRABusiness.RelatorioTransacao(NumReg); if (listaRelatorio.Count == 0) { return(this.Json(new { msg = msgRetorno }, JsonRequestBehavior.AllowGet)); } else { listaRelatorio[0].nomeUsuario = this.NomeUsuarioLogado; } LocalReport report = new LocalReport(); report.ReportPath = Server.MapPath("~/Reports/RelatorioTransacao.rdlc"); var reportRelatorio = new ReportDataSource("Corpo", listaRelatorio); report.Refresh(); report.DataSources.Add(reportRelatorio); string reportType = "PDF"; string mineType; byte[] reportBytes; string encoding; string fileNameExtension; Warning[] warnings; string[] streams; string deviceInfo = "<DeviceInfo>" + " <OutputFormat>PDF</OutputFormat>" + " <PageWidth>in</PageWidth>" + " <PageHeight>in</PageHeight>" + " <MarginTop>in</MarginTop>" + " <MarginLeft>in</MarginLeft>" + " <MarginRight>in</MarginRight>" + " <MarginBottom>in</MarginBottom>" + "</DeviceInfo>"; reportBytes = report.Render( reportType, deviceInfo, out mineType, out encoding, out fileNameExtension, out streams, out warnings); var base64EncodedPDF = System.Convert.ToBase64String(reportBytes); return(this.Json("data:application/pdf;base64, " + base64EncodedPDF, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { this.Session["ExceptionErro"] = ex; return(this.Json(new { redirectUrl = Url.Action("ErroException", "Erro"), ErroExcecao = true }, JsonRequestBehavior.AllowGet)); } }