This commit is contained in:
Culak-HP\Culak
2021-01-07 13:16:26 +01:00
parent 369a27bf33
commit 72f7550573
5 changed files with 42 additions and 50 deletions

Binary file not shown.

View File

@@ -492,7 +492,7 @@ namespace Mip
string IPaddress = ""; string IPaddress = "";
PingReply pingReply; PingReply pingReply;
IPaddress = "192.168.1.12"; //IP Adresa MariaDB pre VLAN1 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 //ked sa programuje mino firmu aby to hned naslo staticku ip
//IPaddress = "87.197.164.107"; //IPaddress = "87.197.164.107";
@@ -501,11 +501,11 @@ namespace Mip
if (pingReply.Status.ToString() == "Success") if (pingReply.Status.ToString() == "Success")
{ {
classUser.MariaDBServerIPAddress = IPaddress; classUser.MariaDBServerIPAddress = IPaddress;
} }
else else
{ {
IPaddress = "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); pingReply = pingIP.Send(IPaddress);
if (pingReply.Status.ToString() == "Success") if (pingReply.Status.ToString() == "Success")
{ {
@@ -528,7 +528,6 @@ namespace Mip
+ "Program Mip bude ukončený! "); + "Program Mip bude ukončený! ");
Environment.Exit(0); Environment.Exit(0);
} }
//IPaddress = "87.197.164.107"; //IPaddress = "87.197.164.107";
//pingReply = pingIP.Send(IPaddress); //pingReply = pingIP.Send(IPaddress);

View File

@@ -6571,26 +6571,19 @@ namespace Mip
{ {
if (dataGridView7.SelectedRows.Count > 0) if (dataGridView7.SelectedRows.Count > 0)
{ {
if(classUser.ID == 1 || classUser.ID == 4 || classUser.ID == 26) OpenNacenovanie();
{
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.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();
}
} }
refreshNacenovanie(); refreshNacenovanie();
} }
private void dataGridView7_CellDoubleClick(object sender, DataGridViewCellEventArgs e) private void dataGridView7_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{ {
if (classUser.ID == 1 || classUser.ID == 4) OpenNacenovanie();
}
private void OpenNacenovanie()
{
if (classUser.ID == 1 || classUser.ID == 4 || classUser.ID == 26)
{ {
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";

View File

@@ -1205,7 +1205,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(1051, 130); this.panel1.Size = new System.Drawing.Size(551, 130);
this.panel1.TabIndex = 20; this.panel1.TabIndex = 20;
// //
// panel19 // panel19
@@ -1466,7 +1466,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(1051, 0); this.Výkres.Location = new System.Drawing.Point(551, 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";
@@ -1556,7 +1556,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(974, 31); this.button4.Location = new System.Drawing.Point(474, 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);
@@ -1613,7 +1613,7 @@
this.panel17.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel17.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel17.Location = new System.Drawing.Point(0, 865); this.panel17.Location = new System.Drawing.Point(0, 865);
this.panel17.Name = "panel17"; this.panel17.Name = "panel17";
this.panel17.Size = new System.Drawing.Size(1051, 56); this.panel17.Size = new System.Drawing.Size(551, 56);
this.panel17.TabIndex = 22; this.panel17.TabIndex = 22;
// //
// panel24 // panel24
@@ -1624,7 +1624,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(1049, 31); this.panel24.Size = new System.Drawing.Size(549, 31);
this.panel24.TabIndex = 13; this.panel24.TabIndex = 13;
// //
// label14 // label14
@@ -1633,7 +1633,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(500, 29); this.label14.Size = new System.Drawing.Size(0, 29);
this.label14.TabIndex = 1; this.label14.TabIndex = 1;
this.label14.Text = "----"; this.label14.Text = "----";
// //
@@ -1664,7 +1664,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(1051, 735); this.panel16.Size = new System.Drawing.Size(551, 735);
this.panel16.TabIndex = 21; this.panel16.TabIndex = 21;
// //
// Polotovar // Polotovar
@@ -1676,7 +1676,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(145, 0); this.Polotovar.Location = new System.Drawing.Point(411, 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);
@@ -2863,7 +2863,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(168, 0); this.Materiál.Location = new System.Drawing.Point(434, 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);
@@ -5245,12 +5245,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(191, 0); this.Naceňovanie.Location = new System.Drawing.Point(457, 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(406, 728); this.Naceňovanie.Size = new System.Drawing.Size(23, 728);
this.Naceňovanie.TabIndex = 6; this.Naceňovanie.TabIndex = 6;
// //
// panel110 // panel110
@@ -7162,12 +7162,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(597, 0); this.Vyhodnocovanie.Location = new System.Drawing.Point(480, 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(406, 728); this.Vyhodnocovanie.MaximumSize = new System.Drawing.Size(406, 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(406, 728); this.Vyhodnocovanie.Size = new System.Drawing.Size(23, 728);
this.Vyhodnocovanie.TabIndex = 4; this.Vyhodnocovanie.TabIndex = 4;
// //
// panel112 // panel112
@@ -8979,7 +8979,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(1003, 0); this.Sadzby.Location = new System.Drawing.Point(503, 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);
@@ -9698,7 +9698,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(1026, 0); this.Počty.Location = new System.Drawing.Point(526, 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);
@@ -11494,7 +11494,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(1074, 921); this.ClientSize = new System.Drawing.Size(574, 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);

View File

@@ -2284,7 +2284,7 @@ namespace Mip
Convert.ToDecimal(form.label455.Text) + Convert.ToDecimal(form.label455.Text) +
Convert.ToDecimal(form.label452.Text)).ToString(); Convert.ToDecimal(form.label452.Text)).ToString();
if (Convert.ToDecimal(form.label537.Text) == 0) form.label548.Text = string.Format("{0:F2}", 0); if (Convert.ToDecimal(form.label537.Text) == 0) form.label548.Text = string.Format("{0:F2}", 0);
else form.label548.Text = string.Format("{0:F2}", (Convert.ToDecimal(form.label553.Text) / Convert.ToDecimal(form.label548.Text) * 100) - 100); else form.label548.Text = "0";//string.Format("{0:F2}", (Convert.ToDecimal(form.label553.Text) / Convert.ToDecimal(form.label548.Text) * 100) - 100);
form.label553.Text = form.label537.Text; form.label553.Text = form.label537.Text;
//form.label354.Text = form.label212.Text; ???zistit co to je //form.label354.Text = form.label212.Text; ???zistit co to je