Documentos de Académico
Documentos de Profesional
Documentos de Cultura
def banner():
root = Tk()
root.title('Ferretería El tornillo feliz')
root.config(bg= "#BDDCE1")
root.resizable(False,False)
miFrame = Frame(root)
miFrame.pack()
miFrame.config(bg = "#A4D8D4")
obtenerDni=StringVar()
lDni = Label(miFrame, text='Usuario',bg = "#FFEEDD")
lDni.grid(row=5, column=2, sticky='e', pady=5, padx=5)
tDni = Entry(miFrame,textvariable=obtenerDni)
tDni.grid(row=5, column=3, pady=5, padx=5)
obtenerApellido=StringVar()
lApellido = Label(miFrame, text='Contraseña',bg = "#FFEEDD")
lApellido.grid(row=7, column=2, sticky='e', pady=5, padx=5)
tApellido = Entry(miFrame,textvariable=obtenerApellido)
tApellido.grid(row=7, column=3, pady=5, padx=5)
obtenerNombre=StringVar()
lNombre = Label(miFrame, text='Pais',bg = "#FFEEDD")
lNombre.grid(row=9, column=2, sticky='e', pady=5, padx=5)
tNombre = Entry(miFrame,textvariable=obtenerNombre)
tNombre.grid(row=9, column=3, pady=5, padx=5)
obtenerDir=StringVar()
lDireccion = Label(miFrame, text='Empresa',bg = "#FFEEDD")
lDireccion.grid(row=11, column=2, sticky='e', pady=10, padx=10)
tDireccion = Entry(miFrame,textvariable=obtenerDir)
tDireccion.grid(row=11, column=3, columnspan=3, sticky='we',pady=10, padx=10)
#Label y entry Teléfono --------------------------------
obtenerTel=StringVar()
lTel = Label(miFrame, text='Correo',bg = "#FFEEDD")
lTel.grid(row=8, column=2, sticky='e', pady=5, padx=5)
tTel = Entry(miFrame,textvariable=obtenerTel)
tTel.grid(row=8, column=3,columnspan=3, sticky='we', pady=5, padx=5)
def Operacion():
try:
cant=int(getquantity1.get());
cant1=int(getquantity2.get());
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
cant2=int(getquantity3.get());
prec=float(getprice1.get());
prec2=float(getprice2.get());
prec3=float(getprice3.get());
subt=(cant*prec);
subt1=(cant1*prec2);
subt2=(cant2*prec3);
totl = (subt+subt1+subt2);
obtenerSubtotal.set(str(subt));
obtenerSubtotal1.set(str(subt1));
obtenerSubtotal2.set(str(subt2));
obtenerTotal.set(str(totl));
except ValueError:
messagebox.showinfo("ERROR","Ingrese valores validos");
def Codigos():
try:
codg=int(getidcode1.get());
codg2=int(getidcode2.get());
codg3=int(getidcode3.get());
desc=getdescription1.get();
desc2=getdescription2.get();
desc3=getdescription3.get();
prec=getprice1.get();
prec2=getprice2.get();
prec3=getprice3.get();
uni=getunit1.get();
uni2=getunit2.get();
uni3=getunit3.get();
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
elif codg3>10 and codg <30:
desc3="Sin Oferta!"
prec3=120
uni3="Kilos"
else:
desc3= "Oferta!"
prec3=190
uni3= "Metros"
getprice1.set(str(prec));
getprice2.set(str(prec2));
getprice3.set(str(prec3));
getdescription1.set(str(desc));
getdescription2.set(str(desc2));
getdescription3.set(str(desc3));
getidcode1.set(str(codg));
getidcode2.set(str(codg2));
getidcode3.set(str(codg3));
getunit1.set(str(uni));
getunit2.set(str(uni2));
getunit3.set(str(uni3));
except ValueError:
messagebox.showinfo("ERROR","Ingrese valores correctos");
def Clear():
getidcode1.set("");
getidcode2.set("");
getidcode3.set("");
getdescription1.set("");
getdescription2.set("");
getdescription3.set("");
getunit1.set("");
getunit2.set("");
getunit3.set("");
getquantity1.set("");
getquantity2.set("");
getquantity3.set("");
getprice1.set("");
getprice2.set("");
getprice3.set("")
obtenerSubtotal.set("");
obtenerSubtotal1.set("");
obtenerSubtotal2.set("");
obtenerTotal.set("");
tDni.focus();
root = Tk()
root.title('Ferretería El tornillo feliz')
root.config(bg= "#BDDCE1")
root.geometry("600x370")
miFrame = Frame(root)
miFrame.pack()
miFrame.config(bg = "#A4D8D4")
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
lDni = Label(miFrame, text='Ferretria El tornillo Feliz', font=("calibri", 18),bg=
"#A4D8D4" )
lDni.grid(row=0, column=2, pady=10, padx=10)
obtenerDni=StringVar()
lDni = Label(miFrame, text='DNI:')
lDni.grid(row=5, column=0, sticky='e', pady=5, padx=5)
tDni = Entry(miFrame,textvariable=obtenerDni)
tDni.grid(row=5, column=1, pady=5, padx=5)
obtenerApellido=StringVar()
lApellido = Label(miFrame, text='Apellido:')
lApellido.grid(row=6, column=0, sticky='e', pady=5, padx=5)
tApellido = Entry(miFrame,textvariable=obtenerApellido)
tApellido.grid(row=6, column=1, pady=5, padx=5)
obtenerNombre=StringVar()
lNombre = Label(miFrame, text='Nombre:')
lNombre.grid(row=6, column=2, sticky='e', pady=5, padx=5)
tNombre = Entry(miFrame,textvariable=obtenerNombre)
tNombre.grid(row=6, column=3, pady=5, padx=5)
obtenerDir=StringVar()
lDireccion = Label(miFrame, text='Dirección:')
lDireccion.grid(row=7, column=0, sticky='e', pady=5, padx=5)
tDireccion = Entry(miFrame,textvariable=obtenerDir)
tDireccion.grid(row=7, column=1, columnspan=3, sticky='we',pady=5, padx=5)
obtenerTel=StringVar()
lTel = Label(miFrame, text='Teléfono:')
lTel.grid(row=8, column=0, sticky='e', pady=5, padx=5)
tTel = Entry(miFrame,textvariable=obtenerTel)
tTel.grid(row=8, column=1,columnspan=3, sticky='we', pady=5, padx=5)
miFrame1 = Frame(root)
miFrame1.pack()
getidcode1 = StringVar()
getidcode2 = StringVar()
getidcode3 = StringVar()
getdescription1 = StringVar()
getdescription2 =StringVar()
getdescription3 =StringVar()
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
tDes2 = Entry(miFrame1, width=7, state="readonly",textvariable = getdescription2)
tDes2.grid(row=11, column=1, pady=5, padx=5)
tDes3 = Entry(miFrame1, width=7, state="readonly",textvariable = getdescription3)
tDes3.grid(row=12, column=1, pady=5, padx=5)
getunit1 = StringVar()
getunit2 = StringVar()
getunit3 = StringVar()
getquantity1 = StringVar()
getquantity2 = StringVar()
getquantity3 = StringVar()
getprice1 = StringVar()
getprice2 = StringVar()
getprice3 = StringVar()
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
lTotal.grid(row=12, column=6,sticky='ew', pady=5, padx=5)
tTotal = Entry(miFrame1, width=7, textvariable = obtenerTotal)
tTotal.grid(row=12, column=7, pady=5, padx=5)
guardar=Button(miFrame1, text='Calcular',font=("calibri", 15),bg= "#A4D8D4",
command=Operacion)
guardar.grid(row=13, column=5, pady=10, padx=10)
guardar=Button(miFrame1, text='Informacion',font=("calibri", 12),bg= "#A4D8D4",
command=Codigos)
guardar.grid(row=13, column=1, pady=5, padx=5)
guardar=Button(miFrame1, text='Limpiar', font=("calibri", 12),bg= "Yellow",
command= Clear)
guardar.grid(row=13, column=0, pady=5, padx=5)
root.mainloop()
This study source was downloaded by 100000867250967 from CourseHero.com on 05-15-2023 13:59:15 GMT -05:00
https://www.coursehero.com/file/177296548/ferreteriapy/
Powered by TCPDF (www.tcpdf.org)