public JsonResult FinalizarChamado(int idChamado) { var bllChamado = new ChamadoBLL(); var resultChamadoFinalizado = bllChamado.FinalizarChamado(idChamado); return(Json(new { Sucess = resultChamadoFinalizado }, JsonRequestBehavior.AllowGet)); }
public frmEncerrar(string usuario, Chamado ticket) { InitializeComponent(); chamado = ticket; txtMatricula.Text = usuario; ChamadoBLL = new ChamadoBLL(); }
public Chamados(string usuario) { InitializeComponent(); FuncionarioBLL = new FuncionarioBLL(); ChamadoBLL = new ChamadoBLL(); lblUsuario.Text = usuario; FillCombobox(); }
public ActionResult CriarChamado(Chamado chamado) { var idColaborador = ((Colaborador)Session["UsuarioAutenticado"]).IdColaborador; var bllChamado = new ChamadoBLL(); bllChamado.CriarChamado(idColaborador, chamado); TempData["Mensagem"] = "Chamado criado!"; return(RedirectToAction("Index")); }
public HttpResponseMessage GerarPdf() { byte[] buffer = new ChamadoBLL().GerarPdf(); HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK); response.Content = new ByteArrayContent(buffer); response.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "RelatorioChamado.pdf"; response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf"); response.Content.Headers.ContentLength = buffer.Length; response.Headers.AcceptRanges.Add("bytes"); return(response); }
private void btnVerChamado2_Click(object sender, EventArgs e) { BuscarChamado = new ChamadoBLL(); CarregaUltimosChamadosAbertos(); dtoChamado = tp.CarregaUltimoChamado(Convert.ToInt32(lblnumProtocolo2.Text)); if (lblnumProtocolo2.Text == "0") { MessageBox.Show("Não existem chamados antigos relacionados", "Aviso!"); } else { ValidaUltimosChamados(); } }
public JsonResult ExcluirChamado(int idChamado) { try { var bllChamado = new ChamadoBLL(); var resultExclusao = bllChamado.ExcluirChamado(idChamado); return(Json(new { Result = resultExclusao }, JsonRequestBehavior.AllowGet)); } catch (Exception e) { return(Json(new { Result = e.Message }, JsonRequestBehavior.AllowGet)); } }
public ActionResult AlterChamado(Chamado chamado, string titulo) { try { var bllChamado = new ChamadoBLL(); bllChamado.AlterarChamado(chamado); return(RedirectToAction("Index", new { IdChamado = chamado.IdChamado, Titulo = titulo })); } catch (SqlTypeException e) { ViewBag.Error = e.Message; return(View(chamado)); } }
public ActionResult AlterChamado(int idChamado, string titulo) { if (Session["UsuarioAutenticado"] == null) { return(RedirectToAction("ValidarLogin", "Colaborador")); } try { var bllChamado = new ChamadoBLL(); var chamado = bllChamado.ConsultarChamado(idChamado); return(View(chamado)); } catch (SqlTypeException e) { ViewBag.Error = e.Message; return(RedirectToAction("Index")); } }