def DeleteByCode(self, xhdm): "delete the specify xhdm model recorder" # xhdm = kwargs['xhdm'] if xhdm != "": try: model = kb_session.query(Model).\ from_statement(text("SELECT * FROM model where xhdm=:xhdm")).\ params(xhdm=xhdm).one() kb_session.delete(model) kb_session.commit() except: kb_session.rollback() pass else: return None
def DeleteByCode(self, sbdm): "delete the specify sbdm fashej recorder" # xhdm = kwargs['xhdm'] if sbdm != "": try: recorder = kb_session.query(Fashej).\ from_statement(text("SELECT * FROM fashej WHERE sbdm=:sbdm")).\ params(sbdm=sbdm).one() kb_session.delete(recorder) kb_session.commit() except: kb_session.rollback() pass else: return None
def DeleteByCode(self, cssbdm): "delete the specify cssbdm jieshoutx recorder" # xhdm = kwargs['xhdm'] if cssbdm != "": try: recorder = kb_session.query(Jieshoutx).\ from_statement(text("SELECT * FROM jieshoutx WHERE cssbdm=:cssbdm")).\ params(cssbdm=cssbdm).one() kb_session.delete(recorder) kb_session.commit() except: kb_session.rollback() pass else: return None