Initial commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
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;
|
||||
|
||||
namespace StacjaProb
|
||||
{
|
||||
public partial class dictionariesAddForm : Form
|
||||
{
|
||||
public dictionariesAddForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void buttonSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBoxNewDic.TextLength>2)
|
||||
{
|
||||
mySqlFunctions.initConnection();
|
||||
if (mySqlFunctions.OpenConnection())
|
||||
{
|
||||
if (mySqlFunctions.sqlIntValue("select count(*) from sys_dictionaries where DIC_TYPE_ID=1 and DIC_POL_LANG='" + textBoxNewDic.Text + "'") == 0)
|
||||
{
|
||||
mySqlFunctions.Insert("INSERT INTO sys_dictionaries SET DIC_TYPE='DEV_RESOURCES',DIC_TYPE_ID=1,DIC_POL_LANG='" + textBoxNewDic.Text + "'");
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Wprowadzona wartość istnieje w systemie – wprowadź inną lub anuluj działanie.");
|
||||
}
|
||||
|
||||
mySqlFunctions.CloseConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user