private void Edit_Btn_Click(object sender, RoutedEventArgs e) { salesOrder.Name = Name_Txt.Text; int Id = Convert.ToInt16(IdSO_Txt.Text); var result = iSalesOrder.UpdateSalesOrder(Id, salesOrder); if (result) { MessageBox.Show("Update Success"); dataGridSalesOrder.ItemsSource = iSalesOrder.get(); } else { MessageBox.Show("Update Failed"); } }