Subversion Repositories SmartDukaan

Rev

Rev 1596 | Rev 1612 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1596 Rev 1605
Line 541... Line 541...
541
         - message
541
         - message
542
        """
542
        """
543
        try:
543
        try:
544
            return create_user_communication(userId, email, communicationType, orderId, awb, product, subject, message)
544
            return create_user_communication(userId, email, communicationType, orderId, awb, product, subject, message)
545
        finally:
545
        finally:
546
            WidgetDataAccessor.close_session()
546
            UserDataAccessors.close_session()
547
    
547
    
548
    def getUserCommunicationById(self, id):
548
    def getUserCommunicationById(self, id):
549
        """
549
        """
550
        Parameters:
550
        Parameters:
551
         - id
551
         - id
552
        """
552
        """
553
        try:
553
        try:
554
            return to_t_user_communication(get_user_communication_by_id(id))
554
            return to_t_user_communication(get_user_communication_by_id(id))
555
        finally:
555
        finally:
556
            WidgetDataAccessor.close_session()
556
            UserDataAccessors.close_session()
557
    
557
    
558
    def getUserCommunicationByUser(self, userId):
558
    def getUserCommunicationByUser(self, userId):
559
        """
559
        """
560
        Parameters:
560
        Parameters:
561
         - userId
561
         - userId
562
        """
562
        """
563
        try:
563
        try:
564
            return [to_t_user_communication(user_communication) for user_communication in get_user_communication_by_user(userId)]
564
            return [to_t_user_communication(user_communication) for user_communication in get_user_communication_by_user(userId)]
565
        finally:
565
        finally:
566
            WidgetDataAccessor.close_session()
566
            UserDataAccessors.close_session()
567
    
567
    
568
    def getAllUserCommunications(self):
568
    def getAllUserCommunications(self):
569
        try:
569
        try:
570
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
570
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
571
        finally:
571
        finally:
572
            WidgetDataAccessor.close_session()
572
            UserDataAccessors.close_session()
573
 
573
 
574
    def getUserCount(self, userType):
574
    def getUserCount(self, userType):
575
        """
575
        """
576
        Returns number of registered users.
576
        Returns number of registered users.
577
        If anonymous flag = -1, All users
577
        If anonymous flag = -1, All users