예제 #1
0
        public void EliminarTest()
        {
            bool paso = false;

            paso = TiposProcedimientosBLL.Eliminar(1);
            Assert.AreEqual(paso, true);
        }
예제 #2
0
        public void ExisteTest()
        {
            bool paso = false;

            paso = TiposProcedimientosBLL.Existe(1);
            Assert.AreEqual(paso, true);
        }
예제 #3
0
        public void GetListTest()
        {
            bool paso = false;

            List <TiposProcedimientos> lista = TiposProcedimientosBLL.GetList(p => true);

            if (lista != null)
            {
                paso = true;
            }

            Assert.AreEqual(paso, true);
        }
예제 #4
0
        public void ModificarTest()
        {
            TiposProcedimientos tipoProcedimiento = new TiposProcedimientos();
            bool paso = false;

            tipoProcedimiento.TipoProcedimientoId = 1;
            tipoProcedimiento.NombreProcedimiento = "Endodoncia";
            tipoProcedimiento.Descripcion         = "El procedimiento consiste en extraer la parte de la pulpa dental completamente";
            tipoProcedimiento.Precio = 2500;

            paso = TiposProcedimientosBLL.Modificar(tipoProcedimiento);
            Assert.AreEqual(paso, true);
        }
예제 #5
0
        public void InsertarTest()
        {
            TiposProcedimientos tipoProcedimiento = new TiposProcedimientos();
            bool paso = false;

            tipoProcedimiento.TipoProcedimientoId = 0;
            tipoProcedimiento.NombreProcedimiento = "Endodoncia";
            tipoProcedimiento.Descripcion         = "Consiste en la extirpación de la pulpa dental y el posterior relleno y sellado de la cavidad pulpar con un material inerte.";
            tipoProcedimiento.Precio = 2500;

            paso = TiposProcedimientosBLL.Insertar(tipoProcedimiento);
            Assert.AreEqual(paso, true);
        }
예제 #6
0
        public void GuardarTest()
        {
            TiposProcedimientos tipoProcedimiento = new TiposProcedimientos();
            bool paso = false;

            tipoProcedimiento.TipoProcedimientoId = 0;
            tipoProcedimiento.NombreProcedimiento = "Limpieza";
            tipoProcedimiento.Descripcion         = "Se realiza un procedimiento de limpieza";
            tipoProcedimiento.Precio = 500;

            paso = TiposProcedimientosBLL.Guardar(tipoProcedimiento);
            Assert.AreEqual(paso, true);
        }
예제 #7
0
        public void BuscarTest()
        {
            bool paso = false;
            TiposProcedimientos tipoProcedimiento;

            tipoProcedimiento = TiposProcedimientosBLL.Buscar(2);

            if (tipoProcedimiento != null)
            {
                paso = true;
            }

            Assert.AreEqual(paso, true);
        }
예제 #8
0
        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("Paciente", fontStyle));
            pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            pdfCell.BackgroundColor     = BaseColor.LightGray;
            pdfTable.AddCell(pdfCell);

            pdfCell = new PdfPCell(new Phrase("Tipo de Procedimiento", 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("Cobrado", fontStyle));
            pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            pdfCell.BackgroundColor     = BaseColor.LightGray;
            pdfTable.AddCell(pdfCell);

            pdfCell = new PdfPCell(new Phrase("Monto", 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 listaProcedimientos)
            {
                num++;
                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(Paciente(item.PacienteId), _fontStyle));
                pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                pdfCell.BackgroundColor     = BaseColor.White;
                pdfTable.AddCell(pdfCell);

                var TipoProcedimiento = TiposProcedimientosBLL.Buscar(item.TipoProcedimientoId);
                pdfCell = new PdfPCell(new Phrase(TipoProcedimiento.NombreProcedimiento, _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, _fontStyle));
                pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                pdfCell.BackgroundColor     = BaseColor.White;
                pdfTable.AddCell(pdfCell);

                pdfCell = new PdfPCell(new Phrase(item.EsCobrado.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.Monto.ToString("N2"), _fontStyle));
                pdfCell.HorizontalAlignment = Element.ALIGN_RIGHT;
                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);

            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
        }