Hirdetés
- EarFun Air Pro 4+ – érdemi plusz
- Milyen okostelefont vegyek?
- iPhone topik
- Örömhír: nem spórol Európán a OnePlus
- iOS alkalmazások
- „Új mérce az Android világában” – Kezünkben a Vivo X300 és X300 Pro
- Samsung Galaxy A56 - megbízható középszerűség
- Pulzust is mér az Apple AirPods Pro 3
- Telekom mobilszolgáltatások
- Ezek a OnePlus 12 és 12R európai árai
Új hozzászólás Aktív témák
-
Cool Face
aktív tag
válasz
h1ght3chzor
#6963
üzenetére
Szia.
A 4 db radioButton közül a kijelöltet tartalmazó text-et az adatbázisba.
RadioButton-ok:
Level 1 - radioButton_lvl1
Level 2 - radioButton_lvl2
Level 3 - radioButton_lvl3
Level 4 - radioButton_lvl4
Level 5 - radioButton_lvl5Ha a fentiek közül kijelölök egyet akkor azt a text-et menti el(Level 1, Level2 etc).
A lenti kódig jutottam el. Fölösleges dolgokat kitöröltem.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
namespace Honeywell_SDE_Application
{
public partial class PPAP_Create : Form
{
private OleDbConnection connection = new OleDbConnection();
public PPAP_Create()
{
InitializeComponent();
connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\h109536\Documents\PPAPdatabase_excel.accdb;
Persist Security Info = False; ";
}
private void HWapp_Load(object sender, EventArgs e)
{
try
{
connection.Open();
check_connection.Text = "Database Connection Succesful!";
connection.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error " + ex);
}
}
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
new PPAP_Selection().Show();
}
private void button_submit_Click(object sender, EventArgs e)
{
try
{
connection.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connection;
command.CommandText = "Insert into PPAPdatabase ([PSW ID],[Part Name],[Part Number],[Part rev Level],[Drawing Number],[Drawing rev Level],[Comment (or Enovia No#)],[Supplier Name],[Date Created],[Owner],[Production Line],[Status],[Reason]) values('"+
txt_PSW_ID.Text +"','"+ txt_partname.Text +"','"+ txt_partnumber.Text +"', '"+ txt_partrevlvl.Text +"', '"+ txt_dwgnumber.Text +"', '"+ txt_dwgrev.Text +"', '"+ txt_comment.Text +"', '"+
txt_suppliername.Text +"','"+ dateTimePicker_datecreated.Text +"','"+ checkedListBox_owner.Text +"','"+ checkedListBox_prodline.Text +"', '"+ txt_status.Text + "', '"+ comboBox_PPAP.Text + "')";
command.ExecuteNonQuery();
MessageBox.Show("PPAP has been submitted");
connection.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error " + ex);
}
}
private void radioButton_lvl1_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton_lvl2_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton_lvl3_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton_lvl4_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton_lvl5_CheckedChanged(object sender, EventArgs e)
{
}
}
}
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- A fociról könnyedén, egy baráti társaságban
- Mibe tegyem a megtakarításaimat?
- Milyen RAM-ot vegyek?
- EarFun Air Pro 4+ – érdemi plusz
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Pánik a memóriapiacon
- Milyen okostelefont vegyek?
- iPhone topik
- Konzolokról KULTURÁLT módon
- További aktív témák...
- Gamer PC-Számítógép! Csere-Beszámítás! R5 8600G / 6700XT 12GB / 16GB DDR5 / 512 SSD + 2TB HDD!
- iPhone 16 PRO MAX 256GB natúr titán KÁRTYAFÜGGETLEN! Gyönyörű! Akkumlátor 99%! Fulldoboz!
- Antminer S21 Hydro 335T BTC bányász (BOS 360T) hibás hashboard-al eladó.
- ÚJ BONTATLAN Apple Watch Series S9 41mm Pink és Mid Azonnal Átvehető DEÁK TÉRNÉL 1 Év Apple Garancia
- Apple iPad Air 5. generáció/KÉK/64GB/M1/WIFI+Cellular/99% AKKU!!!!!
- MS SQL Server 2016, 2017, 2019
- GYÖNYÖRŰ iPhone 12 mini 128GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3464, 96% Akkumulátor
- Logitech G513 Carbon Tactile DE (3) (ELKELT)
- ÚJ Lenovo ThinkPad X13 Gen 5 - 13.3" WUXGA IPS - Ultra 5 135U - 16GB - 512GB - Win11 - 2,5 év gari
- HIBÁTLAN iPhone 14 Pro Max 128GB Purple -1 ÉV GARANCIA - Kártyafüggetlen, MS3918, 100% Akkumulátor
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


