private void BtnAction_Click(object sender, RoutedEventArgs e) { Button button = (Button)sender; string customerId = button.Uid; Customer customer = Util.ToObject <Customer>(new CustomerService().GetCustomerById(customerId)); Window addCustomer = new AddCustomers(customer); addCustomer.Title = "编辑联系人"; addCustomer.Show(); addCustomer.Closed += addCustomers_Closed; }
private void Button_Click(object sender, RoutedEventArgs e) { Customer customer = new Customer { CustomerName = "", Phone = "", Address = "", CustomerType = "", Remarks = "", IsEnabled = 0 }; Window addCustomers = new AddCustomers(customer); addCustomers.Show(); addCustomers.Closed += addCustomers_Closed; }