- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Előrendelhető a OnePlus Pad 3
- Milyen billentyűzetet vegyek?
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Amazon Kindle
- Videós, mozgóképes topik
- RAM topik
- Milyen monitort vegyek?
- NVIDIA GeForce RTX 3080 / 3090 / Ti (GA102)
- Melyik tápegységet vegyem?
Ú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!
- AMD Ryzen 7 5700X processzor eladó /Garanciás/
- Xbox Series S + 2 kontroller
- Dell laptop eladó i5 11. gen, 8GB RAM, 512GB SSD, újszerű állapotban!
- Bomba ár! HP EliteBook Folio 1040 G1 - i5-G4 I 8GB I 256GB SSD I 14" HD+ I Cam I W10 I Garancia!
- Bomba ár! HP Elitebook Folio 9470M - i5-3GEN I 8GB I 256GB SSD I 14" I DP I Cam I W10 I Garancia!
- 123 - Lenovo Legion Pro 5 (16ARX8) - AMD Ryzen 7 7745HX, RTX 4070 (48 hónap garancia!)
- Apple iPhone 14 128GB, Kártyafüggetlen, 1 Év Garanciával
- LG 65" C1 OLED - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox Ready!
- Bomba ár! Lenovo ThinkPad E550 - i5-5GEN I 8GB I 256SSD I DVDRW I 15,6" HD I CAM I W10 I Garancia
- LG 65C2 - 65" OLED evo - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox!
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft
Város: Budapest
Cég: PC Trade Systems Kft.
Város: Szeged