private void Limpiar()
 {
     IdnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     CreditosTextBox.Clear();
     MyErrorProvider.Clear();
 }
Esempio n. 2
0
 private void Clear()
 {
     IdnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     SiglastextBox.Clear();
     TipocomboBox.Text = string.Empty;
 }
Esempio n. 3
0
        private bool Validar()
        {
            bool paso = true;

            MyErrorProvider.Clear();

            try
            {
                if (TiposAnalisisBLL.Duplicado(DescripciontextBox.Text))
                {
                    paso = false;
                    MyErrorProvider.SetError(DescripciontextBox, "La descripcion ya esta registrada");
                }
            }
            catch (Exception)
            {
                throw;
            }

            if (DescripciontextBox.Text == string.Empty)
            {
                MyErrorProvider.SetError(DescripciontextBox, "El campo Descripcion no puede estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }

            return(paso);
        }
        public bool Validar()
        {
            bool paso = true;

            ErrorProvider.Clear();
            if (string.IsNullOrWhiteSpace(DescripciontextBox.Text))
            {
                ErrorProvider.SetError(DescripciontextBox, "No puede guardar espacios en blanco");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (DescripciontextBox.Text == string.Empty)
            {
                ErrorProvider.SetError(DescripciontextBox, "El campo descroipcion no puede esta vacio");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (CreditonumericUpDown.Value < 0)
            {
                ErrorProvider.SetError(CreditonumericUpDown, "No puede existir credito menor que 0");
                CreditonumericUpDown.Focus();
                paso = false;
            }
            return(paso);
        }
Esempio n. 5
0
        private bool Validar()
        {
            bool paso = true;

            MyErrorProvider.Clear();

            if (DescripciontextBox.Text == string.Empty)
            {
                MyErrorProvider.SetError(DescripciontextBox, "El campo Descripcion no puede estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }

            if (CreditosnumericUpDown.Value == 0)
            {
                MyErrorProvider.SetError(CreditosnumericUpDown, "El campo Creditos no puede ser 0");
                CreditosnumericUpDown.Focus();
                paso = false;
            }
            if (NoDuplicado(DescripciontextBox.Text))
            {
                MyErrorProvider.SetError(DescripciontextBox, "No se permite tener materias con el mismo nombre");
                paso = false;
            }


            return(paso);
        }
Esempio n. 6
0
        /// <summary>
        /// El Botton Eliminar la cual llama la funcion Validar para ver si el ID esta vacio o contiene un numero
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("El TipoID esta vacio", "Llene Campo",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                int id = Convert.ToInt32(ArticuloIDnumericUpDown.Value);

                if (BLL.ArticulosBLL.Eliminar(id))
                {
                    MessageBox.Show("Eliminado", "Bien hecho", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    ArticuloIDnumericUpDown.Value        = 0;
                    FechaVencimientodateTimePicker.Value = DateTime.Now;
                    DescripciontextBox.Clear();
                    PreciotextBox.Clear();
                    ExistencianumericUpDown.Value       = 0;
                    CantidadCotizadanumericUpDown.Value = 0;
                    errorProvider.Clear();
                }
                else
                {
                    MessageBox.Show("No se puede Eliminar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Esempio n. 7
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("El TipoID esta vacio", "Llene Campo",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                int id = Convert.ToInt32(LibroIDnumericUpDown.Value);

                if (BLL.LibrosBLL.Eliminar(id))
                {
                    MessageBox.Show("Eliminado", "Bien hecho", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    LibroIDnumericUpDown.Value = 0;
                    DescripciontextBox.Clear();
                    FechadateTimePicker.Value = DateTime.Now;
                    SiglastextBox.Clear();
                    TipotextBox.Clear();
                    ValidarerrorProvider.Clear();
                }
                else
                {
                    MessageBox.Show("No se puede Eliminar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Esempio n. 8
0
        private bool Validar()
        {
            bool paso = true;

            if (string.IsNullOrWhiteSpace(DescripciontextBox.Text))
            {
                ErrorProvider.SetError(DescripciontextBox, "Este campo no puede estar vacío");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (ProyectosBLL.ExisteProyecto(DescripciontextBox.Text, (int)IdnumericUpDown.Value))
            {
                ErrorProvider.SetError(DescripciontextBox, "Este Proyecto ya existe");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(TareacomboBox.Text))
            {
                ErrorProvider.SetError(TareacomboBox, "Debe seleccionar una Tarea");
                TareacomboBox.Focus();
                paso = false;
            }
            if (this.Detalle.Count == 0)
            {
                ErrorProvider.SetError(DetallesdataGridView, "Debe agregar una Tarea");
                DetallesdataGridView.Focus();
                paso = false;
            }

            return(paso);
        }
Esempio n. 9
0
 private void NuevoButton_Click(object sender, EventArgs e)
 {
     IDLibronumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     SiglastextBox.Clear();
     IDTiponumericUpDown.Value = 0;
 }
        private bool Validar()
        {
            bool paso = true;
            errorProvider1.Clear();

            if (DescripciontextBox.Text == string.Empty)
            {
                errorProvider1.SetError(DescripciontextBox, "El campo Descripcion no puede estar vacío");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (RolesBLL.ExisteDescripcion(DescripciontextBox.Text, (int)idnumericUpDown.Value))
            {
                errorProvider1.SetError(DescripciontextBox, "Este Rol ya existe");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (PermisocomboBox.Text == string.Empty)
            {
                errorProvider1.SetError(PermisocomboBox, "Debe seleccionar un Id");
                PermisocomboBox.Focus();
                paso = false;
            }
            if (this.Detalles.Count == 0)
            {
                errorProvider1.SetError(DetalledataGridView, "Debe agregar un Permiso");
                PermisocomboBox.Focus();
                paso = false;
            }

            return paso;
        }
Esempio n. 11
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("Ingrese un ID");
                return;
            }

            int id = Convert.ToInt32(ArticuloIDnumericUpDown.Value);

            if (BLL.ArticulosBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ArticuloIDnumericUpDown.Value = 0;
                DescripciontextBox.Clear();
                CostonumericUpDown.Value    = 0;
                PrecionumericUpDown.Value   = 0;
                GanancianumericUpDown.Value = 0;
                InventariotextBox.Clear();
                errorProvider.Clear();
            }

            else
            {
                MessageBox.Show("No se pudo eliminar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 12
0
        private bool Validar()
        {
            bool paso = true;

            if (DescripciontextBox.Text == string.Empty)
            {
                ErrorProvider.SetError(DescripciontextBox, "Este Campo no puede estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (RolesBLL.ExisteDescripcion(DescripciontextBox.Text, (int)IdnumericUpDown.Value))
            {
                ErrorProvider.SetError(DescripciontextBox, "Esta Descripcion ya existe");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (PermisocomboBox.Text == string.Empty)
            {
                ErrorProvider.SetError(PermisocomboBox, "Debe seleccionar un Permiso Id");
                PermisocomboBox.Focus();
                paso = false;
            }
            if (this.Detalle.Count == 0)
            {
                ErrorProvider.SetError(DetallesdataGridView, "Debe agregar un Permiso");
                DetallesdataGridView.Focus();
                paso = false;
            }

            return(paso);
        }
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     IdnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     PrecionumericUpDown.Value  = 0;
     CantCotnumericUpDown.Value = 0;
 }
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     VehiculoIDnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     TotalMantenimientotextBox.Clear();
     MyerrorProvider.Clear();
 }
Esempio n. 15
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     ArticuloIdnumericUpDown.Value = 0;
     PrecionumericUpDown.Value     = 0;
     DescripciontextBox.Clear();
     CantidadCotizzadanumericUpDown.Value = 0;
 }
Esempio n. 16
0
        private bool Validar()
        {
            bool paso = true;

            if (DescripciontextBox.Text == string.Empty)
            {
                ErroreserrorProvider.SetError(DescripciontextBox, "Este campo no puede quedar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }

            if (RolesBLL.ExisteDescripcion(DescripciontextBox.Text))
            {
                ErroreserrorProvider.SetError(DescripciontextBox, "Esta descripcion ya existe en la base de datos");
                DescripciontextBox.Focus();
                paso = false;
            }

            if (PermisoscomboBox.Text == string.Empty)
            {
                ErroreserrorProvider.SetError(PermisoscomboBox, "Debe seleccion un Id");
                PermisoscomboBox.Focus();
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                ErroreserrorProvider.SetError(DetalledataGridView, "Es necesario agregar un permis");
                DetalledataGridView.Focus();
                paso = false;
            }

            return(paso);
        }
Esempio n. 17
0
        private bool ValidarGuardar()
        {
            bool paso = true;

            errorProvider.Clear();

            if (DescripciontextBox.Text == string.Empty)
            {
                errorProvider.SetError(DescripciontextBox, "El Campo no puede estar vacio.");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (CostotextBox.Text == string.Empty)
            {
                errorProvider.SetError(CostotextBox, "El Campo no puede estar vacio.");
                CostotextBox.Focus();
                paso = false;
            }
            if (ExistenciatextBox.Text == string.Empty)
            {
                errorProvider.SetError(ExistenciatextBox, "El Campo no puede estar vacio.");
                ExistenciatextBox.Focus();
                paso = false;
            }

            return(paso);
        }
 private void Limpiar()
 {
     IdtextBox.Clear();
     DescripciontextBox.Clear();
     NoradioButton.Checked = false;
     SiradioButton.Checked = false;
 }
        private bool Validar()
        {
            bool paso = true;

            errorProvider1.Clear();

            if (DescripciontextBox.Text == String.Empty)
            {
                errorProvider1.SetError(DescripciontextBox, "El campo Nombre no puede estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (CostotextBox.Text == String.Empty)
            {
                errorProvider1.SetError(CostotextBox, "El campo Costo no puede estar vacio");
                CostotextBox.Focus();
                paso = false;
            }
            if (PreciotextBox.Text == String.Empty)
            {
                errorProvider1.SetError(PreciotextBox, "El campo Precio no puede estar vacio");
                PreciotextBox.Focus();
                paso = false;
            }
            if (FechadateTimePicker.Value > DateTime.Now)
            {
                errorProvider1.SetError(FechadateTimePicker, "La fecha no puede ser Mayor que la de hoy");
                paso = false;
            }
            return(paso);
        }
Esempio n. 20
0
 private void Limpiar()
 {
     IdnumericUpDown.Value = 0;
     MontotextBox.Clear();
     DescripciontextBox.Clear();
     TipocomboBox.SelectedText = string.Empty;
 }
Esempio n. 21
0
        private bool Validar()
        {
            bool paso = true;

            MyErrorProvider.Clear();

            if (String.IsNullOrWhiteSpace(DescripciontextBox.Text.Trim()))
            {
                MyErrorProvider.SetError(DescripciontextBox, "Este campo no puede estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (RepetidosNo(DescripciontextBox.Text))
            {
                MessageBox.Show("Ya existe un producto con ese nombre");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (CostoumericUpDown.Value == 0)
            {
                MyErrorProvider.SetError(CostoumericUpDown, "Este campo no bebe ser 0");
                CostoumericUpDown.Focus();
                paso = false;
            }
            if (ExistenciaNumericUpDown.Value == 0)
            {
                MyErrorProvider.SetError(ExistenciaNumericUpDown, "Este campo no bebe ser 0");
                ExistenciaNumericUpDown.Focus();
                paso = false;
            }
            return(paso);
        }
Esempio n. 22
0
        private bool ValidarGuardar()
        {
            bool paso = true;

            MyErrorProvider.Clear();

            if (DescripciontextBox.Text == string.Empty)
            {
                MyErrorProvider.SetError(DescripciontextBox, "El Campo no puede estar vacio.");
                DescripciontextBox.Focus();
                paso = false;
            }
            if (CostonumericUpDown.Value == 0)
            {
                MyErrorProvider.SetError(CostonumericUpDown, "El Campo no puede ser 0");
                CostonumericUpDown.Focus();
                paso = false;
            }
            if (ExistencianumericUpDown.Value == 0)
            {
                MyErrorProvider.SetError(ExistencianumericUpDown, "El Campo no puede ser 0");
                ExistencianumericUpDown.Focus();
                paso = false;
            }
            if (Repeticion(DescripciontextBox.Text))
            {
                MessageBox.Show("No se puede ingresar un producto ya creado");
                DescripciontextBox.Focus();
                paso = false;
            }

            return(paso);
        }
 public void Limpiar()
 {
     PeliculaIdtextBox.Clear();
     EstrenomaskedTextBox.Clear();
     DescripciontextBox.Clear();
     CategoriaIdtextBox.Clear();
 }
Esempio n. 24
0
        private bool Validar()
        {
            bool paso = true;

            if (NombretextBox.Text.Trim() == string.Empty || DescripciontextBox.Text.Trim() == string.Empty || SiglatextBox.Text.Trim() == string.Empty || TipotextBox.Text.Trim() == string.Empty)
            {
                if (NombretextBox.Text.Trim() == string.Empty)
                {
                    errorProvider1.SetError(NombretextBox, "No dejar campo vacio");
                    NombretextBox.Focus();
                }
                if (DescripciontextBox.Text.Trim() == string.Empty)
                {
                    errorProvider1.SetError(DescripciontextBox, "No dejar campo vacio");
                    DescripciontextBox.Focus();
                }
                if (SiglatextBox.Text.Trim() == string.Empty)
                {
                    errorProvider1.SetError(SiglatextBox, "No dejar campo vacio");
                    DescripciontextBox.Focus();
                }
                if (TipotextBox.Text.Trim() == string.Empty)
                {
                    errorProvider1.SetError(TipotextBox, "No dejar campo vacio");
                }

                paso = false;
            }
            return(paso);
        }
 private void NuevoButton_Click(object sender, EventArgs e)
 {
     ArticuloIdnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     CostonumericUpDown.Value    = 0;
     PrecionumericUpDown.Value   = 0;
     GanancianumericUpDown.Value = 0;
 }
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     IdnumericUpDown.Value     = 0;
     FechadateTimePicker.Value = DateTime.Now;
     DescripciontextBox.Clear();
     SiglastextBox.Clear();
     TipotextBox.Clear();
 }
Esempio n. 27
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     LibroIDnumericUpDown.Value = 0;
     FechadateTimePicker.Value  = DateTime.Now;
     DescripciontextBox.Clear();
     SiglastextBox.Clear();
     MyerrorProvider.Clear();
 }
Esempio n. 28
0
        private void Limpiar()
        {
            IdnumericUpDown.Value = 0;
            DescripciontextBox.Clear();
            TotalMantenimientotextBox.Clear();

            errorProvider1.Clear();
        }
Esempio n. 29
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     IdnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     CostotextBox.Clear();
     PreciotextBox.Clear();
     GananciatextBox.Clear();
 }
Esempio n. 30
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     ProductoIDnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     ExistenciatextBox.Clear();
     CostotextBox.Clear();
     ValorInventariotextBox.Clear();
 }