public void BuscarTest()
        {
            int idcotizaciones = CotizacionesBLL.GetList(x => true)[0].CotizacionId;

            Cotizaciones cotizaciones = CotizacionesBLL.Buscar(idcotizaciones);
            bool         paso         = cotizaciones.Detalle.Count > 0;

            Assert.AreEqual(true, paso);
        }
        public void ModificarTest()
        {
            int          idcotizaciones = CotizacionesBLL.GetList(x => true)[0].CotizacionId;
            Cotizaciones cotizaciones   = CotizacionesBLL.Buscar(idcotizaciones);

            //agregtar otro
            cotizaciones.Detalle.Add(new DetalleCotizaciones(0, cotizaciones.CotizacionId, 2, 4, 50f, 2f, 100f));
            bool paso = CotizacionesBLL.Modificar(cotizaciones);

            Assert.AreEqual(true, paso);
        }
        private void BuscarCotizacionButton_Click(object sender, EventArgs e)
        {
            Co = CotizacionesBLL.Buscar((int)CotIdNumericUpDown.Value);

            if (Co == null)
            {
                MessageBox.Show("La cotizacion no existe.");
            }
            else
            {
                MessageBox.Show("Se encontro la cotizacion.");
            }
        }
Пример #4
0
        public JsonResult Buscar(int id)
        {
            Cotizaciones cotizacion = CotizacionesBLL.Buscar(id);

            if (cotizacion != null)
            {
                return(Json(cotizacion));
            }
            else
            {
                return(Json(0));
            }
        }
Пример #5
0
        private void BtnBuscar_Click(object sender, EventArgs e)
        {
            int          id         = Convert.ToInt32(CotizacionIdnumericUpDown.Value);
            Cotizaciones Cotizacion = CotizacionesBLL.Buscar(id);

            if (Cotizacion != null)
            {
                LlenarCampos(Cotizacion);
            }
            else
            {
                MessageBox.Show("No se encontro!", "Fallo",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #6
0
        private void BuscarBtn(object sender, RoutedEventArgs e)
        {
            Cotizaciones anterior = CotizacionesBLL.Buscar(int.Parse(cotizacionIdTextBox.Text));

            if (anterior != null)
            {
                cotizaciones = anterior;
                this.cotizacionesDetalles = anterior.CotizacionesDetalles;
                Actualizar();
                Lista();
                Calcular();
            }
            else
            {
                MessageBox.Show("No encontrado");
            }
        }
Пример #7
0
        private bool Existe()
        {
            Cotizaciones cotizaciones = CotizacionesBLL.Buscar(Convert.ToInt32(cotizacionIdTextBox.Text));

            return(cotizaciones != null);
        }