public void EliminarTest()
        {
            bool paso = false;

            paso = VentaBLL.Eliminar(1);
            Assert.AreEqual(true, paso);
        }
Beispiel #2
0
        public void EliminarTest()
        {
            bool paso;

            paso = VentaBLL.Eliminar(1);
            Assert.AreEqual(paso, true);
        }
Beispiel #3
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            MyErrorProvider.Clear();
            int id;

            int.TryParse(IDnumericUpDown.Text, out id);

            Limpiar();

            if (VentaBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado");
            }
            else
            {
                MyErrorProvider.SetError(IDnumericUpDown, "No existe.");
            }
        }
        protected void EliminarButton_Click(object sender, EventArgs e)
        {
            if (Utilitarios.Utils.ToInt(VentaIdTextBox.Text) > 0)
            {
                int id = Convert.ToInt32(VentaIdTextBox.Text);

                if (VentaBLL.Eliminar(id))
                {
                    Utilitarios.Utils.ShowToastr(this.Page, "Eliminado con exito!!", "Eliminado", "info");
                }
                else
                {
                    Utilitarios.Utils.ShowToastr(this.Page, "Fallo al Eliminar :(", "Error", "error");
                }
                Limpiar();
            }
            else
            {
                Utilitarios.Utils.ShowToastr(this.Page, "No se pudo eliminar, Venta existe", "error", "error");
            }
        }
Beispiel #5
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            RepositorioBase <Ventas> db = new RepositorioBase <Ventas>();

            try
            {
                if (VentaIdnumericUpDown.Value > 0)
                {
                    if (VentaBLL.Eliminar(Convert.ToInt32(VentaIdnumericUpDown.Value)))
                    {
                        MessageBox.Show("Eliminado", "Atencion!!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Limpiar();
                    }
                    else
                    {
                        MessageBox.Show("No se puede eliminar", "Atencion!!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
            catch (Exception)
            {
                MessageBox.Show("No se pudo eliminar", "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }