private void frmMarca_Load(object sender, EventArgs e) { _dbCosolemEntities = new dbCosolemEntities(); _tbMarca = new tbMarca { estadoRegistro = true }; _dbCosolemEntities.ObjectStateManager.ChangeObjectState(_tbMarca, EntityState.Detached); txtCodigo.Clear(); txtDescripcion.Clear(); }
private void SetearMarca(tbMarca _tbMarca) { try { this._tbMarca = _tbMarca; txtCodigo.Text = this._tbMarca.idMarca.ToString(); txtDescripcion.Text = this._tbMarca.descripcion; } catch (Exception ex) { Util.MostrarException(this.Text, ex); } }