New version 1.005

This commit is contained in:
Culak-HP\Culak
2020-10-20 19:32:25 +02:00
parent 97ce618df7
commit 9caf446fe0
26 changed files with 2067 additions and 673 deletions

Binary file not shown.

View File

@@ -294,6 +294,12 @@
<Compile Include="frmTlacitStatistiku.Designer.cs"> <Compile Include="frmTlacitStatistiku.Designer.cs">
<DependentUpon>frmTlacitStatistiku.cs</DependentUpon> <DependentUpon>frmTlacitStatistiku.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="frmVybratTypVyhodnotenia.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmVybratTypVyhodnotenia.Designer.cs">
<DependentUpon>frmVybratTypVyhodnotenia.cs</DependentUpon>
</Compile>
<Compile Include="frmVydajZoSkladu.cs"> <Compile Include="frmVydajZoSkladu.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -372,9 +378,6 @@
<EmbeddedResource Include="frmPridatEditovatNastroj.resx"> <EmbeddedResource Include="frmPridatEditovatNastroj.resx">
<DependentUpon>frmPridatEditovatNastroj.cs</DependentUpon> <DependentUpon>frmPridatEditovatNastroj.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmPridatNastrojeDoSkladu.resx">
<DependentUpon>frmPridatNastrojeDoSkladu.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPrijemDoSkladu.resx"> <EmbeddedResource Include="frmPrijemDoSkladu.resx">
<DependentUpon>frmPrijemDoSkladu.cs</DependentUpon> <DependentUpon>frmPrijemDoSkladu.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -404,6 +407,9 @@
<EmbeddedResource Include="frmTlacitStatistiku.resx"> <EmbeddedResource Include="frmTlacitStatistiku.resx">
<DependentUpon>frmTlacitStatistiku.cs</DependentUpon> <DependentUpon>frmTlacitStatistiku.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmVybratTypVyhodnotenia.resx">
<DependentUpon>frmVybratTypVyhodnotenia.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmVydajZoSkladu.resx"> <EmbeddedResource Include="frmVydajZoSkladu.resx">
<DependentUpon>frmVydajZoSkladu.cs</DependentUpon> <DependentUpon>frmVydajZoSkladu.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

Binary file not shown.

Binary file not shown.

View File

@@ -26,14 +26,14 @@ namespace Mip
foreach (System.IO.FileInfo file in adresar.GetFiles()) file.Delete(); foreach (System.IO.FileInfo file in adresar.GetFiles()) file.Delete();
foreach (System.IO.DirectoryInfo subDirectory in adresar.GetDirectories()) subDirectory.Delete(true); foreach (System.IO.DirectoryInfo subDirectory in adresar.GetDirectories()) subDirectory.Delete(true);
//AddPathProtection(TempPath); AddPathProtection(TempPath);
} }
// adresar neexistuje - vytvorenie // adresar neexistuje - vytvorenie
else else
{ {
Directory.CreateDirectory(TempPath); Directory.CreateDirectory(TempPath);
//AddPathProtection(TempPath); AddPathProtection(TempPath);
} }
} }

View File

