public override void ViewToModel() { if (CurrentControloAut == null || CurrentControloAut.RowState == DataRowState.Detached || !IsLoaded) { return; } CurrentControloAut.RegrasConvencoes = txtRegrasConvencoes.Text; CurrentControloAut.Observacoes = txtObservacoes.Text; if (cbLingua.SelectedValue == null || ((long)cbLingua.SelectedValue) == -1) { if (!CurrentControloAut.IsIDIso639p2Null()) { CurrentControloAut["IDIso639p2"] = DBNull.Value; } } else { if (CurrentControloAut.IsIDIso639p2Null() || CurrentControloAut.IDIso639p2 != ((GISADataset.Iso639Row)cbLingua.SelectedItem).ID) { CurrentControloAut.IDIso639p2 = ((GISADataset.Iso639Row)cbLingua.SelectedItem).ID; } } if (cbAlfabeto.SelectedValue == null || ((long)cbAlfabeto.SelectedValue) == -1) { if (!CurrentControloAut.IsIDIso639p2Null()) { CurrentControloAut["IDIso15924"] = DBNull.Value; } } else { if (CurrentControloAut.IsIDIso15924Null() || CurrentControloAut.IDIso15924 != ((GISADataset.Iso15924Row)cbAlfabeto.SelectedItem).ID) { CurrentControloAut.IDIso15924 = ((GISADataset.Iso15924Row)cbAlfabeto.SelectedItem).ID; } } CurrentControloAut.Autorizado = chkDefinitivo.Checked; CurrentControloAut.Completo = chkCompleta.Checked; }