Editácia výrovku s pdf

This commit is contained in:
roman6791
2021-03-30 12:15:29 +02:00
parent 5798fd69a7
commit 3096d0881b
7 changed files with 9407 additions and 9515 deletions

View File

@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Management;
using System.Net.NetworkInformation;
using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
@@ -18,7 +11,7 @@ namespace Mip
class classGlobal
{
private static char Disk = 'W';
/// <summary>
/// Vytvorí v RAM disk W:
/// </summary>
@@ -34,7 +27,7 @@ namespace Mip
/// <summary>
/// Vymaže RAM disk W:
/// </summary>
public static void DeleteRamDisk()
{
classDiskOperations.CreatePath();
@@ -85,7 +78,7 @@ namespace Mip
}
*/
public static string strNovyPomocnyUdaj;
/// <summary>
@@ -108,7 +101,7 @@ namespace Mip
{
cb.Items.Add(row[strCollumn].ToString());
}
}
/// <summary>
@@ -137,25 +130,25 @@ namespace Mip
cb.Items.Add(row[strCollumn].ToString());
}
}
/*
/// <summary>
/// Naplna comboBox cb udajmi z SQL servera (viac stlpcov a vrati datasource)
/// </summary>
/// <param name="cb"> nazov naplnaneho comboBoxu</param>
/// <param name="strTab"> nazov tabulky z ktorej comboBox naplname</param>
/// <param name="strCollumn"> nazov stlpca (stlpcov) z tabulky z ktorého data naplname do comboBoxu</param>
public static void FillCBMultiColumn(ComboBox cb, string strTab, string strCollumn)
{
DataTable dtbl = new DataTable();
string c = "SELECT DISTINCT `" + strCollumn
+ "` FROM `mip`.`" + strTab + "`;";
classSQL.SQL(c, out dtbl);
cb.Items.Clear();
cb.DataSource = dtbl;
}
*/
/*
/// <summary>
/// Naplna comboBox cb udajmi z SQL servera (viac stlpcov a vrati datasource)
/// </summary>
/// <param name="cb"> nazov naplnaneho comboBoxu</param>
/// <param name="strTab"> nazov tabulky z ktorej comboBox naplname</param>
/// <param name="strCollumn"> nazov stlpca (stlpcov) z tabulky z ktorého data naplname do comboBoxu</param>
public static void FillCBMultiColumn(ComboBox cb, string strTab, string strCollumn)
{
DataTable dtbl = new DataTable();
string c = "SELECT DISTINCT `" + strCollumn
+ "` FROM `mip`.`" + strTab + "`;";
classSQL.SQL(c, out dtbl);
cb.Items.Clear();
cb.DataSource = dtbl;
}
*/
/// <summary>
/// Naplna comboBox cb udajmi z SQL servera (Urceny pre comboboxy na vydaj a prijem do skladu vyrobkov, konvertuje nazvy krabic(string na integer))
@@ -169,7 +162,7 @@ namespace Mip
{
//select convert(`hodnota`,int) as num from `tabpomocnychudajov` where `kategoria` = 'Pridat krabicu' order by num
DataTable dtbl = new DataTable();
string c = "SELECT DISTINCT CONVERT (`" + strCollumn + "`,int) as NUMBER "
string c = "SELECT DISTINCT CONVERT (`" + strCollumn + "`,int) as NUMBER "
+ " FROM `mip`.`" + strTab
+ "` WHERE `" + strCollumnWhere
+ "` = '" + strHodnotaWhere
@@ -457,10 +450,10 @@ namespace Mip
break;
}
}
if(_cI>-1) _dgv.Columns[_cI].DefaultCellStyle.BackColor = Color.GreenYellow;
if (_cI > -1) _dgv.Columns[_cI].DefaultCellStyle.BackColor = Color.GreenYellow;
break;
}
}
@@ -486,14 +479,14 @@ namespace Mip
}
}
public static void SetServerIP ()
public static void SetServerIP()
{
System.Net.NetworkInformation.Ping pingIP = new System.Net.NetworkInformation.Ping();
string IPaddress = "";
PingReply pingReply;
IPaddress = Debugger.IsAttached ? "192.168.2.12" : "192.168.1.12"; //IP Adresa MariaDB pre VLAN1
//ked sa programuje mino firmu aby to hned naslo staticku ip
//IPaddress = "87.197.164.107";
@@ -504,8 +497,8 @@ namespace Mip
}
else
{
IPaddress = Debugger.IsAttached? "192.168.2.13" : "192.168.1.13"; //IP Adresa MariaDB pre VLAN2
IPaddress = Debugger.IsAttached ? "192.168.2.13" : "192.168.1.13"; //IP Adresa MariaDB pre VLAN2
pingReply = pingIP.Send(IPaddress);
if (pingReply.Status.ToString() == "Success")
{
@@ -513,8 +506,9 @@ namespace Mip
}
else
{
IPaddress = "127.0.0.1";
//IPaddress = "127.0.0.1";
IPaddress = "192.168.1.11";
pingReply = pingIP.Send(IPaddress);
if (pingReply.Status.ToString() == "Success")
{
@@ -523,10 +517,10 @@ namespace Mip
else
{
classUser.MariaDBServerIPAddress = "0.0.0.0";
MessageBox.Show("Žiadny lokálny ani internetový MariaDB server nebol nájdený!"
MessageBox.Show("Žiadny lokálny ani internetový MariaDB server nebol nájdený!"
+ Environment.NewLine
+ "Program Mip bude ukončený! ");
Environment.Exit(0);
}
//IPaddress = "87.197.164.107";
@@ -604,7 +598,7 @@ namespace Mip
xlWorkBook.Save();
xlWorkBook.Close(false, null, null);
xlApp.Quit();
}
@@ -617,12 +611,12 @@ namespace Mip
else cf.Cursor = System.Windows.Forms.Cursors.Default;
*/
if (_switch) Application.UseWaitCursor = true;
else Application.UseWaitCursor = false;
}
@@ -666,11 +660,11 @@ namespace Mip
break;
case "Ziadanka-zobrazit vsetky":
switch(_IDUSER)
switch (_IDUSER)
{
case 1:
case 4:
case 9:
case 1:
case 4:
case 9:
case 13:
case 26:
case 28:
@@ -724,12 +718,12 @@ namespace Mip
}
break;
default :
default:
bReturnValue = false;
break;
}
return bReturnValue;
}