Example #1
0
 def __init__(self, host, port, parent=None):
     super(window_main, self).__init__(parent)
     self.__conn = connection.connection(host=host, port=port)
     self.client = client.client(self.__conn)
     self.handler = handler.handler(self.__conn)
     self.thread = QThread()
     self.setupUi(self)
     self.setupConnect()
     self.__exit = False
Example #2
0
File: main.py Project: Henry440/HCP
def start(mode):
    hostname = socket.gethostname()
    local_ip = socket.gethostbyname(hostname)
    print("Verwendete IP ist " + local_ip)
    value = inp("IP ändern [y/N]", ["Y", "y", "N", "n"]).lower()
    if(value == "y"):
        local_ip = input("Neue IP : ")
    if mode == 0:
        print("Server Start")
        s = server(str(local_ip))
    elif mode == 1:
        print("Client Start")
        c = client(str(local_ip))
Example #3
0
 def __init__(self):
     self.__bookId = 5
     self.__title = "Fratii Karamazov"
     self.__author = "Dostoievski"
     self.__description = "pam pam"
     self.__clientId = 7
     self.__name = "Ion Iliescu"
     self.__rentalId = 16
     self.__rentedDate = 20
     self.__dueDate = 13
     self.__returnedDate = 30
     self.__book = Book(self.__bookId, self.__title, self.__description,
                        self.__author)
     self.__client = client(self.__clientId, self.__name)
     self.__rental = rental(self.__rentalId, self.__bookId, self.__clientId,
                            self.__rentedDate, self.__dueDate,
                            self.__returnedDate)
     self.__repo = repository()
     self.__valid = validation()
     self.__repo1 = repository()
     self.__business = business(self.__repo1, self.__valid)
Example #4
0
 def add(self, li):
     '''
         This method adds a new client object to the client list
     '''
     self._clientList.append(client(li[0], li[1]))
Example #5
0
sys.path.append(r'../')
from client import client

url   = 'http://www.yunqi.com/index.php/openapi/rpc/service'
flag  = 'test'
token = 'OaYMGiaNlXXsspjnsnTjzjrDCYWngEkh'


obj  = "po.add"


parameter = {
		    'name' : '采购单1',				#采购单名称
		    'vendor' : '123',					#供应商
		    'po_type' : 1,								#1 – 现购2 – 赊购 
		    'branch_bn' : 'stockhouse',				#到货仓库编号
		    'arrive_time' : 1,							#到货时间
		    'operator' : 'admin',						#经办人
		    'memo'	: '备注',							#备注
		    'items' : '[{"bn":"00000001","name":"商品1","nums":"2","price":"1"}]',	#货号 货品名称 数量  单价
            }




client = client()
cli = client.client(url,parameter,obj,flag,token)
print(cli)


Example #6
0
 def updateClient(self, clientId, name):
     new_client = client(clientId, name)
     self.__repo.updateClientList(new_client)
Example #7
0
 def removeClient(self, clientId, name):
     old_client = client(clientId, name)
     self.__repo.removeElement(old_client)
Example #8
0
 def addNewClient(self, clientId, name):
     new_client = client(clientId, name)
     self.__repo.addElement(new_client)
Example #9
0
def create_client():
    logging.info("starting the client")
    this_client = client()
    this_client.recv()
Example #10
0
from client import client

if __name__ == '__main__':
    client.client()