Beispiel #1
0
 public void UpdateCommonName(CommonName commonName)
 {
     StoredProcUpdate("spCommonNameUpdate",
         _P("intCommonNameID", commonName.CommonNameID),
         _P("intBiotaID", commonName.BiotaID),
         _P("vchrCommonName", commonName.Name),
         _P("intRefID", commonName.RefID, DBNull.Value),
         _P("vchrRefPage", commonName.RefPage),
         _P("txtNotes", commonName.Notes)
     );
 }
 private void AddNewName()
 {
     CommonName data = new CommonName();
     data.BiotaID = Taxon.TaxaID.Value;
     data.CommonNameID = -1;
     var viewModel = new CommonNameViewModel(data);
     viewModel.Name = NextNewName("<Name name {0}>", _model, () => viewModel.Name);
     _model.Add(viewModel);
     lstNames.SelectedItem = viewModel;
     lstNames.ScrollIntoView(viewModel);
     RegisterPendingChange(new InsertCommonNameCommand(data));
 }
Beispiel #3
0
        public void InsertCommonName(CommonName commonName)
        {
            var retval = ReturnParam("RetVal");

            StoredProcUpdate("spCommonNameInsert",
                _P("intBiotaID", commonName.BiotaID),
                _P("vchrCommonName", commonName.Name),
                _P("intRefID", commonName.RefID, DBNull.Value),
                _P("vchrRefPage", commonName.RefPage),
                _P("txtNotes", commonName.Notes),
                retval
            );

            commonName.CommonNameID = (int)retval.Value;
        }