@@ -25,7 +25,7 @@ namespace Mip
public static void CreateRamDisk() public static void CreateRamDisk()
{ {
classDiskOperations.CreatePath(); classDiskOperations.CreatePath();
//classDiskOperations.RemoveCurrentUserProtecion(classDiskOperations.TempPath); classDiskOperations.RemoveCurrentUserProtecion(classDiskOperations.TempPath);
classDiskOperations.MapDrive(Disk, classDiskOperations.TempPath); classDiskOperations.MapDrive(Disk, classDiskOperations.TempPath);
} }
@@ -37,11 +37,9 @@ namespace Mip
public static void DeleteRamDisk() public static void DeleteRamDisk()
{ {
string TempPath = Application.StartupPath + @"\MipTemp";
classDiskOperations.CreatePath(); classDiskOperations.CreatePath();
classDiskOperations.UnmapDrive(Disk); classDiskOperations.UnmapDrive(Disk);
classDiskOperations.RemovePath(TempPath); classDiskOperations.AddCurrentUserProtecion(classDiskOperations.TempPath);
//classDiskOperations.AddCurrentUserProtecion(classDiskOperations.TempPath);
} }
@@ -497,7 +495,8 @@ namespace Mip
IPaddress = "192.168.1.12"; //IP Adresa MariaDB pre VLAN1 IPaddress = "192.168.1.12"; //IP Adresa MariaDB pre VLAN1
//ked sa programuje mino firmu aby to hned naslo staticku ip //ked sa programuje mino firmu aby to hned naslo staticku ip
IPaddress = "87.197.164.107"; //IPaddress = "87.197.164.107";
pingReply = pingIP.Send(IPaddress); pingReply = pingIP.Send(IPaddress);
if (pingReply.Status.ToString() == "Success") if (pingReply.Status.ToString() == "Success")
{ {
@@ -653,15 +652,16 @@ namespace Mip
break; break;
case "Ziadanka-zobrazit vsetky": case "Ziadanka-zobrazit vsetky":
switch (_IDUSER) switch(_IDUSER)
{ {
case 1: case 1:
case 4: case 4:
case 6:
case 9: case 9:
case 13: case 13:
case 26:
case 28: case 28:
case 29: case 29:
case 30:
bReturnValue = true; bReturnValue = true;
break; break;
@@ -677,7 +677,6 @@ namespace Mip
{ {
case 1: case 1:
case 4: case 4:
case 6:
case 9: case 9:
case 13: case 13:
case 24: case 24:
@@ -711,7 +710,7 @@ namespace Mip
} }
break; break;
default: default :
bReturnValue = false; bReturnValue = false;
break; break;

View File

@@ -316,7 +316,7 @@ namespace Mip
if (MariaDBConnection != null) if (MariaDBConnection != null)
MariaDBConnection.Close(); MariaDBConnection.Close();
string connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling=false", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013"); string connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling={4}; default command timeout={5};", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013", "false", "3000");
MariaDBConnection = new MySqlConnection(connStr); MariaDBConnection = new MySqlConnection(connStr);
try try
{ {
@@ -335,7 +335,7 @@ namespace Mip
if (dr == DialogResult.Yes) if (dr == DialogResult.Yes)
{ {
classGlobal.SetServerIP(); classGlobal.SetServerIP();
connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling=false", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013"); connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling={4}; default command timeout={5};", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013", "false", "3000");
MariaDBConnection = new MySqlConnection(connStr); MariaDBConnection = new MySqlConnection(connStr);
try try
{ {
@@ -370,6 +370,15 @@ namespace Mip
private static void MariaDBCommand(string Command, bool Zistipocet) private static void MariaDBCommand(string Command, bool Zistipocet)
{ {
//koli zrychleniu je nastavene limit 500
string cmd = Command.ToString();
if (cmd.Substring(0, 6).ToUpper() == "SELECT")
{
if (cmd.EndsWith(";")) cmd = cmd.Remove(cmd.Length - 1, 1) + " LIMIT " + classUser.LimitSqlPrikazu.ToString() + ";";
else cmd = cmd + " LIMIT " + classUser.LimitSqlPrikazu.ToString() + ";";
}
Command = cmd;
try try
{ {
DataTable celkovypocet = new DataTable(); DataTable celkovypocet = new DataTable();

View File

@@ -27,6 +27,7 @@ namespace Mip
public static Int32 IndexChat; public static Int32 IndexChat;
public static Int32 IndexNacenovanie; public static Int32 IndexNacenovanie;
public static Int32 IndexPoziadavka; public static Int32 IndexPoziadavka;
public static Int32 LimitSqlPrikazu;
//public static Int32 IndexEXP; //public static Int32 IndexEXP;
public static Int32 IndexZoznamVyrobkov; public static Int32 IndexZoznamVyrobkov;
public static string strLastSelect; public static string strLastSelect;

View File

@@ -53,7 +53,6 @@ namespace Mip
classUser.Tab = Convert.ToInt32( myDrow[5]); classUser.Tab = Convert.ToInt32( myDrow[5]);
classUser.Zaradenie = myDrow[7].ToString(); classUser.Zaradenie = myDrow[7].ToString();
this.Hide(); //Kontrola hesla this.Hide(); //Kontrola hesla
} }
else else

940
Mip/frmMain.Designer.cs generated

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,8 @@ namespace Mip
public partial class frmMain : Form public partial class frmMain : Form
{ {
bool odblokuj=false; //bool odblokuj=false;
int rowIndex = -1;
public frmMain() public frmMain()
{ {
@@ -42,11 +43,8 @@ namespace Mip
tabSpecifikaciaMain.Columns.Add("Dáta špecifikácie", typeof(System.String)); tabSpecifikaciaMain.Columns.Add("Dáta špecifikácie", typeof(System.String));
tabSpecifikaciaMain.Columns.Add("Brúsiteľný", typeof(System.Boolean)); tabSpecifikaciaMain.Columns.Add("Brúsiteľný", typeof(System.Boolean));
tabSpecifikaciaMain.Columns.Add("Vymazaný", typeof(System.Boolean)); tabSpecifikaciaMain.Columns.Add("Vymazaný", typeof(System.Boolean));
} }
#region kalkulacka #region kalkulacka
private void button5_Click(object sender, EventArgs e) private void button5_Click(object sender, EventArgs e)
@@ -1936,34 +1934,35 @@ namespace Mip
{ {
DataTable tblUsers = new DataTable(); DataTable tblUsers = new DataTable();
classSQL.SQL("SELECT * from tabusers ORDER BY priezvisko", out tblUsers); classSQL.SQL("SELECT * from tabusers where `IDUsers` > 2 ORDER BY priezvisko", out tblUsers);
//classSQL.dTable = tblUsers; //classSQL.dTable = tblUsers;
dataGridView2.DataSource = tblUsers; dataGridView2.DataSource = tblUsers;
dataGridView2.Columns["IDUsers"].HeaderText = "Id užívateľa"; dataGridView2.Columns["IDUsers"].Visible = false;
dataGridView2.Columns["IDUsers"].ReadOnly = true; dataGridView2.ClearSelection();
odblokuj = true; if(rowIndex > 0)dataGridView2.Rows[rowIndex].Selected = true;
//odblokuj = true;
} }
private void dataGridView2_CellValueChanged(object sender, DataGridViewCellEventArgs e) //private void dataGridView2_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{ //{
string c; // string c;
if (odblokuj) // if (odblokuj)
{ // {
c = "UPDATE `mip`.`tabusers` SET `" // c = "UPDATE `mip`.`tabusers` SET `"
+ dataGridView2.Columns[e.ColumnIndex].Name.ToString() // + dataGridView2.Columns[e.ColumnIndex].Name.ToString()
+ "` = " // + "` = "
+ dataGridView2.CurrentCell.Value.ToString() // + dataGridView2.CurrentCell.Value.ToString()
+ " WHERE `IDUsers`=" // + " WHERE `IDUsers`="
+ dataGridView2.Rows[e.RowIndex].Cells["IDUsers"].Value.ToString() // + dataGridView2.Rows[e.RowIndex].Cells["IDUsers"].Value.ToString()
+ ";"; // + ";";
classSQL.SQL(c); // classSQL.SQL(c);
} // }
} //}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
@@ -1973,15 +1972,27 @@ namespace Mip
private void btnPridatUzivatela_Click(object sender, EventArgs e) private void btnPridatUzivatela_Click(object sender, EventArgs e)
{ {
string cmd = "";
Int32 lastUserInsert;
cmd = @"INSERT INTO `mip`.`tabusers` (`Meno`, `Priezvisko`, `OnlineStatus`, `PristupovePrava`, `Status`, `Zaradenie`) VALUES ('NoveMeno', '', 'Offline', 0, 'Neaktívny', 'Administratíva');";
classSQL.SQL(cmd,out lastUserInsert);
btnObnovit_Click(null, null);
dataGridView2.ClearSelection();
dataGridView2.Rows[0].Selected = true;
/* textBox46.Text = dataGridView2.SelectedRows[0].Cells["Meno"].Value.ToString();
DataTable table = System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources(); textBox47.Text = dataGridView2.SelectedRows[0].Cells["Priezvisko"].Value.ToString();
foreach (DataRow server in table.Rows) textBox48.Text = dataGridView2.SelectedRows[0].Cells["Titul"].Value.ToString();
{ textBox49.Text = dataGridView2.SelectedRows[0].Cells["Heslo"].Value.ToString();
comboBox1.Items.Add(server[table.Columns["ServerName"]]); label221.Text = dataGridView2.SelectedRows[0].Cells["OnlineStatus"].Value.ToString();
} label222.Text = dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString();
*/ label223.Text = dataGridView2.SelectedRows[0].Cells["Zaradenie"].Value.ToString();
label225.Text = dataGridView2.SelectedRows[0].Cells["PristupovePrava"].Value.ToString();
if (dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString() == "Aktívny") panel73.BackColor = Color.MintCream;
if (dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString() == "Neaktívny") panel73.BackColor = Color.MistyRose;
converToBoolArray(label225.Text);
rowIndex = dataGridView2.SelectedRows[0].Index;
} }
private void btnExportFrm_Click(object sender, EventArgs e) private void btnExportFrm_Click(object sender, EventArgs e)
@@ -2003,6 +2014,34 @@ namespace Mip
classSQL.SQL("SELECT `NazovSuboru`,`PoznamkaFormulara`,`IDFormulara` FROM `tabformular`", out globNastaveniadtbl); classSQL.SQL("SELECT `NazovSuboru`,`PoznamkaFormulara`,`IDFormulara` FROM `tabformular`", out globNastaveniadtbl);
dataGridView9.DataSource = globNastaveniadtbl; dataGridView9.DataSource = globNastaveniadtbl;
ToolTip toolTip1 = new ToolTip();
toolTip1.AutoPopDelay = 7000;
toolTip1.InitialDelay = 150;
toolTip1.ReshowDelay = 100;
toolTip1.ShowAlways = true;
toolTip1.SetToolTip(this.checkBox74, "Dopyty");
toolTip1.SetToolTip(this.checkBox75, "Zoznam výrobkov");
toolTip1.SetToolTip(this.checkBox76, "Výdaj materiálu");
toolTip1.SetToolTip(this.checkBox79, "Riadenie výroby");
toolTip1.SetToolTip(this.checkBox78, "Skladové operácie");
toolTip1.SetToolTip(this.checkBox77, "Expedícia");
toolTip1.SetToolTip(this.checkBox82, "Kategorizácia zmätkovitosti");
toolTip1.SetToolTip(this.checkBox81, "Zmätkovitosť");
toolTip1.SetToolTip(this.checkBox80, "Nastavenia");
toolTip1.SetToolTip(this.checkBox85, "Zoznam Strojov");
toolTip1.SetToolTip(this.checkBox84, "Údržby a opravy");
toolTip1.SetToolTip(this.checkBox83, "Naceňovanie");
toolTip1.SetToolTip(this.checkBox88, "Vyhodnocovanie");
toolTip1.SetToolTip(this.checkBox87, "Zoznam firiem");
toolTip1.SetToolTip(this.checkBox86, "Nástroje");
toolTip1.SetToolTip(this.checkBox94, "Výkresy");
toolTip1.SetToolTip(this.checkBox93, "Sklad");
toolTip1.SetToolTip(this.checkBox92, "Požiadavky/Pripomienky");
toolTip1.SetToolTip(this.checkBox91, "Žiadankový systém");
toolTip1.SetToolTip(this.checkBox90, "Evidencia brúsených nástrojov");
toolTip1.SetToolTip(this.checkBox89, "Zatiaľ nepridelené");
} }
@@ -2093,11 +2132,6 @@ namespace Mip
private void frmMain_FormClosed(object sender, FormClosedEventArgs e) private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
{ {
/*
string TempPath = Application.StartupPath + @"\MipTemp";
classDiskOperations.UnmapDrive('W');
classDiskOperations.RemovePath(TempPath);
*/
classSQL.SQL("UPDATE `mip`.`tabusers` SET `OnlineStatus`='Offline' WHERE `IDUsers`=" + classUser.ID + ";"); classSQL.SQL("UPDATE `mip`.`tabusers` SET `OnlineStatus`='Offline' WHERE `IDUsers`=" + classUser.ID + ";");
//classSQL.commandSQL("UPDATE `mip`.`tabusers` SET `OnlineStatus`='Offline' WHERE `IDUsers`=" + classUser.ID + ";"); //classSQL.commandSQL("UPDATE `mip`.`tabusers` SET `OnlineStatus`='Offline' WHERE `IDUsers`=" + classUser.ID + ";");
eventWatcher.Stop(); eventWatcher.Stop();
@@ -2112,6 +2146,7 @@ namespace Mip
this.Location = new Point(5, 5); this.Location = new Point(5, 5);
classGlobal.SetServerIP(); classGlobal.SetServerIP();
classUser.LimitSqlPrikazu = Convert.ToInt32(numericUpDown40.Value);
if(classUser.MariaDBServerIPAddress != "0.0.0.0") if(classUser.MariaDBServerIPAddress != "0.0.0.0")
{ {
@@ -2140,7 +2175,7 @@ namespace Mip
Timer refreshZistiNovuSpravu = new Timer(); Timer refreshZistiNovuSpravu = new Timer();
private void ZistiNovuSpravu(object sender, EventArgs e) private void ZistiNovuSpravu(object sender, EventArgs e)
{ {
if (refreshZistiNovuSpravu.Interval == 10000) if (refreshZistiNovuSpravu.Interval == 20000)
{ {
panel4.Visible = false; panel4.Visible = false;
@@ -2180,6 +2215,7 @@ namespace Mip
private void frmMain_Shown(object sender, EventArgs e) private void frmMain_Shown(object sender, EventArgs e)
{ {
if (classUser.ID == 1 || classUser.ID == 2) numericUpDown40.Value = 100;
/////////////////////////// zobrazenie povolenych zaloziek usera v tabcontroll //////////////////////////////////////////// /////////////////////////// zobrazenie povolenych zaloziek usera v tabcontroll ////////////////////////////////////////////
int p1,p2,p3; // p1 pocitadlo cyklu, p2 - pocet zaloziek, p3 - ukazovatel na aktualnu zalozku int p1,p2,p3; // p1 pocitadlo cyklu, p2 - pocet zaloziek, p3 - ukazovatel na aktualnu zalozku
Int32 intMaska; Int32 intMaska;
@@ -2460,9 +2496,9 @@ namespace Mip
TextBox lTextBox = new TextBox(); TextBox lTextBox = new TextBox();
lTextBox.Size = new Size(lPocetKusov.Size.Width + 47, 20); lTextBox.Size = new Size(lPocetKusov.Size.Width + 47, 20);
lTextBox.Location = new Point(1, lPocetKusov.Size.Height - 7); lTextBox.Location = new Point(1, lPocetKusov.Size.Height - 7);
lTextBox.TextChanged += new EventHandler(ltext);
if (dGVVydajMat.Rows[eRI].Cells["PocetVydKusov"].Value.ToString() == "") lTextBox.Text = dGVVydajMat.Rows[eRI].Cells["PocetDoVyroby"].Value.ToString(); if (dGVVydajMat.Rows[eRI].Cells["PocetVydKusov"].Value.ToString() == "") lTextBox.Text = dGVVydajMat.Rows[eRI].Cells["PocetDoVyroby"].Value.ToString();
else lTextBox.Text = dGVVydajMat.Rows[eRI].Cells["PocetVydKusov"].Value.ToString(); else lTextBox.Text = dGVVydajMat.Rows[eRI].Cells["PocetVydKusov"].Value.ToString();
lTextBox.TextChanged += new EventHandler(ltext);
lTextBox.KeyPress += new KeyPressEventHandler(ltextkeypress); lTextBox.KeyPress += new KeyPressEventHandler(ltextkeypress);
lButton = new Button(); lButton = new Button();
@@ -2486,7 +2522,7 @@ namespace Mip
pPocetKusov.Controls.Add(lTextBox); pPocetKusov.Controls.Add(lTextBox);
pPocetKusov.Controls.Add(lButton); pPocetKusov.Controls.Add(lButton);
this.Controls.Add(pPocetKusov); this.Controls.Add(pPocetKusov);
lButton.Focus(); lTextBox.Focus();
lButton.Click += new EventHandler(SaveClosePanel); lButton.Click += new EventHandler(SaveClosePanel);
@@ -5342,78 +5378,76 @@ namespace Mip
private void dataGridView3_Paint(object sender, PaintEventArgs e) private void dataGridView3_Paint(object sender, PaintEventArgs e)
{ {
if(dataGridView3.DataSource != null) dataGridView3.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGridView3.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGridView3.Columns["StatusDopytu"].HeaderText = "Status dopytu";
dataGridView3.Columns["StatusDopytu"].Visible = false;
dataGridView3.Columns["PocetZmatkov"].HeaderText = "Počet zmätkov";
dataGridView3.Columns["DatumZaznamu"].HeaderText = "Dátum záznamu";
dataGridView3.Columns["StatusZaznamu"].HeaderText = "Status záznamu";
dataGridView3.Columns["Impregnacia"].HeaderText = "Impregnácia";
dataGridView3.Columns["KontrolaLapovanie"].HeaderText = "Kontrola a lapovanie";
dataGridView3.Columns["ChybyMaterialu"].HeaderText = "Chyby materiálu";
dataGridView3.Columns["IDZmatky"].Visible = false;
dataGridView3.Columns["IDCPOBJ"].Visible = false;
dataGridView3.Columns["IDVyrobok"].Visible = false;
//nastavenie velkosti stlpcov
dataGridView3.Columns["Zákazkové číslo"].Width = 62;
dataGridView3.Columns["Názov výrobku"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Spojené rozmery"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Materiál"].MinimumWidth = 60;
dataGridView3.Columns["Materiál"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Úprava materiálu"].MinimumWidth = 60;
dataGridView3.Columns["Úprava materiálu"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Zákazník"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Objednaný počet kusov"].Width = 60;
dataGridView3.Columns["Počet kusov do výroby"].Width = 60;
dataGridView3.Columns["Počet vydaných kusov"].Width = 60;
dataGridView3.Columns["Počet vyrobených dobrých kusov"].Width = 64;
dataGridView3.Columns["PocetZmatkov"].Width = 60;
dataGridView3.Columns["Počet odoslaných kusov"].Width = 64;
dataGridView3.Columns["Počet kusov na sklad"].Width = 60;
dataGridView3.Columns["DatumZaznamu"].Width = 70;
dataGridView3.Columns["StatusZaznamu"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Rezanie"].Width = 70;
dataGridView3.Columns["Klasika"].Width = 70;
dataGridView3.Columns["Impregnacia"].Width = 70;
dataGridView3.Columns["CNC"].Width = 70;
dataGridView3.Columns["KontrolaLapovanie"].Width = 70;
dataGridView3.Columns["ChybyMaterialu"].Width = 70;
if (button80.Text == "Zobrazenie (min)")
{ {
dataGridView3.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView3.Columns["Názov výrobku"].Visible = true;
dataGridView3.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView3.Columns["Spojené rozmery"].Visible = true;
dataGridView3.Columns["StatusDopytu"].HeaderText = "Status dopytu"; dataGridView3.Columns["Zákazník"].Visible = true;
dataGridView3.Columns["StatusDopytu"].Visible = false; dataGridView3.Columns["Objednaný počet kusov"].Visible = true;
dataGridView3.Columns["PocetZmatkov"].HeaderText = "Počet zmätkov"; dataGridView3.Columns["Počet kusov do výroby"].Visible = true;
dataGridView3.Columns["DatumZaznamu"].HeaderText = "Dátum záznamu"; dataGridView3.Columns["Počet vydaných kusov"].Visible = true;
dataGridView3.Columns["StatusZaznamu"].HeaderText = "Status záznamu"; dataGridView3.Columns["Počet vyrobených dobrých kusov"].Visible = true;
dataGridView3.Columns["Impregnacia"].HeaderText = "Impregnácia"; dataGridView3.Columns["Počet odoslaných kusov"].Visible = true;
dataGridView3.Columns["KontrolaLapovanie"].HeaderText = "Kontrola a lapovanie"; dataGridView3.Columns["Počet kusov na sklad"].Visible = true;
dataGridView3.Columns["ChybyMaterialu"].HeaderText = "Chyby materiálu"; dataGridView3.Columns["DatumZaznamu"].Visible = true;
dataGridView3.Columns["StatusZaznamu"].Visible = true;
dataGridView3.Columns["IDZmatky"].Visible = false;
dataGridView3.Columns["IDCPOBJ"].Visible = false;
dataGridView3.Columns["IDVyrobok"].Visible = false;
//nastavenie velkosti stlpcov
dataGridView3.Columns["Zákazkové číslo"].Width = 62;
dataGridView3.Columns["Názov výrobku"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Spojené rozmery"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Materiál"].MinimumWidth = 60;
dataGridView3.Columns["Materiál"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Úprava materiálu"].MinimumWidth = 60;
dataGridView3.Columns["Úprava materiálu"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Zákazník"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Objednaný počet kusov"].Width = 60;
dataGridView3.Columns["Počet kusov do výroby"].Width = 60;
dataGridView3.Columns["Počet vydaných kusov"].Width = 60;
dataGridView3.Columns["Počet vyrobených dobrých kusov"].Width = 64;
dataGridView3.Columns["PocetZmatkov"].Width = 60;
dataGridView3.Columns["Počet odoslaných kusov"].Width = 64;
dataGridView3.Columns["Počet kusov na sklad"].Width = 60;
dataGridView3.Columns["DatumZaznamu"].Width = 70;
dataGridView3.Columns["StatusZaznamu"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
dataGridView3.Columns["Rezanie"].Width = 70;
dataGridView3.Columns["Klasika"].Width = 70;
dataGridView3.Columns["Impregnacia"].Width = 70;
dataGridView3.Columns["CNC"].Width = 70;
dataGridView3.Columns["KontrolaLapovanie"].Width = 70;
dataGridView3.Columns["ChybyMaterialu"].Width = 70;
if (button80.Text == "Zobrazenie (min)")
{
dataGridView3.Columns["Názov výrobku"].Visible = true;
dataGridView3.Columns["Spojené rozmery"].Visible = true;
dataGridView3.Columns["Zákazník"].Visible = true;
dataGridView3.Columns["Objednaný počet kusov"].Visible = true;
dataGridView3.Columns["Počet kusov do výroby"].Visible = true;
dataGridView3.Columns["Počet vydaných kusov"].Visible = true;
dataGridView3.Columns["Počet vyrobených dobrých kusov"].Visible = true;
dataGridView3.Columns["Počet odoslaných kusov"].Visible = true;
dataGridView3.Columns["Počet kusov na sklad"].Visible = true;
dataGridView3.Columns["DatumZaznamu"].Visible = true;
dataGridView3.Columns["StatusZaznamu"].Visible = true;
}
else
{
dataGridView3.Columns["Názov výrobku"].Visible = false;
dataGridView3.Columns["Spojené rozmery"].Visible = false;
dataGridView3.Columns["Zákazník"].Visible = false;
dataGridView3.Columns["Objednaný počet kusov"].Visible = false;
dataGridView3.Columns["Počet kusov do výroby"].Visible = false;
dataGridView3.Columns["Počet vydaných kusov"].Visible = false;
dataGridView3.Columns["Počet vyrobených dobrých kusov"].Visible = false;
dataGridView3.Columns["Počet odoslaných kusov"].Visible = false;
dataGridView3.Columns["Počet kusov na sklad"].Visible = false;
dataGridView3.Columns["DatumZaznamu"].Visible = false;
dataGridView3.Columns["StatusZaznamu"].Visible = false;
}
} }
else
{
dataGridView3.Columns["Názov výrobku"].Visible = false;
dataGridView3.Columns["Spojené rozmery"].Visible = false;
dataGridView3.Columns["Zákazník"].Visible = false;
dataGridView3.Columns["Objednaný počet kusov"].Visible = false;
dataGridView3.Columns["Počet kusov do výroby"].Visible = false;
dataGridView3.Columns["Počet vydaných kusov"].Visible = false;
dataGridView3.Columns["Počet vyrobených dobrých kusov"].Visible = false;
dataGridView3.Columns["Počet odoslaných kusov"].Visible = false;
dataGridView3.Columns["Počet kusov na sklad"].Visible = false;
dataGridView3.Columns["DatumZaznamu"].Visible = false;
dataGridView3.Columns["StatusZaznamu"].Visible = false;
}
} }
@@ -6531,7 +6565,7 @@ namespace Mip
{ {
if (dataGridView7.SelectedRows.Count > 0) if (dataGridView7.SelectedRows.Count > 0)
{ {
if(classUser.ID == 1 || classUser.ID == 4 || classUser.ID == 6) if(classUser.ID == 1 || classUser.ID == 4)
{ {
Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), true, false, true, true, true, true); Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), true, false, true, true, true, true);
frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie"; frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
@@ -6550,7 +6584,7 @@ namespace Mip
private void dataGridView7_CellDoubleClick(object sender, DataGridViewCellEventArgs e) private void dataGridView7_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{ {
if (classUser.ID == 1 || classUser.ID == 4 || classUser.ID == 6) if (classUser.ID == 1 || classUser.ID == 4)
{ {
Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), true, false, true, true, true, true); Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), true, false, true, true, true, true);
frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie"; frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
@@ -9223,26 +9257,30 @@ string editDateRV;
private void button181_Click(object sender, EventArgs e) private void button181_Click(object sender, EventArgs e)
{ {
if (dataGridView10.SelectedRows.Count >= 0) Form frmNacenovanie2 = new frmVybratTypVyhodnotenia();
{ frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
if (classUser.ID == 1 || classUser.ID == 4 || classUser.ID == 6) frmNacenovanie2.ShowDialog();
{
Form frmNacenovanie2 = new frmNacenovanie(10, 10, true, true, true, true, true, true);
frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
frmNacenovanie2.ShowDialog();
}
else
{
Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), false, false, false, false, true, false);
frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
frmNacenovanie2.ShowDialog();
}
} //if (dataGridView10.SelectedRows.Count >= 0)
refreshNacenovanie(); //{
} // if (classUser.ID == 1 || classUser.ID == 4)
// {
// Form frmNacenovanie2 = new frmNacenovanie(10, 10, true, true, true, true, true, true);
// frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
// frmNacenovanie2.ShowDialog();
// }
// else
// {
// Form frmNacenovanie2 = new frmNacenovanie(Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDNacenovanie"].Value), Convert.ToInt32(dataGridView7.SelectedRows[0].Cells["IDVyrobokNac"].Value), false, false, false, false, true, false);
// frmNacenovanie2.Text = "Naceňovanie - vyhodnocovanie";
// frmNacenovanie2.ShowDialog();
// }
private void label182_Click(object sender, EventArgs e) //}
//refreshNacenovanie();
}
private void label182_Click(object sender, EventArgs e)
{ {
panel68.Size = new Size(36, 35); panel68.Size = new Size(36, 35);
panel68.Location = new Point(this.Size.Width - 45, panel68.Location.Y); panel68.Location = new Point(this.Size.Width - 45, panel68.Location.Y);
@@ -9276,6 +9314,95 @@ string editDateRV;
refreshSegment(numericUpDown37.Value, numericUpDown38.Value, numericUpDown39.Value); refreshSegment(numericUpDown37.Value, numericUpDown38.Value, numericUpDown39.Value);
} }
private void numericUpDown40_ValueChanged(object sender, EventArgs e)
{
classUser.LimitSqlPrikazu = Convert.ToInt32(numericUpDown40.Value);
}
private void button194_Click(object sender, EventArgs e)
{
if (grboxFormulare.Enabled == false) grboxFormulare.Enabled = true;
else grboxFormulare.Enabled = false;
}
private void textBox45_TextChanged(object sender, EventArgs e)
{
string password = "3";
if (textBox45.Text == password) button194.Enabled = true;
else
{
button194.Enabled = false;
grboxFormulare.Enabled = false;
}
}
private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
{
textBox46.Text = dataGridView2.SelectedRows[0].Cells["Meno"].Value.ToString();
textBox47.Text = dataGridView2.SelectedRows[0].Cells["Priezvisko"].Value.ToString();
textBox48.Text = dataGridView2.SelectedRows[0].Cells["Titul"].Value.ToString();
textBox49.Text = dataGridView2.SelectedRows[0].Cells["Heslo"].Value.ToString();
label221.Text = dataGridView2.SelectedRows[0].Cells["OnlineStatus"].Value.ToString();
label222.Text = dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString();
label223.Text = dataGridView2.SelectedRows[0].Cells["Zaradenie"].Value.ToString();
label225.Text = dataGridView2.SelectedRows[0].Cells["PristupovePrava"].Value.ToString();
if (dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString() == "Aktívny") panel73.BackColor = Color.MintCream;
if (dataGridView2.SelectedRows[0].Cells["Status"].Value.ToString() == "Neaktívny") panel73.BackColor = Color.MistyRose;
converToBoolArray(label225.Text);
rowIndex = dataGridView2.SelectedRows[0].Index;
}
private void converToBoolArray(string text)
{
string heslo = ToBin(Convert.ToInt32(text), 20);
bool[] hesloArray = heslo.Select(c => c == '1').ToArray();
checkBox74.Checked = hesloArray[19];
checkBox75.Checked = hesloArray[18];
checkBox76.Checked = hesloArray[17];
checkBox79.Checked = hesloArray[16];
checkBox78.Checked = hesloArray[15];
checkBox77.Checked = hesloArray[14];
checkBox82.Checked = hesloArray[13];
checkBox81.Checked = hesloArray[12];
checkBox80.Checked = hesloArray[11];
checkBox85.Checked = hesloArray[10];
checkBox84.Checked = hesloArray[9];
checkBox83.Checked = hesloArray[8];
checkBox88.Checked = hesloArray[7];
checkBox87.Checked = hesloArray[6];
checkBox86.Checked = hesloArray[5];
checkBox94.Checked = hesloArray[4];
checkBox93.Checked = hesloArray[3];
checkBox92.Checked = hesloArray[2];
checkBox91.Checked = hesloArray[1];
checkBox90.Checked = hesloArray[0];
checkBox89.Checked = false;
}
private string convertToBinary(bool[] array)
{
byte[] bitArray = (from x in array select x ? (byte)0x1 : (byte)0x0).ToArray();
string returnString = "";
for (int i = bitArray.Length - 1; i > -1; i--)
{
returnString += bitArray[i].ToString();
}
return returnString;
}
private string convertToInt(string binaryString)
{
return Convert.ToInt32(binaryString, 2).ToString();
}
public static string ToBin(int value, int len)
{
return (len > 1 ? ToBin(value >> 1, len - 1) : null) + "01"[value & 1];
}
private void button186_Click(object sender, EventArgs e) private void button186_Click(object sender, EventArgs e)
{ {
Form frmPridatNastrojeDoSkladu2 = new frmPridatNastrojeDoSkladu(); Form frmPridatNastrojeDoSkladu2 = new frmPridatNastrojeDoSkladu();
@@ -9317,7 +9444,7 @@ string editDateRV;
dataGridView21.DataSource = dvVoVyrobe; dataGridView21.DataSource = dvVoVyrobe;
dataGridView22.DataSource = dvVyradene; dataGridView22.DataSource = dvVyradene;
if(dataGridView21.Rows.Count == 0) if (dataGridView21.Rows.Count == 0)
{ {
button182.Enabled = false; button182.Enabled = false;
button185.Enabled = false; button185.Enabled = false;
@@ -9348,7 +9475,7 @@ string editDateRV;
private void dataGridView19_Paint(object sender, PaintEventArgs e) private void dataGridView19_Paint(object sender, PaintEventArgs e)
{ {
if(dataGridView19.DataSource != null) formatDGV(dataGridView19); if (dataGridView19.DataSource != null) formatDGV(dataGridView19);
} }
private void formatDGV(DataGridView dgv) private void formatDGV(DataGridView dgv)
@@ -9395,7 +9522,7 @@ string editDateRV;
private void dataGridView19_RowEnter(object sender, DataGridViewCellEventArgs e) private void dataGridView19_RowEnter(object sender, DataGridViewCellEventArgs e)
{ {
if(dataGridView19.SelectedRows.Count >0) infoNastroja(dataGridView19.SelectedRows[0]); if (dataGridView19.SelectedRows.Count > 0) infoNastroja(dataGridView19.SelectedRows[0]);
} }
private void infoNastroja(DataGridViewRow dgvr) private void infoNastroja(DataGridViewRow dgvr)
@@ -9445,8 +9572,19 @@ string editDateRV;
private void button184_Click(object sender, EventArgs e) private void button184_Click(object sender, EventArgs e)
{ {
if (panel70.Visible == false) panel70.Visible = true; if(dataGridView20.SelectedRows[0].Cells["Číslo nástroja"].Value.ToString() != "")
else panel70.Visible = false; {
Int32 index = Convert.ToInt32(dataGridView20.SelectedRows[0].Cells["Index brusenie"].Value.ToString());
string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vo výrobe', `Dátum zaradenia do výroby` = DATE(NOW()), `Číslo nástroja` = "
+ dataGridView20.SelectedRows[0].Cells["Číslo nástroja"].Value.ToString() + " where `Index brusenie` = " + index.ToString() + ";";
classSQL.SQL(cmd);
refreshEvidenciuBruseni();
}
else
{
if (panel70.Visible == false) panel70.Visible = true;
else panel70.Visible = false;
}
} }
private void button188_Click(object sender, EventArgs e) private void button188_Click(object sender, EventArgs e)
@@ -9466,7 +9604,7 @@ string editDateRV;
private void panel70_VisibleChanged(object sender, EventArgs e) private void panel70_VisibleChanged(object sender, EventArgs e)
{ {
if(panel70.Visible == true) if (panel70.Visible == true)
{ {
string cmd = ""; string cmd = "";
string typ = dataGridView20.SelectedRows[0].Cells["Typ"].Value.ToString(); string typ = dataGridView20.SelectedRows[0].Cells["Typ"].Value.ToString();
@@ -9519,21 +9657,24 @@ string editDateRV;
private void button189_Click(object sender, EventArgs e) private void button189_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("Naozaj vyradiť nástroj zo skladu?", "Vyradiť nástroj??", MessageBoxButtons.YesNo) == DialogResult.Yes)
Int32 index = Convert.ToInt32(dataGridView20.SelectedRows[0].Cells["Index brusenie"].Value.ToString()); {
string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vyradený', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";"; Int32 index = Convert.ToInt32(dataGridView20.SelectedRows[0].Cells["Index brusenie"].Value.ToString());
classSQL.SQL(cmd); string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vyradený', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";";
refreshEvidenciuBruseni(); classSQL.SQL(cmd);
refreshEvidenciuBruseni();
}
} }
private void button185_Click(object sender, EventArgs e) private void button185_Click(object sender, EventArgs e)
{ {
Int32 index = Convert.ToInt32(dataGridView21.SelectedRows[0].Cells["Index brusenie"].Value.ToString()); if (MessageBox.Show("Naozaj vyradiť nástroj číslo " + dataGridView21.SelectedRows[0].Cells["Číslo nástroja"].Value.ToString() + " z výroby?", "Vyradiť nástroj??", MessageBoxButtons.YesNo) == DialogResult.Yes)
string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vyradený', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";"; {
classSQL.SQL(cmd); Int32 index = Convert.ToInt32(dataGridView21.SelectedRows[0].Cells["Index brusenie"].Value.ToString());
refreshEvidenciuBruseni(); string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vyradený', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";";
classSQL.SQL(cmd);
refreshEvidenciuBruseni();
}
} }
private void button182_Click(object sender, EventArgs e) private void button182_Click(object sender, EventArgs e)
@@ -9566,7 +9707,7 @@ string editDateRV;
private void button190_Click(object sender, EventArgs e) private void button190_Click(object sender, EventArgs e)
{ {
if(dataGridView21.SelectedRows.Count != 0) if (dataGridView21.SelectedRows.Count != 0)
{ {
Int32 index = 0; Int32 index = 0;
Int32 pocet = 0; Int32 pocet = 0;
@@ -9652,19 +9793,6 @@ string editDateRV;
refreshEvidenciuBruseni(); refreshEvidenciuBruseni();
} }
private void button194_Click(object sender, EventArgs e)
{
if (grboxFormulare.Enabled == false) { grboxFormulare.Enabled = true; groupBox1.Enabled = true; }
else { grboxFormulare.Enabled = false; groupBox1.Enabled = false; }
}
private void textBox45_TextChanged(object sender, EventArgs e)
{
string password = "kompozitum2015";
if (textBox45.Text == password) button194.Enabled = true;
else button194.Enabled = false;
}
private void button195_Click(object sender, EventArgs e) private void button195_Click(object sender, EventArgs e)
{ {
//uložiť uzívateľa //uložiť uzívateľa
@@ -9677,12 +9805,12 @@ string editDateRV;
{ {
if (e.RowIndex != -1) if (e.RowIndex != -1)
{ {
if(bool_ZobrazVstupBruseniePoznamka == false) if (bool_ZobrazVstupBruseniePoznamka == false)
{ {
intBrusenieIndex = Convert.ToInt32(dataGridView20.Rows[e.RowIndex].Cells["Index brusenie"].Value); intBrusenieIndex = Convert.ToInt32(dataGridView20.Rows[e.RowIndex].Cells["Index brusenie"].Value);
PoznamkaText = dataGridView20.Rows[e.RowIndex].Cells["Poznámka"].Value.ToString(); PoznamkaText = dataGridView20.Rows[e.RowIndex].Cells["Poznámka"].Value.ToString();
bool_ZobrazVstupBruseniePoznamka = true; bool_ZobrazVstupBruseniePoznamka = true;
ZobrazVstupBruseniePoznamka(/*e.RowIndex*/); ZobrazVstupBruseniePoznamka(/*e.RowIndex*/);
} }
} }
@@ -9746,7 +9874,7 @@ string editDateRV;
{ {
string cmd = ""; string cmd = "";
cmd = "update `mip`.`tab-evidenciabruseni` SET `Poznámka` = '" + PoznamkaText + "' where `Index brusenie` = " + intBrusenieIndex.ToString() + ";"; cmd = "update `mip`.`tab-evidenciabruseni` SET `Poznámka` = '" + PoznamkaText + "' where `Index brusenie` = " + intBrusenieIndex.ToString() + ";";
classSQL.SQL(cmd); classSQL.SQL(cmd);
PoznamkaText = ""; PoznamkaText = "";
@@ -9818,5 +9946,226 @@ string editDateRV;
} }
} }
} }
private void dataGridView19_CellMouseClick(object sender, DataGridViewCellEventArgs e)
{
}
private void refreshPristup()
{
bool[] checkBoxValues =
{
checkBox74.Checked,
checkBox75.Checked,
checkBox76.Checked,
checkBox79.Checked,
checkBox78.Checked,
checkBox77.Checked,
checkBox82.Checked,
checkBox81.Checked,
checkBox80.Checked,
checkBox85.Checked,
checkBox84.Checked,
checkBox83.Checked,
checkBox88.Checked,
checkBox87.Checked,
checkBox86.Checked,
checkBox94.Checked,
checkBox93.Checked,
checkBox92.Checked,
checkBox91.Checked,
checkBox90.Checked
//checkBox89.Checked
};
label225.Text = convertToInt(convertToBinary(checkBoxValues));
}
private void checkBox75_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox76_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox79_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox78_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox77_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox82_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox81_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox80_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox85_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox84_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox83_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox88_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox87_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox86_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox94_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox93_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox92_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox91_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox90_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox89_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void checkBox74_Click(object sender, EventArgs e)
{
refreshPristup();
}
private void label222_Click(object sender, EventArgs e)
{
if (label222.Text == "Neaktívny")
{
label222.Text = "Aktívny";
panel73.BackColor = Color.MintCream;
}
else
{
label222.Text = "Neaktívny";
panel73.BackColor = Color.MistyRose;
}
}
private void label223_Click(object sender, EventArgs e)
{
if (label223.Text == "Administratíva") label223.Text = "Výroba";
else label223.Text = "Administratíva";
}
private void button195_Click_1(object sender, EventArgs e)
{
classSQL.SQL("UPDATE `mip`.`tabusers` SET `OnlineStatus`='Offline' WHERE `IDUsers`=" + classUser.ID + ";");
string cmd = "";
cmd = "UPDATE `mip`.`tabusers` SET "
+ "`Meno` = '" + textBox46.Text
+ "', `Priezvisko` = '" + textBox47.Text
+ "', `Titul` = '" + textBox48.Text
+ "', `Heslo` = '" + textBox49.Text
+ "', `OnlineStatus` = '" + label221.Text
+ "', `PristupovePrava` = " + label225.Text
+ ", `Status` = '" + label222.Text
+ "', `Zaradenie` = '" + label223.Text
+ "' WHERE `IDUsers` = " + dataGridView2.SelectedRows[0].Cells["IDUsers"].Value.ToString() + ";";
classSQL.SQL(cmd);
btnObnovit_Click(null, null);
}
private void textBox50_TextChanged(object sender, EventArgs e)
{
string password = "kompozitum2017";
if (textBox50.Text == password) button196.Enabled = true;
else
{
button196.Enabled = false;
groupBox1.Enabled = false;
panel73.Enabled = false;
}
}
private void button196_Click(object sender, EventArgs e)
{
if (groupBox1.Enabled == false) { groupBox1.Enabled = true; panel73.Enabled = true; if (dataGridView2.RowCount == 0) btnObnovit_Click(null, null); }
else { groupBox1.Enabled = false; panel73.Enabled = false; }
}
private void button197_Click(object sender, EventArgs e)
{
//vratit na sklad
if (dataGridView22.SelectedRows.Count > 0)
{
Int32 index = Convert.ToInt32(dataGridView22.SelectedRows[0].Cells["Index brusenie"].Value.ToString());
string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Na sklade', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";";
classSQL.SQL(cmd);
refreshEvidenciuBruseni();
}
}
private void button198_Click(object sender, EventArgs e)
{
//vratit do vyroby
if(dataGridView22.SelectedRows.Count > 0)
{
Int32 index = Convert.ToInt32(dataGridView22.SelectedRows[0].Cells["Index brusenie"].Value.ToString());
string cmd = "update `mip`.`tab-evidenciabruseni` SET `Status` = 'Vo výrobe', `Dátum` = DATE(NOW()) where `Index brusenie` = " + index.ToString() + ";";
classSQL.SQL(cmd);
refreshEvidenciuBruseni();
}
}
} }
} }

View File

@@ -1182,7 +1182,7 @@
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(1); this.panel1.Margin = new System.Windows.Forms.Padding(1);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(551, 130); this.panel1.Size = new System.Drawing.Size(1551, 130);
this.panel1.TabIndex = 20; this.panel1.TabIndex = 20;
// //
// panel19 // panel19
@@ -1443,7 +1443,7 @@
this.Výkres.Controls.Add(this.panel15); this.Výkres.Controls.Add(this.panel15);
this.Výkres.Controls.Add(this.panel105); this.Výkres.Controls.Add(this.panel105);
this.Výkres.Dock = System.Windows.Forms.DockStyle.Right; this.Výkres.Dock = System.Windows.Forms.DockStyle.Right;
this.Výkres.Location = new System.Drawing.Point(551, 0); this.Výkres.Location = new System.Drawing.Point(1551, 0);
this.Výkres.MaximumSize = new System.Drawing.Size(1073, 916); this.Výkres.MaximumSize = new System.Drawing.Size(1073, 916);
this.Výkres.MinimumSize = new System.Drawing.Size(23, 916); this.Výkres.MinimumSize = new System.Drawing.Size(23, 916);
this.Výkres.Name = "Výkres"; this.Výkres.Name = "Výkres";
@@ -1533,7 +1533,7 @@
// button4 // button4
// //
this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button4.Location = new System.Drawing.Point(474, 31); this.button4.Location = new System.Drawing.Point(1474, 31);
this.button4.Margin = new System.Windows.Forms.Padding(1); this.button4.Margin = new System.Windows.Forms.Padding(1);
this.button4.Name = "button4"; this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23); this.button4.Size = new System.Drawing.Size(75, 23);
@@ -1588,9 +1588,9 @@
this.panel17.Controls.Add(this.button4); this.panel17.Controls.Add(this.button4);
this.panel17.Controls.Add(this.button3); this.panel17.Controls.Add(this.button3);
this.panel17.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel17.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel17.Location = new System.Drawing.Point(0, 860); this.panel17.Location = new System.Drawing.Point(0, 865);
this.panel17.Name = "panel17"; this.panel17.Name = "panel17";
this.panel17.Size = new System.Drawing.Size(551, 56); this.panel17.Size = new System.Drawing.Size(1551, 56);
this.panel17.TabIndex = 22; this.panel17.TabIndex = 22;
// //
// panel24 // panel24
@@ -1601,7 +1601,7 @@
this.panel24.Dock = System.Windows.Forms.DockStyle.Top; this.panel24.Dock = System.Windows.Forms.DockStyle.Top;
this.panel24.Location = new System.Drawing.Point(0, 0); this.panel24.Location = new System.Drawing.Point(0, 0);
this.panel24.Name = "panel24"; this.panel24.Name = "panel24";
this.panel24.Size = new System.Drawing.Size(549, 31); this.panel24.Size = new System.Drawing.Size(1549, 31);
this.panel24.TabIndex = 13; this.panel24.TabIndex = 13;
// //
// label14 // label14
@@ -1610,7 +1610,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.label14.Location = new System.Drawing.Point(94, 1); this.label14.Location = new System.Drawing.Point(94, 1);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(0, 29); this.label14.Size = new System.Drawing.Size(1000, 29);
this.label14.TabIndex = 1; this.label14.TabIndex = 1;
this.label14.Text = "----"; this.label14.Text = "----";
// //
@@ -1641,7 +1641,7 @@
this.panel16.Location = new System.Drawing.Point(0, 130); this.panel16.Location = new System.Drawing.Point(0, 130);
this.panel16.MinimumSize = new System.Drawing.Size(551, 730); this.panel16.MinimumSize = new System.Drawing.Size(551, 730);
this.panel16.Name = "panel16"; this.panel16.Name = "panel16";
this.panel16.Size = new System.Drawing.Size(551, 730); this.panel16.Size = new System.Drawing.Size(1551, 735);
this.panel16.TabIndex = 21; this.panel16.TabIndex = 21;
// //
// Polotovar // Polotovar
@@ -1653,7 +1653,7 @@
this.Polotovar.Controls.Add(this.label17); this.Polotovar.Controls.Add(this.label17);
this.Polotovar.Controls.Add(this.panel10); this.Polotovar.Controls.Add(this.panel10);
this.Polotovar.Dock = System.Windows.Forms.DockStyle.Right; this.Polotovar.Dock = System.Windows.Forms.DockStyle.Right;
this.Polotovar.Location = new System.Drawing.Point(411, 0); this.Polotovar.Location = new System.Drawing.Point(351, 0);
this.Polotovar.Margin = new System.Windows.Forms.Padding(1); this.Polotovar.Margin = new System.Windows.Forms.Padding(1);
this.Polotovar.MaximumSize = new System.Drawing.Size(324, 728); this.Polotovar.MaximumSize = new System.Drawing.Size(324, 728);
this.Polotovar.MinimumSize = new System.Drawing.Size(23, 728); this.Polotovar.MinimumSize = new System.Drawing.Size(23, 728);
@@ -2840,7 +2840,7 @@
this.Materiál.Controls.Add(this.label15); this.Materiál.Controls.Add(this.label15);
this.Materiál.Controls.Add(this.panel11); this.Materiál.Controls.Add(this.panel11);
this.Materiál.Dock = System.Windows.Forms.DockStyle.Right; this.Materiál.Dock = System.Windows.Forms.DockStyle.Right;
this.Materiál.Location = new System.Drawing.Point(434, 0); this.Materiál.Location = new System.Drawing.Point(374, 0);
this.Materiál.Margin = new System.Windows.Forms.Padding(1); this.Materiál.Margin = new System.Windows.Forms.Padding(1);
this.Materiál.MaximumSize = new System.Drawing.Size(457, 728); this.Materiál.MaximumSize = new System.Drawing.Size(457, 728);
this.Materiál.MinimumSize = new System.Drawing.Size(23, 728); this.Materiál.MinimumSize = new System.Drawing.Size(23, 728);
@@ -5222,12 +5222,12 @@
this.Naceňovanie.Controls.Add(this.panel77); this.Naceňovanie.Controls.Add(this.panel77);
this.Naceňovanie.Controls.Add(this.panel14); this.Naceňovanie.Controls.Add(this.panel14);
this.Naceňovanie.Dock = System.Windows.Forms.DockStyle.Right; this.Naceňovanie.Dock = System.Windows.Forms.DockStyle.Right;
this.Naceňovanie.Location = new System.Drawing.Point(457, 0); this.Naceňovanie.Location = new System.Drawing.Point(397, 0);
this.Naceňovanie.Margin = new System.Windows.Forms.Padding(1); this.Naceňovanie.Margin = new System.Windows.Forms.Padding(1);
this.Naceňovanie.MaximumSize = new System.Drawing.Size(406, 728); this.Naceňovanie.MaximumSize = new System.Drawing.Size(406, 728);
this.Naceňovanie.MinimumSize = new System.Drawing.Size(23, 728); this.Naceňovanie.MinimumSize = new System.Drawing.Size(23, 728);
this.Naceňovanie.Name = "Naceňovanie"; this.Naceňovanie.Name = "Naceňovanie";
this.Naceňovanie.Size = new System.Drawing.Size(23, 728); this.Naceňovanie.Size = new System.Drawing.Size(406, 728);
this.Naceňovanie.TabIndex = 6; this.Naceňovanie.TabIndex = 6;
// //
// panel110 // panel110
@@ -7045,12 +7045,12 @@
this.Vyhodnocovanie.Controls.Add(this.panel112); this.Vyhodnocovanie.Controls.Add(this.panel112);
this.Vyhodnocovanie.Controls.Add(this.panel12); this.Vyhodnocovanie.Controls.Add(this.panel12);
this.Vyhodnocovanie.Dock = System.Windows.Forms.DockStyle.Right; this.Vyhodnocovanie.Dock = System.Windows.Forms.DockStyle.Right;
this.Vyhodnocovanie.Location = new System.Drawing.Point(480, 0); this.Vyhodnocovanie.Location = new System.Drawing.Point(803, 0);
this.Vyhodnocovanie.Margin = new System.Windows.Forms.Padding(1); this.Vyhodnocovanie.Margin = new System.Windows.Forms.Padding(1);
this.Vyhodnocovanie.MaximumSize = new System.Drawing.Size(700, 728); this.Vyhodnocovanie.MaximumSize = new System.Drawing.Size(700, 728);
this.Vyhodnocovanie.MinimumSize = new System.Drawing.Size(23, 728); this.Vyhodnocovanie.MinimumSize = new System.Drawing.Size(23, 728);
this.Vyhodnocovanie.Name = "Vyhodnocovanie"; this.Vyhodnocovanie.Name = "Vyhodnocovanie";
this.Vyhodnocovanie.Size = new System.Drawing.Size(23, 728); this.Vyhodnocovanie.Size = new System.Drawing.Size(700, 728);
this.Vyhodnocovanie.TabIndex = 4; this.Vyhodnocovanie.TabIndex = 4;
// //
// panel112 // panel112
@@ -8804,7 +8804,7 @@
this.Sadzby.Controls.Add(this.panel70); this.Sadzby.Controls.Add(this.panel70);
this.Sadzby.Controls.Add(this.panel13); this.Sadzby.Controls.Add(this.panel13);
this.Sadzby.Dock = System.Windows.Forms.DockStyle.Right; this.Sadzby.Dock = System.Windows.Forms.DockStyle.Right;
this.Sadzby.Location = new System.Drawing.Point(503, 0); this.Sadzby.Location = new System.Drawing.Point(1503, 0);
this.Sadzby.Margin = new System.Windows.Forms.Padding(1); this.Sadzby.Margin = new System.Windows.Forms.Padding(1);
this.Sadzby.MaximumSize = new System.Drawing.Size(350, 728); this.Sadzby.MaximumSize = new System.Drawing.Size(350, 728);
this.Sadzby.MinimumSize = new System.Drawing.Size(23, 728); this.Sadzby.MinimumSize = new System.Drawing.Size(23, 728);
@@ -9481,7 +9481,7 @@
this.Počty.Controls.Add(this.panel98); this.Počty.Controls.Add(this.panel98);
this.Počty.Controls.Add(this.panel9); this.Počty.Controls.Add(this.panel9);
this.Počty.Dock = System.Windows.Forms.DockStyle.Right; this.Počty.Dock = System.Windows.Forms.DockStyle.Right;
this.Počty.Location = new System.Drawing.Point(526, 0); this.Počty.Location = new System.Drawing.Point(1526, 0);
this.Počty.Margin = new System.Windows.Forms.Padding(1); this.Počty.Margin = new System.Windows.Forms.Padding(1);
this.Počty.MaximumSize = new System.Drawing.Size(403, 728); this.Počty.MaximumSize = new System.Drawing.Size(403, 728);
this.Počty.MinimumSize = new System.Drawing.Size(23, 728); this.Počty.MinimumSize = new System.Drawing.Size(23, 728);
@@ -11277,7 +11277,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(574, 916); this.ClientSize = new System.Drawing.Size(1574, 921);
this.Controls.Add(this.panel16); this.Controls.Add(this.panel16);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.panel17); this.Controls.Add(this.panel17);

450
Mip/frmVybratTypVyhodnotenia.Designer.cs generated Normal file
View File

@@ -0,0 +1,450 @@
namespace Mip
{
partial class frmVybratTypVyhodnotenia
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.label4 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
this.SuspendLayout();
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.button2.Enabled = false;
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.button2.Location = new System.Drawing.Point(685, 1);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(224, 54);
this.button2.TabIndex = 11;
this.button2.Text = "Vytvoriť vyhodnotenie";
this.button2.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.panel2);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label9);
this.panel1.Controls.Add(this.checkBox3);
this.panel1.Controls.Add(this.checkBox2);
this.panel1.Controls.Add(this.checkBox1);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.dataGridView2);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(2, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(916, 785);
this.panel1.TabIndex = 3;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.numericUpDown1);
this.panel3.Controls.Add(this.button2);
this.panel3.Controls.Add(this.label7);
this.panel3.Controls.Add(this.label8);
this.panel3.Location = new System.Drawing.Point(1, 723);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(912, 59);
this.panel3.TabIndex = 24;
//
// numericUpDown1
//
this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numericUpDown1.DecimalPlaces = 3;
this.numericUpDown1.Enabled = false;
this.numericUpDown1.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.numericUpDown1.Increment = new decimal(new int[] {
1,
0,
0,
196608});
this.numericUpDown1.Location = new System.Drawing.Point(253, 2);
this.numericUpDown1.Maximum = new decimal(new int[] {
99999999,
0,
0,
196608});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(258, 53);
this.numericUpDown1.TabIndex = 10;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
//
// label7
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label7.Enabled = false;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label7.Location = new System.Drawing.Point(2, 2);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(248, 53);
this.label7.TabIndex = 16;
this.label7.Text = "Cena na porovnanie";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.Enabled = false;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label8.Location = new System.Drawing.Point(514, 2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(54, 53);
this.label8.TabIndex = 17;
this.label8.Text = "€";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.textBox5);
this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.numericUpDown2);
this.panel2.Controls.Add(this.textBox3);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.label10);
this.panel2.Location = new System.Drawing.Point(1, 685);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(912, 37);
this.panel2.TabIndex = 23;
//
// textBox5
//
this.textBox5.Enabled = false;
this.textBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox5.Location = new System.Drawing.Point(91, 4);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(178, 26);
this.textBox5.TabIndex = 7;
this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Enabled = false;
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label11.Location = new System.Drawing.Point(8, 8);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(77, 20);
this.label11.TabIndex = 23;
this.label11.Text = "Zákazník:";
//
// numericUpDown2
//
this.numericUpDown2.Enabled = false;
this.numericUpDown2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.numericUpDown2.Location = new System.Drawing.Point(729, 4);
this.numericUpDown2.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numericUpDown2.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(178, 26);
this.numericUpDown2.TabIndex = 9;
this.numericUpDown2.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// textBox3
//
this.textBox3.Enabled = false;
this.textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox3.Location = new System.Drawing.Point(429, 4);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(178, 26);
this.textBox3.TabIndex = 8;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Enabled = false;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label5.Location = new System.Drawing.Point(308, 8);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(115, 20);
this.label5.TabIndex = 19;
this.label5.Text = "Názov výrobku:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Enabled = false;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label10.Location = new System.Drawing.Point(624, 8);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(99, 20);
this.label10.TabIndex = 20;
this.label10.Text = "Počet kusov:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(505, 28);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(241, 24);
this.label2.TabIndex = 18;
this.label2.Text = "Počet nájdených záznamov";
//
// label9
//
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label9.Location = new System.Drawing.Point(571, 53);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(110, 30);
this.label9.TabIndex = 5;
this.label9.Text = "label9";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// checkBox3
//
this.checkBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(749, 68);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(138, 17);
this.checkBox3.TabIndex = 6;
this.checkBox3.Text = "Cena zadaná manuálne";
this.checkBox3.UseVisualStyleBackColor = true;
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
//
// checkBox2
//
this.checkBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox2.AutoSize = true;
this.checkBox2.Checked = true;
this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox2.Location = new System.Drawing.Point(749, 47);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(118, 17);
this.checkBox2.TabIndex = 5;
this.checkBox2.Text = "Zobraziť nacenenia";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
// checkBox1
//
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Location = new System.Drawing.Point(749, 26);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(123, 17);
this.checkBox1.TabIndex = 4;
this.checkBox1.Text = "Zobraziť objednávky";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label6.Location = new System.Drawing.Point(209, 28);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(84, 24);
this.label6.TabIndex = 11;
this.label6.Text = "Zákazník";
//
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox4.Location = new System.Drawing.Point(169, 55);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(164, 29);
this.textBox4.TabIndex = 2;
this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
//
// dataGridView2
//
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.AllowUserToResizeColumns = false;
this.dataGridView2.AllowUserToResizeRows = false;
this.dataGridView2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Location = new System.Drawing.Point(1, 86);
this.dataGridView2.MultiSelect = false;
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.ReadOnly = true;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView2.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView2.Size = new System.Drawing.Size(912, 598);
this.dataGridView2.TabIndex = 8;
this.dataGridView2.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView2_CellClick);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label4.Location = new System.Drawing.Point(17, 28);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(134, 24);
this.label4.TabIndex = 7;
this.label4.Text = "Názov výrobku";
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox2.Location = new System.Drawing.Point(2, 55);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(164, 29);
this.textBox2.TabIndex = 1;
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label3.Location = new System.Drawing.Point(346, 28);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(143, 24);
this.label3.TabIndex = 5;
this.label3.Text = "Zákazkové číslo";
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.textBox1.Location = new System.Drawing.Point(336, 55);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(164, 29);
this.textBox1.TabIndex = 3;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label1
//
this.label1.BackColor = System.Drawing.SystemColors.Info;
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(914, 23);
this.label1.TabIndex = 3;
this.label1.Text = "Vybrať zdroj porovnania ceny";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// frmVybratTypVyhodnotenia
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(919, 789);
this.Controls.Add(this.panel1);
this.Name = "frmVybratTypVyhodnotenia";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Vybrať zdroj";
this.Load += new System.EventHandler(this.frmVybratTypVyhodnotenia_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridView dataGridView2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label11;
}
}

View File

@@ -0,0 +1,293 @@
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 Mip
{
public partial class frmVybratTypVyhodnotenia : Form
{
DataTable dopyty;
public frmVybratTypVyhodnotenia()
{
InitializeComponent();
string cmd = "";
cmd = $@"select `Zakaznik` as 'Zákazník',
`IdVyrobok` as 'ID výrobok',
`NazovVyrobku` as 'Názov výrobku',
`Material` as 'Materiál',
`Pocetkusov` as 'Počet',
`CenaOBJ` as 'Cena',
`ZakCislo` as 'Zákazkové číslo',
'0' as 'ID naceňovanie'
from `pohladdopyty`
where ((`pohladdopyty`.TypDopytu = 'Objednávka' or `pohladdopyty`.TypDopytu = 'Objednávka do kontraktu') and `pohladdopyty`.`StatusDopytu` = 'Odoslaná')
union select `tabvyrobok`.Zakaznik as 'Zákazník',
`tab-nacenovanie`.IdVyrobokNac as 'ID výrobok',
`tabvyrobok`.NazovVyrobku as 'Názov výrobku',
`Material1` as 'Materiál',
`PocetNacenovanychKusov` as 'Počet',
`myNuD71` as 'Cena',
'0' as 'Zákazkové číslo',
`tab-nacenovanie`.IDNacenovanie as 'ID naceňovanie'
from `tab-nacenovanie`
left join `tabvyrobok` on `tab-nacenovanie`.IdVyrobokNac = `tabvyrobok`.IdVyrobok
left join `tab-nacenovanie-nacenovanie` on `tab-nacenovanie`.IDNacenovanie = `tab-nacenovanie-nacenovanie`.IDNacenovanie
where `tab-nacenovanie-nacenovanie`.myNuD71 > 0";
classSQL.SQL(cmd, out dopyty);
refreshZoznamTypVyhodnotenia();
}
private void refreshZoznamTypVyhodnotenia()
{
DataTable dataTable = new DataTable();
if (checkBox3.Checked)
{
dataTable = null;
}
else
if (checkBox1.Checked)
{
if (checkBox2.Checked)
{
try
{
dataTable = dopyty.AsEnumerable()
.Where(row =>
row.Field<String>("Zákazkové číslo").ToLower().Contains(textBox1.Text.ToLower())
&& row.Field<String>("Zákazník").ToLower().Contains(textBox4.Text.ToLower())
&& row.Field<String>("Názov výrobku").ToLower().Contains(textBox2.Text.ToLower())
).CopyToDataTable();
}
catch
{
dataTable = null;
}
}
else
{
try
{
dataTable = dopyty.AsEnumerable()
.Where(row =>
row.Field<String>("Zákazkové číslo").ToLower().Contains(textBox1.Text.ToLower())
&& row.Field<String>("Zákazník").ToLower().Contains(textBox4.Text.ToLower())
&& row.Field<String>("Názov výrobku").ToLower().Contains(textBox2.Text.ToLower())
&& row.Field<String>("Zákazkové číslo") != "0"
).CopyToDataTable();
}
catch
{
dataTable = null;
}
}
}
else
{
if (checkBox2.Checked)
{
try
{
dataTable = dopyty.AsEnumerable()
.Where(row =>
row.Field<String>("Zákazkové číslo").ToLower().Contains(textBox1.Text.ToLower())
&& row.Field<String>("Zákazník").ToLower().Contains(textBox4.Text.ToLower())
&& row.Field<String>("Názov výrobku").ToLower().Contains(textBox2.Text.ToLower())
&& row.Field<String>("ID naceňovanie") != "0"
).CopyToDataTable();
}
catch
{
dataTable = null;
}
}
else
{
try
{
dataTable = dopyty.AsEnumerable()
.Where(row =>
row.Field<String>("Zákazkové číslo").ToLower().Contains(textBox1.Text.ToLower())
&& row.Field<String>("Zákazník").ToLower().Contains(textBox4.Text.ToLower())
&& row.Field<String>("Názov výrobku").ToLower().Contains(textBox2.Text.ToLower())
&& row.Field<String>("Zákazkové číslo") == "0"
&& row.Field<String>("ID naceňovanie") == "0"
).CopyToDataTable();
}
catch
{
dataTable = null;
}
}
}
if(dataTable == null) label9.Text = "0";
else label9.Text = dataTable.Rows.Count.ToString();
dataGridView2.DataSource = dataTable;
dataGridView2.ClearSelection();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
refreshZoznamTypVyhodnotenia();
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
refreshZoznamTypVyhodnotenia();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
refreshZoznamTypVyhodnotenia();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
refreshZoznamTypVyhodnotenia();
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
refreshZoznamTypVyhodnotenia();
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Enabled == true)
{
checkBox1.Enabled = false;
checkBox2.Enabled = false;
label7.Enabled = true;
label8.Enabled = true;
label10.Enabled = true;
label11.Enabled = true;
numericUpDown1.Enabled = true;
numericUpDown1.Value = 0;
numericUpDown2.Enabled = true;
numericUpDown2.Value = 1;
textBox5.Enabled = true;
textBox5.Text = "";
textBox3.Text = "";
loadTextBox5();
}
else
{
checkBox1.Enabled = true;
checkBox2.Enabled = true;
label7.Enabled = false;
label8.Enabled = false;
label10.Enabled = false;
label11.Enabled = false;
numericUpDown1.Enabled = false;
numericUpDown1.Value = 0;
numericUpDown2.Enabled = false;
numericUpDown2.Value = 1;
textBox5.Enabled = false;
textBox5.Text = "";
textBox3.Text = "";
}
refreshZoznamTypVyhodnotenia();
}
private void loadTextBox5()
{
if(textBox5.Enabled == true)
{
string[] postSourceZakaznik = dopyty
.AsEnumerable()
.GroupBy(x => x.Field<String>("Zákazník"))
.Select(x => x.First())
.CopyToDataTable()
.AsEnumerable()
.Select<DataRow, String>(x => x.Field<String>("Zákazník"))
.ToArray();
var source2 = new AutoCompleteStringCollection();
source2.AddRange(postSourceZakaznik);
textBox5.AutoCompleteCustomSource = source2;
textBox5.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
textBox5.AutoCompleteSource = AutoCompleteSource.CustomSource;
}
else
{
textBox5.AutoCompleteCustomSource = null;
textBox5.AutoCompleteMode = AutoCompleteMode.None;
textBox5.AutoCompleteSource = AutoCompleteSource.None;
}
loadTextBox3();
}
private void loadTextBox3()
{
if (textBox3.Enabled == true)
{
try
{
string[] postSourceVyrobok = dopyty
.AsEnumerable()
.GroupBy(x => x.Field<String>("Názov výrobku"))
.Select(x => x.First())
.Where(y => y.Field<String>("Zákazník").ToLower().Contains(textBox5.Text.ToLower()))
.CopyToDataTable()
.AsEnumerable()
.Select<DataRow, String>(x => x.Field<String>("Názov výrobku"))
.ToArray();
var source = new AutoCompleteStringCollection();
source.AddRange(postSourceVyrobok);
textBox3.AutoCompleteCustomSource = source;
textBox3.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
textBox3.AutoCompleteSource = AutoCompleteSource.CustomSource;
}
catch
{
}
}
else
{
textBox3.AutoCompleteCustomSource = null;
textBox3.AutoCompleteMode = AutoCompleteMode.None;
textBox3.AutoCompleteSource = AutoCompleteSource.None;
}
}
private void textBox5_TextChanged(object sender, EventArgs e)
{
if(textBox5.Text != "" && textBox5.Enabled == true) { label5.Enabled = true; textBox3.Enabled = true; }
else { label5.Enabled = false; textBox3.Enabled = false; }
loadTextBox3();
}
private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
{
textBox5.Text = dataGridView2.SelectedRows[0].Cells["Zákazník"].Value.ToString();
textBox3.Text = dataGridView2.SelectedRows[0].Cells["Názov výrobku"].Value.ToString();
numericUpDown2.Value = Int32.Parse(dataGridView2.SelectedRows[0].Cells["Počet"].Value.ToString());
numericUpDown1.Value = Decimal.Parse(dataGridView2.SelectedRows[0].Cells["Cena"].Value.ToString());
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
if (numericUpDown1.Value > 0 && textBox3.Text != "") button2.Enabled = true;
else button2.Enabled = false;
}
private void frmVybratTypVyhodnotenia_Load(object sender, EventArgs e)
{
dataGridView2.ClearSelection();
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -15,7 +15,7 @@ namespace Mip
{ {
int IDZiadankaDI = 0; int IDZiadankaDI = 0;
string TypFormulara = ""; string TypFormulara = "";
string NazovFirmy = ""; //string NazovFirmy = "";
/*string = ""; /*string = "";
string NazovFirmy = ""; string NazovFirmy = "";
string NazovFirmy = ""; string NazovFirmy = "";
@@ -634,8 +634,8 @@ namespace Mip
xlWorkSheet.Range["C49"].Value = textBox8.Text; xlWorkSheet.Range["C49"].Value = textBox8.Text;
xlWorkSheet.Range["C50"].Value = textBox9.Text; xlWorkSheet.Range["C50"].Value = textBox9.Text;
string cmd2 = ""; //string cmd2 = "";
cmd2 = ""; //cmd2 = "";

View File

@@ -1 +1 @@
77ba3171a784c77b68e2383920e54e9041069408 b088f87cb4e0456b78337eef13b11f6e44053324

View File

@@ -19,7 +19,6 @@ D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditDopyt.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditPoziadavka.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditPoziadavka.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditVyrobok.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditVyrobok.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventar.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventar.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventarnaVymena.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmLogo.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmLogo.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNacenovanie.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNacenovanie.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNovaPoziadavka.resources D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNovaPoziadavka.resources
@@ -41,52 +40,97 @@ D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmUlozPolotovar.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.GenerateResource.Cache D:\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.GenerateResource.Cache
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.exe D:\Mip\Mip_v1\Mip\obj\Debug\Mip.exe
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.pdb D:\Mip\Mip_v1\Mip\obj\Debug\Mip.pdb
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventarnaVymena.resources
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.csprojResolveAssemblyReference.cache D:\Mip\Mip_v1\Mip\obj\Debug\Mip.csprojResolveAssemblyReference.cache
D:\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPridatNastrojeDoSkladu.resources c:\MIP\Mip_v1\Mip\bin\Debug\Mip.exe.config
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\Mip.exe.config c:\MIP\Mip_v1\Mip\obj\Debug\Mip.csproj.ResolveComReference.cache
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.ResolveComReference.cache c:\MIP\Mip_v1\Mip\obj\Debug\Mip.exe
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.exe c:\MIP\Mip_v1\Mip\obj\Debug\Mip.pdb
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.pdb c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmAddCenovuPonuku.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\Mip.exe c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmAddFirma.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\Mip.pdb c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmAddMat.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\GMap.NET.Core.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditBrusenia.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\GMap.NET.WindowsForms.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditCenovuPonuku.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\MonthCalendar.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditExpedicia.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\MySql.Data.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmChat.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\MyTools.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditDopyt.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\bin\Debug\Newtonsoft.Json.dll c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditPoziadavka.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmAddCenovuPonuku.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmEditVyrobok.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmAddFirma.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmInventar.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmAddMat.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmInventarnaVymena.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditBrusenia.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmLogo.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditCenovuPonuku.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmNacenovanie.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditExpedicia.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmNovaPoziadavka.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmChat.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmPridatEditovatNastroj.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditDopyt.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmPrijemDoSkladu.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditPoziadavka.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmPriraditZamestnancaStroju.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmEditVyrobok.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmShowVykres.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventar.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmLogin.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmInventarnaVymena.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmMain.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmLogo.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmPridatVyrobok.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNacenovanie.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmAddPomUdaje.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNovaPoziadavka.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmNewDopyt.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPridatEditovatNastroj.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmTlacitStatistiku.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPridatNastrojeDoSkladu.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmVydajZoSkladu.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPrijemDoSkladu.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmZadatZmatkovitost.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPriraditZamestnancaStroju.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmZiadankaDoplnujuceInfo.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmShowVykres.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.Properties.Resources.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmLogin.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmUlozPolotovar.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmMain.resources c:\MIP\Mip_v1\Mip\obj\Debug\Mip.csproj.GenerateResource.Cache
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmPridatVyrobok.resources c:\MIP\Mip_v1\Mip\bin\Debug\Mip.exe
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmAddPomUdaje.resources c:\MIP\Mip_v1\Mip\bin\Debug\Mip.pdb
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmNewDopyt.resources c:\MIP\Mip_v1\Mip\bin\Debug\GMap.NET.Core.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmTlacitStatistiku.resources c:\MIP\Mip_v1\Mip\bin\Debug\GMap.NET.WindowsForms.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmVydajZoSkladu.resources c:\MIP\Mip_v1\Mip\bin\Debug\MonthCalendar.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmZadatZmatkovitost.resources c:\MIP\Mip_v1\Mip\bin\Debug\MySql.Data.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmZiadankaDoplnujuceInfo.resources c:\MIP\Mip_v1\Mip\bin\Debug\MyTools.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.Properties.Resources.resources c:\MIP\Mip_v1\Mip\bin\Debug\Newtonsoft.Json.dll
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.frmUlozPolotovar.resources C:\MIP\Mip_v1\Mip\obj\Debug\Mip.csprojResolveAssemblyReference.cache
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.GenerateResource.Cache C:\MIP\Mip_v1\Mip\obj\Debug\Mip.frmVybratTypVyhodnotenia.resources
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.csprojAssemblyReference.cache c:\Zdrojaky\Mip_v1\Mip\bin\Debug\Mip.exe.config
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.CoreCompileInputs.cache c:\Zdrojaky\Mip_v1\Mip\bin\Debug\Mip.exe
C:\Users\Culak\Desktop\Mip\Mip\Mip_v1\Mip\obj\Debug\Mip.csproj.CopyComplete c:\Zdrojaky\Mip_v1\Mip\bin\Debug\Mip.pdb
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\GMap.NET.Core.dll
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\GMap.NET.WindowsForms.dll
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\MonthCalendar.dll
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\MySql.Data.dll
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\MyTools.dll
c:\Zdrojaky\Mip_v1\Mip\bin\Debug\Newtonsoft.Json.dll
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.csprojAssemblyReference.cache
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.csproj.ResolveComReference.cache
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmAddCenovuPonuku.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmAddFirma.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmAddMat.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditBrusenia.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditCenovuPonuku.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditExpedicia.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmChat.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditDopyt.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditPoziadavka.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmEditVyrobok.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmInventar.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmInventarnaVymena.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmLogo.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmNacenovanie.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmNovaPoziadavka.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmPridatEditovatNastroj.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmPrijemDoSkladu.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmPriraditZamestnancaStroju.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmShowVykres.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmLogin.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmMain.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmPridatVyrobok.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmAddPomUdaje.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmNewDopyt.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmTlacitStatistiku.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmVybratTypVyhodnotenia.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmVydajZoSkladu.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmZadatZmatkovitost.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmZiadankaDoplnujuceInfo.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.Properties.Resources.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.frmUlozPolotovar.resources
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.csproj.GenerateResource.cache
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.csproj.CoreCompileInputs.cache
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.csproj.CopyComplete
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.exe
c:\Zdrojaky\Mip_v1\Mip\obj\Debug\Mip.pdb

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.