private void AgregarBotton_Click(object sender, RoutedEventArgs e) { mora.Detalle.Add(new MoraDetalle(mora.MoraId, Convert.ToInt32(PrestamoIdTextBox.Text), Convert.ToInt32(ValorTextBox.Text))); Cargar(); PrestamoIdTextBox.Clear(); ValorTextBox.Clear(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { moras.MorasDetalle.Add(new MorasDetalle(moras.MoraId, PrestamoIdComboBox.SelectedIndex + 1, Convert.ToDecimal(ValorTextBox.Text))); Cargar(); ValorTextBox.Clear(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { moras.Detalles.Add(new MorasDetalle(moras.MoraId, Convert.ToInt32(PrestamoIdDetalleTextBox.Text), FechaMoraDatePicker.DisplayDate, Convert.ToSingle(ValorTextBox.Text))); Cargar(); ValorTextBox.Clear(); }
public void LimpiarDetalle() { CalificacionTextBox.Clear(); ValorTextBox.Clear(); TipoEvaluacionComboBox.SelectedIndex = -1; FechaEvaluacion.SelectedDate = DateTime.Now; ObservacionTextBox.Clear(); CalificacionTextBox.Focus(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { mora.Detalles.Add(new MorasDetalle(mora.MoraId, int.Parse(PrestamoIdTextBox.Text), Double.Parse(ValorTextBox.Text))); Refresh(); PrestamoIdTextBox.Clear(); ValorTextBox.Clear(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new MorasDetalle(moras.MoraId, Convert.ToInt32(PrestamoIdComboBox.SelectedIndex + 1), FechaDatePicker.DisplayDate, Convert.ToInt32(ValorTextBox.Text)); moras.Detalle.Add(filaDetalle); Cargar(); ValorTextBox.Clear(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new ArticulosDetalle(Articulos.IdArticulo, RequerimientoTextBox.Text, Convert.ToSingle(ValorTextBox.Text)); Articulos.Detalle.Add(filaDetalle); Cargar(); RequerimientoTextBox.Clear(); ValorTextBox.Clear(); }
private void AgregarBoton_Click(object sender, RoutedEventArgs e) { moras.Total += Convert.ToDecimal(ValorTextBox.Text); moras.Detalle.Add(new MorasDetalle(moras.MoraId, Convert.ToInt32(PrestamosComboBox.SelectedValue), Convert.ToDecimal(ValorTextBox.Text))); this.DataContext = null; this.DataContext = moras; ValorTextBox.Clear(); }
//----------------------------------[ AGREGAR FILA - Registro Detallado ]---------------------------------- private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { MorasDetalle morita = new MorasDetalle(); moras.Detalle.Add(new MorasDetalle(morita.Id, PrestamoIdDetalleComboBox.SelectedIndex + 1, morita.FechaMoraDetalle, Convert.ToSingle(ValorTextBox.Text))); Cargar(); ValorTextBox.Clear(); }
//----------------------------------[ AGREGAR FILA - Registro Detallado ]---------------------------------- private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new MorasDetalle(int.Parse(IdTextBox.Text), moras.MoraId, int.Parse(PrestamoIdDetalleTextBox.Text), FechaDetalleaDataPicker.DisplayDate, Convert.ToSingle(ValorTextBox.Text)); moras.Detalle.Add(filaDetalle); Cargar(); ValorTextBox.Clear(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { Tarea.Detalle.Add(new TareasDetalle(Tarea.TareaId, RequerimientoTextBox.Text, Convert.ToSingle(ValorTextBox.Text))); Cargar(); RequerimientoTextBox.Focus(); RequerimientoTextBox.Clear(); ValorTextBox.Clear(); RequerimientoTextBox.Focus(); }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { if (!ValidarAgregar()) { return; } Mora.Total += Convert.ToDecimal(ValorTextBox.Text); Mora.Detalle.Add(new MorasDetalle(Mora.MoraId, Convert.ToInt32(PrestamoComboBox.SelectedValue), Convert.ToDecimal(ValorTextBox.Text))); Cargar(); ValorTextBox.Clear(); }
private void ValorTextBox_TextChanged(object sender, EventArgs e) { MyErrorProvider.Clear(); if (string.IsNullOrWhiteSpace(ValorTextBox.Text)) { ValorTextBox.Text = Convert.ToString(0); } if (string.IsNullOrWhiteSpace(LogradoTextBox.Text)) { LogradoTextBox.Text = Convert.ToString(0); } if (Convert.ToDecimal(ValorTextBox.Text) < 0) { MyErrorProvider.SetError(ValorTextBox, "El valor introducido en el campo valor es incorrecto"); ValorTextBox.Focus(); } else { MyErrorProvider.Clear(); } if (Convert.ToDecimal(LogradoTextBox.Text) > Convert.ToDecimal(ValorTextBox.Text)) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); } else { MyErrorProvider.Clear(); } if (Convert.ToDecimal(LogradoTextBox.Text) < 0) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); } else { MyErrorProvider.Clear(); } decimal valor = Convert.ToDecimal(ValorTextBox.Text); decimal logrado = Convert.ToDecimal(LogradoTextBox.Text); decimal perdido = valor - logrado; PerdidoTextBox.Text = Convert.ToString(perdido); }
private bool Validar() { MyErrorProvider.Clear(); bool paso = true; if (string.IsNullOrWhiteSpace(EstudianteTextBox.Text)) { MyErrorProvider.SetError(EstudianteTextBox, "El campo estudiante no puede estar vacio"); EstudianteTextBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(ValorTextBox.Text)) { MyErrorProvider.SetError(ValorTextBox, "El campo valor no puede estar vacio"); ValorTextBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(LogradoTextBox.Text)) { MyErrorProvider.SetError(LogradoTextBox, "El campo logrado no puede estar vacio"); LogradoTextBox.Focus(); paso = false; } if (Convert.ToDecimal(ValorTextBox.Text) < Convert.ToDecimal(LogradoTextBox.Text)) { MyErrorProvider.SetError(LogradoTextBox, "El campo logrado no puede ser mayor que el valor"); LogradoTextBox.Focus(); paso = false; } if (Convert.ToDecimal(ValorTextBox.Text) <= 0) { MyErrorProvider.SetError(ValorTextBox, "El campo valor no puede ser menor o igual que cero"); ValorTextBox.Focus(); paso = false; } if (Convert.ToDecimal(LogradoTextBox.Text) < 0) { MyErrorProvider.SetError(LogradoTextBox, "El campo logrado no puede ser menor que cero"); LogradoTextBox.Focus(); paso = false; } return(paso); }
private void LimparButton_Click(object sender, EventArgs e) { //ClienteTextBox.Text = ""; //ValorTextBox.Text = ""; //UFComboBox.Text = ""; //FreteTextBox.Text = ""; //TotalTextBox.Text = ""; //or ClienteTextBox.Text = string.Empty; UFComboBox.SelectedIndex = -1; ValorTextBox.Clear(); FreteTextBox.Text = null; TotalTextBox.Text = ""; ClienteTextBox.Focus(); }
public bool Validar() { bool paso = true; MyErrorProvider.Clear(); if (string.IsNullOrWhiteSpace(EstudianteTextBox.Text)) { MyErrorProvider.SetError(EstudianteTextBox, "Introduccion no valida en el campo Estudiante"); EstudianteTextBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(LogradoTextBox.Text) || Convert.ToDecimal(LogradoTextBox.Text) < 0) { MyErrorProvider.SetError(LogradoTextBox, "Introduccion no valida en el campo logrado"); LogradoTextBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(ValorTextBox.Text) || Convert.ToDecimal(ValorTextBox.Text) < 0) { MyErrorProvider.SetError(ValorTextBox, "Introduccion no valida en el campo valor"); ValorTextBox.Focus(); paso = false; } if (Convert.ToDecimal(LogradoTextBox.Text) < 0) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); paso = false; } if (Convert.ToDecimal(ValorTextBox.Text) < 0) { MyErrorProvider.SetError(ValorTextBox, "El valor introducido en el campo valor es incorrecto"); ValorTextBox.Focus(); paso = false; } if (Convert.ToDecimal(LogradoTextBox.Text) > Convert.ToDecimal(ValorTextBox.Text)) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); paso = false; } return(paso); }
//AGREGAR FILA private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new MorasDetalle { MoraId = this.moras.MoraId, PrestamoId = Convert.ToInt32(PrestamoIdDetalleComboBox.SelectedValue), Valor = Convert.ToSingle(ValorTextBox.Text) }; moras.Total += Convert.ToDouble(ValorTextBox.Text.ToString()); this.moras.Detalle.Add(filaDetalle); Cargar(); ValorTextBox.Clear(); }
public void validar() { if (string.IsNullOrWhiteSpace(CantidadTextBox.Text) || Convert.ToInt32(CantidadTextBox.Text) < 1) { MyErrorProvider.SetError(CantidadTextBox, "El campo lados no puede estar vacio"); CantidadTextBox.Focus(); } if (string.IsNullOrWhiteSpace(ValorTextBox.Text) || Convert.ToInt32(ValorTextBox.Text) < 1) { MyErrorProvider.SetError(ValorTextBox, "El campo valor no puede estar vacio"); ValorTextBox.Focus(); } if (string.IsNullOrWhiteSpace(ApotemaTextBox.Text) || Convert.ToInt32(ApotemaTextBox.Text) < 1) { MyErrorProvider.SetError(ApotemaTextBox, "El campo apotema no puede estar vacio"); ApotemaTextBox.Focus(); } }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { if (prestamo.PrestamoId > 0) { var filaDetalle = new MorasDetalle(moras.MoraId, int.Parse(PrestamoTextBox.Text), float.Parse(ValorTextBox.Text)); moras.Detalle.Add(filaDetalle); Cargar(); ValorTextBox.Clear(); PrestamoTextBox.Clear(); } else { MessageBox.Show("Prestamo no encontrado"); } }
private void AgregarButton_Click(object sender, RoutedEventArgs e) { if (!Validar()) { return; } var detalle = new PrestamoMorasDetalle(int.Parse(IdTextBox.Text), int.Parse(MoraIdDetalleTextBox.Text), int.Parse(PrestamoIdTextBox.Text), double.Parse(ValorTextBox.Text)); prestamoMoras.MorasDetalle.Add(detalle); prestamoMoras.Total = double.Parse(TotalTextBox.Text); Refrescar(); MoraIdDetalleTextBox.Clear(); PrestamoIdTextBox.Clear(); ValorTextBox.Clear(); IdTextBox.Focus(); }
private void AgregarButton_Click(object sender, RoutedEventArgs e) { if (!ValidarDetalle()) { return; } MorasDetalle detalle = new MorasDetalle( Convert.ToInt32(IdTextBox.Text), Convert.ToInt32(PrestamoComboBox.SelectedValue.ToString()), Convert.ToDecimal(ValorTextBox.Text) ); mora.Detalle.Add(detalle); mora.Total += detalle.Valor; Actualizar(); PrestamoComboBox.SelectedIndex = -1; ValorTextBox.Clear(); }
private void LogradoTextBox_TextChanged(object sender, EventArgs e) { MyErrorProvider.Clear(); if (string.IsNullOrWhiteSpace(ValorTextBox.Text)) { ValorTextBox.Text = Convert.ToString(0); } if (string.IsNullOrWhiteSpace(LogradoTextBox.Text)) { LogradoTextBox.Text = Convert.ToString(0); } if (Convert.ToDecimal(LogradoTextBox.Text) < 0) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); return; } else { MyErrorProvider.Clear(); } if (Convert.ToDecimal(ValorTextBox.Text) < 0) { MyErrorProvider.SetError(ValorTextBox, "El valor introducido en el campo valor es incorrecto"); ValorTextBox.Focus(); return; } else { MyErrorProvider.Clear(); } if (Convert.ToDecimal(LogradoTextBox.Text) > Convert.ToDecimal(ValorTextBox.Text)) { MyErrorProvider.SetError(LogradoTextBox, "El valor introducido en el campo logrado es incorrecto"); LogradoTextBox.Focus(); return; } else { MyErrorProvider.Clear(); } decimal valor = Convert.ToDecimal(ValorTextBox.Text); decimal logrado = Convert.ToDecimal(LogradoTextBox.Text); decimal perdido = valor - logrado; PerdidoTextBox.Text = Convert.ToString(perdido); if (EvaluacionBLL.CalcularPerdido(valor, logrado) > (valor * (decimal)0.30)) { PronosticoComboBox.SelectedIndex = 2; } else if (EvaluacionBLL.CalcularPerdido(valor, logrado) <= (valor * (decimal)0.30) && EvaluacionBLL.CalcularPerdido(valor, logrado) >= (valor * (decimal)0.25)) { PronosticoComboBox.SelectedIndex = 1; } else if (EvaluacionBLL.CalcularPerdido(valor, logrado) < (valor * (decimal)0.25)) { PronosticoComboBox.SelectedIndex = 0; } }