def getMethod(self): m = Method() if self.rbGenerate.Value: m.description = "Values derived from ODM Tools Python" elif self.rbSelect.Value: index = self.lstMethods.GetFirstSelected() print self.lstMethods.GetItem(index,-1).GetText() m= self.series_service.get_method_by_id(self.lstMethods.GetItem(index,-1).GetText()) elif self.rbCreateNew.Value: m.description = self.txtMethodDescrip.Value() return m
def getMethod(self): m = Method() if self.rbGenerate.Value: m.description = "Values derived from ODM Tools Python" elif self.rbSelect.Value: index = self.lstMethods.GetFirstSelected() print self.lstMethods.GetItem(index, -1).GetText() m = self.series_service.get_method_by_id( self.lstMethods.GetItem(index, -1).GetText()) elif self.rbCreateNew.Value: m.description = self.txtMethodDescrip.Value() return m
def create_method(self, description, link): meth = Method() meth.description = description if link is not None: meth.link = link self._edit_session.add(meth) self._edit_session.commit() return meth
def create_method(self, description, link): meth = Method() print description, " ", link meth.description = description if link is not None: meth.link = link self._edit_session.add(meth) self._edit_session.commit() return meth