Exemplo n.º 1
0
 private void CargarSeleccion()
 {
     cod_intimaciones oIntimidacion = new cod_intimaciones();
     TipoIntimacionImplement oTipoIntimidacionImplement = new TipoIntimacionImplement();
     DataGridViewRow row = this.dgvTipoIntimacion.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oIntimidacion = oTipoIntimidacionImplement.Get(id);
     this.lblCodigo.Text = oIntimidacion.id_intimacion.ToString();
     this.txtNombre.Text = oIntimidacion.intimacion;
     this.gbIntimacion.Enabled = false;
     Deshabilitar();
 }
Exemplo n.º 2
0
 private void Guardar()
 {
     cod_intimaciones oIntimidacion = new cod_intimaciones();
     TipoIntimacionImplement oTipoIntimidacionImplement = new TipoIntimacionImplement();
     if (this.lblCodigo.Text == "")
     {
         oIntimidacion.intimacion = this.txtNombre.Text;
         oTipoIntimidacionImplement.Save(oIntimidacion);
     }
     else
     {
         DataGridViewRow row = this.dgvTipoIntimacion.CurrentRow;
         int id = Convert.ToInt32(row.Cells[0].Value);
         oIntimidacion = oTipoIntimidacionImplement.Get(id);
         oIntimidacion.intimacion = this.txtNombre.Text;
         oTipoIntimidacionImplement.Update(oIntimidacion);
     }
     Deshabilitar();
     this.txtNombre.Text = "";
     CargarGrid();
 }
 /// <summary>
 /// Create a new cod_intimaciones object.
 /// </summary>
 /// <param name="id_intimacion">Initial value of the id_intimacion property.</param>
 public static cod_intimaciones Createcod_intimaciones(global::System.Int64 id_intimacion)
 {
     cod_intimaciones cod_intimaciones = new cod_intimaciones();
     cod_intimaciones.id_intimacion = id_intimacion;
     return cod_intimaciones;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the cod_intimaciones EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocod_intimaciones(cod_intimaciones cod_intimaciones)
 {
     base.AddObject("cod_intimaciones", cod_intimaciones);
 }