private void btnAdd_Click(object sender, RoutedEventArgs e) { bool?nullable = new AlarmUnitAddDialog().ShowDialog(); bool flag = true; if ((nullable.GetValueOrDefault() == flag ? (nullable.HasValue ? 1 : 0) : 0) == 0) { return; } this.RefreshData(); }
private void EditUnit(UnitModel user) { bool?nullable = new AlarmUnitAddDialog() { UnitDID = user.UnitDID }.ShowDialog(); bool flag = true; if ((nullable.GetValueOrDefault() == flag ? (nullable.HasValue ? 1 : 0) : 0) == 0) { return; } this.RefreshData(); }