private void btnAddContaCliFor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XFrmContaBancariaCliForView addCtb = new XFrmContaBancariaCliForView(); addCtb.ShowDialog(); if (addCtb.ContaBancariaCliForAdd != null) { this._contasBancarias.Add(addCtb.ContaBancariaCliForAdd); this.gridControlCtbCliFor.DataSource = this._contasBancarias; this.gridViewCtbCliFor.RefreshData(); } }
private void btnEditContaCliFor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var contaSelect = gridViewCtbCliFor.GetFocusedRow <ContaBancariaCliFor>(); if (contaSelect != null) { var addConta = new XFrmContaBancariaCliForView(contaSelect); addConta.ShowDialog(); if (addConta.ContaBancariaCliForAdd != null) { this._contasBancarias.Remove(contaSelect); this._contasBancarias.Add(addConta.ContaBancariaCliForAdd); this.gridViewCtbCliFor.RefreshData(); } } }