Tayyorladi: at-34 guruh Umirzaqov Temurbek Tekshirdi
Download 118.56 Kb.
|
IAT5-Temurbek
- Bu sahifa navigatsiya:
- Toshkent 2023
TOSHKENT DAVLAT TRANSPORT UNIVERSITETI Kafedra: " Transportda axborot tizimlari va texnologiyalari " 5-LABORATORIYA ISHI Fanning nomi: Temir yo’l Transportida Axborot Tizimlari Tayyorladi: AT-34 guruh Umirzaqov Temurbek Tekshirdi: Tashmetov T Toshkent 2023 import random import tkinter as tk from tkinter import ttk from tkinter.messagebox import showinfo from tkinter import messagebox # root window root = tk.Tk() root.geometry("300x400") root.resizable(False, False) root.title('DISKON') class DISKON: def konteyner(self,otpravitel,typetrans,country,location,bagage,amount,pay1,pay2): self.otpravitel=otpravitel self.typetrans=typetrans self.country=country self.location=location self.bagage=bagage self.pay2=pay2 self.amount=amount system = DISKON() otpravitel = tk.StringVar() typetrans = tk.StringVar() typetranslist = ['наземный-жд','наземный-фургон','морской-корабль'] country = tk.StringVar() countrylist = ['Uzbekiston','USA','Rossiya'] location = tk.StringVar() locationlist = ['депо','промежуточная станция','сортировочная станция','погрузочная станция'] bagage = tk.StringVar() amount = tk.StringVar() system.pay1 = int(random.randint(10,30))*10 pay2 = tk.StringVar() def my_clicked(): system.otpravitel = otpravitel.get() system.typetrans = typetrans.get() system.country = country.get() system.location = location.get() system.bagage = bagage.get() system.amount = amount.get() system.pay2 = pay2.get() msg = '' if int(amount.get()) >=20: msg = "20 dan ortiq konteyner bor, shuning uchun siz 3500$ komissiya toʻlashingiz kerak\n" if system.pay2>"3500$": msg += f"{system.otpravitel}. Siz kerakli miqdorni ortiqcha to'ladingiz. Yukingiz yo‘lda\n" else: msg += f"{system.otpravitel}. Siz kerakli miqdorni to'lamadingiz. Yuboringiz qaytarildi\n" msg +=f"I.F.O: {system.otpravitel}\n" msg +=f"Transport turi: {system.typetrans}\n" msg +=f"ga yuborildi: {system.country}\n" msg +=f"Manzil: {system.location}\n" msg +=f"Yuk: {system.bagage}\n" msg +=f"Konteynerlar soni: {system.amount}\n" msg +=f"To'lov': {system.pay2}\n" showinfo( title='Malumot', message=msg ) # frame
my_frame.pack(padx=10, pady=10, fill='x', expand=True) # pay
pay_label.pack(fill='x', expand=True) # otpravitel otpravitel_label = ttk.Label(my_frame, text="Yuboruvchining ismi:") otpravitel_label.pack(fill='x', expand=True) w_otpravitel = ttk.Entry(my_frame, textvariable = otpravitel) w_otpravitel.pack(fill='x', expand=True) #w_otpravitel.focus() # typetrans typetrans_label = ttk.Label(my_frame, text="Stansiya kodini kiriting:") typetrans_label.pack(fill='x', expand=True) typetrans.set(typetranslist[0]) w_typetrans = ttk.OptionMenu(my_frame, typetrans, *typetranslist) w_typetrans.pack(fill='x', expand=True) # country country_label = ttk.Label(my_frame, text="mamlakatni tanlang:") country_label.pack(fill='x', expand=True) country.set(countrylist[0]) w_country = ttk.OptionMenu(my_frame, country, *countrylist) w_country.pack(fill='x', expand=True) # location location_label = ttk.Label(my_frame, text="Joyni tanlang:") location_label.pack(fill='x', expand=True) location.set(locationlist[0]) location_entry = ttk.OptionMenu(my_frame, location, *locationlist) location_entry.pack(fill='x', expand=True) # bagage
bagage_label.pack(fill='x', expand=True) bagage_entry = ttk.Entry(my_frame, textvariable=bagage) bagage_entry.pack(fill='x', expand=True) #bagage_entry.focus() # amount
amount_label.pack(fill='x', expand=True) amount_entry = ttk.Entry(my_frame, textvariable=amount) amount_entry.pack(fill='x', expand=True) #amount_entry.focus() # pay2
pay2_label.pack(fill='x', expand=True) pay2_entry = ttk.Entry(my_frame, textvariable=pay2) pay2_entry.pack(fill='x', expand=True) #pay2_entry.focus() # button my_button = ttk.Button(my_frame, text="Ok", command=my_clicked) my_button.pack(fill='x', expand=True, pady=10) root.mainloop() Download 118.56 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling