private void repositoryItemButtonEdit1_Click(object sender, EventArgs e) { var customer = this.OrderVM.Orders[gridView.FocusedRowHandle]?.Customer; if (customer != null) { var edit = new CustomerEdit(customer); if (edit.ShowDialog() == DialogResult.OK) { gridControl.RefreshDataSource(); } } }
private void EditCustomer(object p) { CustomerModel customer = (CustomerModel)p; CustomerEdit customerEdit = new CustomerEdit(customer.GetShallowCopy()); if ((customerEdit.ShowDialog() ?? true) && customerEdit.DialogResult.Value == true) { CustomerModel changedCustomer = ((CustomerEditViewModel)customerEdit.DataContext).Customer; var cust = Customers.Where(c => c.IdCustomer == customer.IdCustomer); foreach (CustomerModel customerModel in cust) { customerModel.Reload(dbAccess); } } }
public void CustomerEdit(SIS.Data.FormOpenType _FormOpenType, int _id) { CustomerEdit _CustomerEdit = new CustomerEdit(); _CustomerEdit._FormOpenType = _FormOpenType; if (_FormOpenType == Data.FormOpenType.New) { _CustomerEdit.__dl_Customers = new Model.Models.GMP.Customer.CustomersDTO(); } else { _getValue.Id = _id; //_CustomerEdit.__dl_Customers = bl._repository.Run<CustomersService, CustomersDTO>(x => x.Get_Customers(_getValue)); } _CustomerEdit.ShowDialog(); }