private void UpdateRecord() { using (new WaitCursor()) { Record oclsRecord = new Record(); Record clsRecord = new Record(); oclsRecord.Record_ID = System.Convert.ToInt32((Grid.SelectedCells[0].Column.GetCellContent(Grid.SelectedItem) as TextBlock).Text); oclsRecord = RecordData.Select_Record(oclsRecord); if (VerifyData() == true) { SetData(clsRecord); Boolean bSucess = new Boolean(); bSucess = RecordData.Update(oclsRecord, clsRecord); if (bSucess == true) { GoBack_To_Grid(); } else { MessageBox.Show("Update failed.", "Error"); } } } }