How to write a program whose input various information of the companies

Joined
Jun 15, 2022
Messages
3
Reaction score
0
Hi,
I want to write a program whose input is the names of the companies and when adding the name of each company, it will take various information from that company of different types,
1- TextBox (daily production rate),
2- CheckBox (select product features),
3- OptionButton (the gender of the company owner),
4- Date (Product delivery time, yy/mm/dd), ... in a form and store all that information in the profile of that company.

I just started programming. Of course, I have an average familiarity with Matlab, which I know is not suitable for writing this program.

What programming language should I use for this task so that I can design a beautiful appearance (GUI) for entering information and this information can be entered easily by the user?

Is there a pre-written program that is close to my goal so that I can improve it to suit my needs?

Thanks in advance.
 
Joined
Nov 13, 2020
Messages
302
Reaction score
38
Html/css/javascript/php/mysql. Do a google search for data entry forms in html
 
Joined
Jan 30, 2023
Messages
5
Reaction score
0
YEs you could write the program using Phyton or MYsql I'm not too sure about how I would design and build the program for you.. Most programs are coded and built using PHP or phyton
 
Joined
Jan 30, 2023
Messages
107
Reaction score
13
You can use a GUI framework and a programming language like Python or Java to write this program.

For Python, you can use the Tkinter library for creating the GUI, and for storing the information, you can use a database like SQLite.
For Java, you can use the JavaFX library for creating the GUI, and for storing the information, you can use a database like H2.
It's also possible to use pre-written programs as a starting point and make modifications to suit your needs. For example, you can use open-source projects such as "Glade" in Python and "Scene Builder" in Java to create the GUI and then use the associated programming language to handle the logic and data storage.
It's also possible to use a visual drag and drop GUI builder to create the interface, then write code to handle the logic and data storage. For example, you can use tools like Qt Designer for Python and JavaFX Scene Builder for Java.

example code in Python using Tkinter for the GUI and SQLite for data storage

Python:
import tkinter as tk
import sqlite3

def add_company():
    name = name_entry.get()
    production_rate = production_rate_entry.get()
    product_features = ",".join([f for f, v in feature_vars.items() if v.get()])
    gender = gender_var.get()
    delivery_date = delivery_date_entry.get()

    conn = sqlite3.connect("companies.db")
    c = conn.cursor()
    c.execute("""CREATE TABLE IF NOT EXISTS companies (
                    name text,
                    production_rate text,
                    product_features text,
                    gender text,
                    delivery_date text
                )""")
    c.execute("INSERT INTO companies VALUES (?,?,?,?,?)",
              (name, production_rate, product_features, gender, delivery_date))
    conn.commit()
    conn.close()

    name_entry.delete(0, tk.END)
    production_rate_entry.delete(0, tk.END)
    for f, v in feature_vars.items():
        v.set(0)
    gender_var.set("Male")
    delivery_date_entry.delete(0, tk.END)

root = tk.Tk()
root.title("Company Information")

name_label = tk.Label(root, text="Name")
name_label.grid(row=0, column=0)
name_entry = tk.Entry(root)
name_entry.grid(row=0, column=1)

production_rate_label = tk.Label(root, text="Production Rate")
production_rate_label.grid(row=1, column=0)
production_rate_entry = tk.Entry(root)
production_rate_entry.grid(row=1, column=1)

feature_vars = {
    "Feature 1": tk.IntVar(),
    "Feature 2": tk.IntVar(),
    "Feature 3": tk.IntVar()
}
features_label = tk.Label(root, text="Product Features")
features_label.grid(row=2, column=0)
for i, (f, v) in enumerate(feature_vars.items()):
    tk.Checkbutton(root, text=f, variable=v).grid(row=2, column=1, rowspan=3, sticky="w", padx=20, pady=(10, 0), rowoffset=i)

gender_var = tk.StringVar()
gender_var.set("Male")
gender_label = tk.Label(root, text="Gender")
gender_label.grid(row=5, column=0)
tk.Radiobutton(root, text="Male", variable=gender_var, value="Male").grid(row=5, column=1, sticky="w", padx=20)
tk.Radiobutton(root, text="Female", variable=gender_var, value="Female").grid(row=5, column=1, sticky="e", padx=20)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,335
Latest member
Tommiesal

Latest Threads

Top