public void EliminarTest() { bool paso = false; paso = TipoCitasBLL.Eliminar(1); Assert.AreEqual(paso, true); }
public void ExisteTest() { bool paso = false; paso = TipoCitasBLL.Existe(1); Assert.AreEqual(paso, true); }
public void GetListTest() { bool paso = false; List <TipoCitas> lista = TipoCitasBLL.GetList(tp => true); if (lista != null) { paso = true; } Assert.AreEqual(paso, true); }
public void ModificarTest() { TipoCitas tipoCitas = new TipoCitas(); bool paso = false; tipoCitas.TipoCitaId = 1; tipoCitas.Nombre = "Agendada"; tipoCitas.Descripcion = "Esta es una breve descripcion"; paso = TipoCitasBLL.Modificar(tipoCitas); Assert.AreEqual(paso, true); }
public void InsertarTest() { TipoCitas tipoCitas = new TipoCitas(); bool paso = false; tipoCitas.TipoCitaId = 0; tipoCitas.Nombre = "Urgente"; tipoCitas.Descripcion = "Esta es una breve descripcion"; paso = TipoCitasBLL.Insertar(tipoCitas); Assert.AreEqual(paso, true); }
public void BuscarTest() { bool paso = false; TipoCitas tipoCitas; tipoCitas = TipoCitasBLL.Buscar(1); if (tipoCitas != null) { paso = true; } Assert.AreEqual(paso, true); }
private void ReportBody() { fontStyle = FontFactory.GetFont("Calibri", 9f, 1); var _fontStyle = FontFactory.GetFont("Calibri", 9f, 0); #region Table Header pdfCell = new PdfPCell(new Phrase("ID", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase("ID TipoCita", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase("ID Paciente", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase("Estado", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase("Observacion", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase("Fecha", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.LightGray; pdfTable.AddCell(pdfCell); pdfTable.CompleteRow(); #endregion #region Table Body int num = 0; foreach (var item in listaCitas) { num++; pdfCell = new PdfPCell(new Phrase(item.CitaId.ToString(), _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); var TipoCitas = TipoCitasBLL.Buscar(item.TipoCitaId).Nombre; pdfCell = new PdfPCell(new Phrase(TipoCitas, _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); var Paciente = PacientesBLL.Buscar(item.PacienteId).Nombres; pdfCell = new PdfPCell(new Phrase(item.PacienteId.ToString(), _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(item.Estado.ToString(), _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(item.Observacion, _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(item.Fecha.ToString("dd/MM/yyyy"), _fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfTable.AddCell(pdfCell); pdfTable.CompleteRow(); } pdfCell = new PdfPCell(new Phrase(num++.ToString(), fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfCell.Border = 0; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(" ", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfCell.Border = 0; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(" ", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfCell.Border = 0; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(" ", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfCell.Border = 0; pdfTable.AddCell(pdfCell); pdfCell = new PdfPCell(new Phrase(" ", fontStyle)); pdfCell.HorizontalAlignment = Element.ALIGN_CENTER; pdfCell.VerticalAlignment = Element.ALIGN_MIDDLE; pdfCell.BackgroundColor = BaseColor.White; pdfCell.Border = 0; pdfTable.AddCell(pdfCell); pdfTable.CompleteRow(); #endregion }