public TareaDetalle(ProyectosDetalle detalle) { ProyectosDetalleId = detalle.ProyectosDetalleId; ProyectoId = detalle.ProyectoId; TipoId = detalle.TipoId; Tipo = TiposTareaBLL.Buscar(TipoId).Descripcion; Requerimiento = detalle.Requerimiento; Tiempo = detalle.Tiempo; }
private void Remover_Click(object sender, RoutedEventArgs e) { if (DatosDataGrid.Items.Count >= 1 && DatosDataGrid.SelectedIndex <= DatosDataGrid.Items.Count - 1) { ProyectosDetalle m = (ProyectosDetalle)DatosDataGrid.SelectedValue; proyectos.TiempoTotal -= m.Tiempo; proyectos.Detalle.RemoveAt(DatosDataGrid.SelectedIndex); Cargar(); } }
private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new ProyectosDetalle { ProyectoId = this.proyectos.ProyectoId, TareaId = Convert.ToInt32(TipoTareaComboBox.SelectedValue.ToString()), Requerimiento = RequerimientoTextBox.Text.ToString(), Tiempo = Convert.ToInt32(TiempoTextBox.Text.ToString()) }; this.proyectos.Detalle.Add(filaDetalle); Cargar(); TipoTareaComboBox.SelectedIndex = -1; RequerimientoTextBox.Clear(); TiempoTextBox.Clear(); }
private void AgregarButton_Click(object sender, RoutedEventArgs e) { var detalle = new ProyectosDetalle { ProyectoId = int.Parse(ProyectoIdTextBox.Text), TipoId = tarea.TareaId, Tarea = tarea, Requerimiento = RequerimientoTextBox.Text, TiempoMinutos = int.Parse(TiempoTextBox.Text) }; Proyecto.ProyectoDetalles.Add(detalle); Cargar(); TipoTareaComboBox.SelectedIndex = -1; RequerimientoTextBox.Clear(); TiempoTextBox.Clear(); //RequerimientoTextBox.Focus(); }
//——————————————————————————————————————————————————————————————[ Agregar Fila ]——————————————————————————————————————————————————————————————— private void AgregarFilaButton_Click(object sender, RoutedEventArgs e) { var filaDetalle = new ProyectosDetalle { ProyectoId = this.proyectos.ProyectoId, TipoTareasId = Convert.ToInt32(TipoTareaComboBox.SelectedValue.ToString()), tiposTareas = ((TiposTareas)TipoTareaComboBox.SelectedItem), Requerimiento = (RequerimientoTextBox.Text), Tiempo = Convert.ToSingle(TiempoTextBox.Text) }; //——————————————————————————————[Tiempo Total]—————————————————————————————— proyectos.TiempoTotal += Convert.ToDouble(TiempoTextBox.Text.ToString()); //—————————————————————————————————————————————————————————————————————————— this.proyectos.Detalle.Add(filaDetalle); Cargar(); TipoTareaComboBox.SelectedIndex = -1; RequerimientoTextBox.Clear(); TiempoTextBox.Clear(); }
private void AgregarBoton_Click(object sender, RoutedEventArgs e) { if (!ValidarTarea()) { return; } ProyectosDetalle detalle = new ProyectosDetalle() { ProyectoId = Utilities.ToInt(ProyectoIdTextBox.Text), TipoId = Utilities.ToInt(TareasComboBox.SelectedValue.ToString()), Requerimiento = RequerimientoTextBox.Text, Tiempo = Utilities.ToDouble(TiempoTextBox.Text) }; this.detalle.Add(new TareaDetalle(detalle)); proyecto.Detalle.Add(detalle); proyecto.TiempoTotal += detalle.Tiempo; Actualizar(); }