private void dgvList_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e) { if (e.StateChanged != DataGridViewElementStates.Selected) { return; } if (dgvList.SelectedRows.Count != 0) { try { DataGridViewRow row = this.dgvList.SelectedRows[0]; one = (CnfCuentaBancaria)row.DataBoundItem; } catch (Exception ex) { MetroFramework.MetroMessageBox.Show(this.MdiParent, ex.Message, "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning); } btnEdit.Visible = true; } else { btnEdit.Visible = false; } }
public frmCnfCuentasBancariasDetail(CnfCuentaBancaria obj) { InitializeComponent(); _listaBancos = srvListas.GetListByCampo("bancos"); cmbBanco.DataSource = _listaBancos; cmbBanco.DisplayMember = "nombre"; cmbBanco.ValueMember = "id"; one = obj; cmbBanco.DataBindings.Add("SelectedValue", one, "id_banco"); txtNumero.DataBindings.Add("Text", one, "numero", true, DataSourceUpdateMode.OnPropertyChanged); }
private void btnAdd_Click(object sender, EventArgs e) { CnfCuentaBancaria _one = new CnfCuentaBancaria(); _one = srv.GetOne(Globals.logEmpresa.id, "0"); frmCnfCuentasBancariasDetail fDetalle = new frmCnfCuentasBancariasDetail(_one); if (ConfigUI.LaunchDialogForm(fDetalle) == DialogResult.OK) { GetList(); MetroFramework.MetroMessageBox.Show(this.MdiParent, "Registro agregado con éxito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public string SetOne(CnfCuentaBancaria one) { string _id = srv.SetOne(one); return(_id); }
public CnfCuentaBancaria GetOne(string idEmpresa, string id) { CnfCuentaBancaria _one = srv.GetOne(idEmpresa, id); return(_one); }