Beispiel #1
0
    def updatesave_enttype_details(self, login, enttypeid ,enttypename, dispname):

        result = []
        ent=EntityType();
        db=DBHelper()
        session=DBHelper().get_session()
        ent=session.query(EntityType).filter(EntityType.id==enttypeid).first()
        ent.name=enttypename
        ent.display_name=dispname
        ent.modified_by=(login)
        ent.modified_date=datetime.now()

        db.update(ent);
        return result
Beispiel #2
0
    def updatesave_enttype_details(self, login, enttypeid, enttypename,
                                   dispname):

        result = []
        ent = EntityType()
        db = DBHelper()
        session = DBHelper().get_session()
        ent = session.query(EntityType).filter(
            EntityType.id == enttypeid).first()
        ent.name = enttypename
        ent.display_name = dispname
        ent.modified_by = (login)
        ent.modified_date = datetime.now()

        db.update(ent)
        return result
Beispiel #3
0
    def save_enttype_details(self, login, enttypename, dispname):
        dupEnt = None
        db = DBHelper()
        session = DBHelper().get_session()
        dupEnt = session.query(EntityType).filter(
            EntityType.name == enttypename).first()
        if dupEnt is None:
            result = []
            ent = EntityType()
            ent.name = (enttypename)
            ent.display_name = (dispname)
            ent.created_by = (login)
            ent.created_date = datetime.now()
            ent.modified_by = (login)

            db.add(ent)
            return result
        else:
            result = "False"
            return result
Beispiel #4
0
    def save_enttype_details(self,login,enttypename,dispname):
        dupEnt=None
        db=DBHelper()
        session=DBHelper().get_session()
        dupEnt=session.query(EntityType).filter(EntityType.name==enttypename).first()
        if dupEnt is None:
           result=[]
           ent=EntityType();
           ent.name=(enttypename)
           ent.display_name=(dispname)
           ent.created_by=(login)
           ent.created_date=datetime.now()
           ent.modified_by=(login)

           db.add(ent);
           return result
        else:
           result="False"
           return result