Initial commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
.vs/
|
||||||
|
packages/
|
||||||
|
*.suo
|
||||||
|
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
|||||||
|
ALTER TABLE tst_aggregate_remonty ADD COLUMN TAR_TST_ID int(11) NULL DEFAULT NULL AFTER TAR_ID;
|
||||||
|
ALTER TABLE tst_aggregate_export_spm ADD COLUMN TAR_TST_ID int(11) NULL DEFAULT NULL AFTER TAR_ID;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS tst_aggregate_export_spm_tmp;
|
||||||
|
CREATE TABLE tst_aggregate_export_spm_tmp
|
||||||
|
SELECT
|
||||||
|
TAR_ID
|
||||||
|
,(SELECT TST_ID FROM tst_tests WHERE TST_ID=(SELECT MAX(TST_ID) FROM tst_tests WHERE TST_PUP_NAME=TAR_PUP_NAME AND TST_PUP_SN_NO=TAR_PUP_SN_NO AND TST_ENG_NAME=TAR_ENG_NAME AND TST_ENG_SN_NO=TAR_ENG_SN_NO AND date(TST_AUDIT_CD)=date(TAR_AUDIT_CD))) TAR_TST_ID
|
||||||
|
,TAR_PUP_DRS_ID
|
||||||
|
,TAR_PUP_NAME
|
||||||
|
,TAR_PUP_SN_NO
|
||||||
|
,TAR_ENG_DRS_ID
|
||||||
|
,TAR_ENG_NAME
|
||||||
|
,TAR_ENG_SN_NO
|
||||||
|
,TAR_CABLE_TYP
|
||||||
|
,TAR_CABLE_DLUGOSC
|
||||||
|
,TAR_CABLE_OZNAK_01
|
||||||
|
,TAR_CABLE_OZNAK_02
|
||||||
|
,TAR_CABLE_MEMO
|
||||||
|
,TAR_DEPARTMENT
|
||||||
|
,TAR_DEV_RESOURCES_ID
|
||||||
|
,TAR_AUDIT_CD
|
||||||
|
FROM tst_aggregate_export_spm
|
||||||
|
ORDER BY TAR_ID;
|
||||||
|
|
||||||
|
TRUNCATE TABLE tst_aggregate_export_spm;
|
||||||
|
|
||||||
|
INSERT INTO tst_aggregate_export_spm
|
||||||
|
SELECT * FROM tst_aggregate_export_spm_tmp;
|
||||||
|
|
||||||
|
DROP TABLE tst_aggregate_export_spm_tmp;
|
||||||
|
|
||||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
UPDATE softspm_test.tst_aggregate_remonty SET TAR_DEV_RESOURCES_ID=704,TAR_AUDIT_CD=now() WHERE TAR_ID=5;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS tst_aggregate_export_spm;
|
||||||
|
CREATE TABLE tst_aggregate_export_spm (
|
||||||
|
TAR_ID int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
TAR_PUP_DRS_ID int(11) DEFAULT NULL,
|
||||||
|
TAR_PUP_NAME varchar(128) DEFAULT NULL,
|
||||||
|
TAR_PUP_SN_NO varchar(128) DEFAULT NULL,
|
||||||
|
TAR_ENG_DRS_ID int(11) DEFAULT 0,
|
||||||
|
TAR_ENG_NAME varchar(128) DEFAULT NULL,
|
||||||
|
TAR_ENG_SN_NO varchar(128) DEFAULT NULL,
|
||||||
|
TAR_CABLE_TYP varchar(64) DEFAULT NULL,
|
||||||
|
TAR_CABLE_DLUGOSC varchar(32) DEFAULT NULL,
|
||||||
|
TAR_CABLE_OZNAK_01 varchar(64) DEFAULT NULL,
|
||||||
|
TAR_CABLE_OZNAK_02 varchar(255) DEFAULT NULL,
|
||||||
|
TAR_DEPARTMENT varchar(255) DEFAULT NULL,
|
||||||
|
TAR_DEV_RESOURCES_ID int(11) DEFAULT NULL,
|
||||||
|
TAR_AUDIT_CD datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
|
PRIMARY KEY (TAR_ID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO tst_aggregate_export_spm SELECT NULL,TAR_PUP_DRS_ID,TAR_PUP_NAME,TAR_PUP_SN_NO,TAR_ENG_DRS_ID,TAR_ENG_NAME,TAR_ENG_SN_NO,TAR_CABLE_TYP,TAR_CABLE_DLUGOSC,TAR_CABLE_OZNAK_01,TAR_CABLE_OZNAK_02,TAR_DEPARTMENT,TAR_DEV_RESOURCES_ID,TAR_AUDIT_CD FROM tst_aggregate_remonty WHERE TAR_ID=5;
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.30723.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StacjaProb", "StacjaProb\StacjaProb.csproj", "{AC5DD1EE-58A7-459C-A800-0E6EAE93399E}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{AC5DD1EE-58A7-459C-A800-0E6EAE93399E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AC5DD1EE-58A7-459C-A800-0E6EAE93399E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AC5DD1EE-58A7-459C-A800-0E6EAE93399E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AC5DD1EE-58A7-459C-A800-0E6EAE93399E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
Generated
+156
@@ -0,0 +1,156 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AboutForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.labelWersja = new System.Windows.Forms.Label();
|
||||||
|
this.linkLabel = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.labelCopyRight = new System.Windows.Forms.Label();
|
||||||
|
this.labelLicencja1 = new System.Windows.Forms.Label();
|
||||||
|
this.labelNazwaProgramu = new System.Windows.Forms.Label();
|
||||||
|
this.labelLicencja2 = new System.Windows.Forms.Label();
|
||||||
|
this.labelLicencja = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(314, 59);
|
||||||
|
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox1.TabIndex = 0;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// labelWersja
|
||||||
|
//
|
||||||
|
this.labelWersja.AutoSize = true;
|
||||||
|
this.labelWersja.Location = new System.Drawing.Point(29, 110);
|
||||||
|
this.labelWersja.Name = "labelWersja";
|
||||||
|
this.labelWersja.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelWersja.TabIndex = 1;
|
||||||
|
this.labelWersja.Text = "label1";
|
||||||
|
//
|
||||||
|
// linkLabel
|
||||||
|
//
|
||||||
|
this.linkLabel.AutoSize = true;
|
||||||
|
this.linkLabel.Location = new System.Drawing.Point(29, 135);
|
||||||
|
this.linkLabel.Name = "linkLabel";
|
||||||
|
this.linkLabel.Size = new System.Drawing.Size(55, 13);
|
||||||
|
this.linkLabel.TabIndex = 2;
|
||||||
|
this.linkLabel.TabStop = true;
|
||||||
|
this.linkLabel.Text = "linkLabel1";
|
||||||
|
this.linkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_LinkClicked);
|
||||||
|
//
|
||||||
|
// labelCopyRight
|
||||||
|
//
|
||||||
|
this.labelCopyRight.AutoSize = true;
|
||||||
|
this.labelCopyRight.Location = new System.Drawing.Point(29, 163);
|
||||||
|
this.labelCopyRight.Name = "labelCopyRight";
|
||||||
|
this.labelCopyRight.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelCopyRight.TabIndex = 3;
|
||||||
|
this.labelCopyRight.Text = "label1";
|
||||||
|
//
|
||||||
|
// labelLicencja1
|
||||||
|
//
|
||||||
|
this.labelLicencja1.AutoSize = true;
|
||||||
|
this.labelLicencja1.Location = new System.Drawing.Point(29, 231);
|
||||||
|
this.labelLicencja1.Name = "labelLicencja1";
|
||||||
|
this.labelLicencja1.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelLicencja1.TabIndex = 4;
|
||||||
|
this.labelLicencja1.Text = "label1";
|
||||||
|
//
|
||||||
|
// labelNazwaProgramu
|
||||||
|
//
|
||||||
|
this.labelNazwaProgramu.AutoSize = true;
|
||||||
|
this.labelNazwaProgramu.Location = new System.Drawing.Point(29, 94);
|
||||||
|
this.labelNazwaProgramu.Name = "labelNazwaProgramu";
|
||||||
|
this.labelNazwaProgramu.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelNazwaProgramu.TabIndex = 5;
|
||||||
|
this.labelNazwaProgramu.Text = "label1";
|
||||||
|
//
|
||||||
|
// labelLicencja2
|
||||||
|
//
|
||||||
|
this.labelLicencja2.AutoSize = true;
|
||||||
|
this.labelLicencja2.Location = new System.Drawing.Point(29, 246);
|
||||||
|
this.labelLicencja2.Name = "labelLicencja2";
|
||||||
|
this.labelLicencja2.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelLicencja2.TabIndex = 6;
|
||||||
|
this.labelLicencja2.Text = "label1";
|
||||||
|
//
|
||||||
|
// labelLicencja
|
||||||
|
//
|
||||||
|
this.labelLicencja.AutoSize = true;
|
||||||
|
this.labelLicencja.Location = new System.Drawing.Point(29, 215);
|
||||||
|
this.labelLicencja.Name = "labelLicencja";
|
||||||
|
this.labelLicencja.Size = new System.Drawing.Size(50, 13);
|
||||||
|
this.labelLicencja.TabIndex = 7;
|
||||||
|
this.labelLicencja.Text = "Licencja:";
|
||||||
|
//
|
||||||
|
// AboutForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(341, 305);
|
||||||
|
this.Controls.Add(this.labelLicencja);
|
||||||
|
this.Controls.Add(this.labelLicencja2);
|
||||||
|
this.Controls.Add(this.labelNazwaProgramu);
|
||||||
|
this.Controls.Add(this.labelLicencja1);
|
||||||
|
this.Controls.Add(this.labelCopyRight);
|
||||||
|
this.Controls.Add(this.linkLabel);
|
||||||
|
this.Controls.Add(this.labelWersja);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AboutForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "O programie";
|
||||||
|
this.Load += new System.EventHandler(this.AboutForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.Label labelWersja;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabel;
|
||||||
|
private System.Windows.Forms.Label labelCopyRight;
|
||||||
|
private System.Windows.Forms.Label labelLicencja1;
|
||||||
|
private System.Windows.Forms.Label labelNazwaProgramu;
|
||||||
|
private System.Windows.Forms.Label labelLicencja2;
|
||||||
|
private System.Windows.Forms.Label labelLicencja;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AboutForm : Form
|
||||||
|
{
|
||||||
|
public AboutForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AboutForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelCopyRight.Text = "© SoftSPM / MAST. Wszelkie prawa zastrzeżone";
|
||||||
|
labelNazwaProgramu.Text = "Oprogramowanie SoftSPM Test - Stacja Prób";
|
||||||
|
labelWersja.Text = vGlobal.softwareVersion;
|
||||||
|
linkLabel.Text = "https://softspm.com";
|
||||||
|
labelLicencja1.Text = vGlobal.softwareLicencePart001;
|
||||||
|
labelLicencja2.Text = vGlobal.softwareLicencePart002;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start("https://softspm.com");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+211
@@ -0,0 +1,211 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AddUser
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddUser));
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.checkBoxIsAdmin = new System.Windows.Forms.CheckBox();
|
||||||
|
this.textBoxLogin = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxPass = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxRePass = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxImie = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxNazwisko = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(12, 43);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
|
||||||
|
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox1.TabIndex = 0;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(204, 43);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(36, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Login:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(201, 70);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(39, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Hasło:";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(162, 96);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(78, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "Powtórz hasło:";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(211, 123);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(29, 13);
|
||||||
|
this.label4.TabIndex = 6;
|
||||||
|
this.label4.Text = "Imię:";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(184, 150);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(56, 13);
|
||||||
|
this.label5.TabIndex = 8;
|
||||||
|
this.label5.Text = "Nazwisko:";
|
||||||
|
//
|
||||||
|
// checkBoxIsAdmin
|
||||||
|
//
|
||||||
|
this.checkBoxIsAdmin.AutoSize = true;
|
||||||
|
this.checkBoxIsAdmin.Location = new System.Drawing.Point(246, 172);
|
||||||
|
this.checkBoxIsAdmin.Name = "checkBoxIsAdmin";
|
||||||
|
this.checkBoxIsAdmin.Size = new System.Drawing.Size(153, 17);
|
||||||
|
this.checkBoxIsAdmin.TabIndex = 10;
|
||||||
|
this.checkBoxIsAdmin.Text = "Uprawnienia administratora";
|
||||||
|
this.checkBoxIsAdmin.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// textBoxLogin
|
||||||
|
//
|
||||||
|
this.textBoxLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxLogin.Location = new System.Drawing.Point(246, 38);
|
||||||
|
this.textBoxLogin.Name = "textBoxLogin";
|
||||||
|
this.textBoxLogin.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxLogin.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxPass
|
||||||
|
//
|
||||||
|
this.textBoxPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPass.Location = new System.Drawing.Point(246, 65);
|
||||||
|
this.textBoxPass.Name = "textBoxPass";
|
||||||
|
this.textBoxPass.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxPass.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// textBoxRePass
|
||||||
|
//
|
||||||
|
this.textBoxRePass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxRePass.Location = new System.Drawing.Point(246, 91);
|
||||||
|
this.textBoxRePass.Name = "textBoxRePass";
|
||||||
|
this.textBoxRePass.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxRePass.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// textBoxImie
|
||||||
|
//
|
||||||
|
this.textBoxImie.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxImie.Location = new System.Drawing.Point(246, 118);
|
||||||
|
this.textBoxImie.Name = "textBoxImie";
|
||||||
|
this.textBoxImie.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxImie.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// textBoxNazwisko
|
||||||
|
//
|
||||||
|
this.textBoxNazwisko.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxNazwisko.Location = new System.Drawing.Point(246, 145);
|
||||||
|
this.textBoxNazwisko.Name = "textBoxNazwisko";
|
||||||
|
this.textBoxNazwisko.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxNazwisko.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(427, 215);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 11;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// AddUser
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(564, 271);
|
||||||
|
this.Controls.Add(this.buttonSave);
|
||||||
|
this.Controls.Add(this.textBoxNazwisko);
|
||||||
|
this.Controls.Add(this.textBoxImie);
|
||||||
|
this.Controls.Add(this.textBoxRePass);
|
||||||
|
this.Controls.Add(this.textBoxPass);
|
||||||
|
this.Controls.Add(this.textBoxLogin);
|
||||||
|
this.Controls.Add(this.checkBoxIsAdmin);
|
||||||
|
this.Controls.Add(this.label5);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Name = "AddUser";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Dodawanie użytkownika";
|
||||||
|
this.Load += new System.EventHandler(this.AddUser_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxIsAdmin;
|
||||||
|
private System.Windows.Forms.TextBox textBoxLogin;
|
||||||
|
private System.Windows.Forms.TextBox textBoxPass;
|
||||||
|
private System.Windows.Forms.TextBox textBoxRePass;
|
||||||
|
private System.Windows.Forms.TextBox textBoxImie;
|
||||||
|
private System.Windows.Forms.TextBox textBoxNazwisko;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AddUser : Form
|
||||||
|
{
|
||||||
|
public AddUser()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddUser_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
textBoxPass.MaxLength = 32;
|
||||||
|
textBoxPass.PasswordChar = '*';
|
||||||
|
textBoxRePass.MaxLength = 32;
|
||||||
|
textBoxRePass.PasswordChar = '*';
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (String.Compare(textBoxPass.Text, textBoxRePass.Text, false) == 0)
|
||||||
|
{
|
||||||
|
mySqlFunctions.Insert("INSERT INTO sys_users SET USR_USERNAME='"
|
||||||
|
+ textBoxLogin.Text
|
||||||
|
+ "',USR_PASSWORD=md5('"
|
||||||
|
+ textBoxPass.Text
|
||||||
|
+ "'),USR_FIRST_NAME='"
|
||||||
|
+ textBoxImie.Text
|
||||||
|
+ "',USR_LAST_NAME='"
|
||||||
|
+ textBoxNazwisko.Text
|
||||||
|
+ "',USR_STATUS='1',USR_PRT_ID=1,USR_AUDIT_CU='"
|
||||||
|
+ vGlobal.tst_login_name
|
||||||
|
+ "',USR_AUDIT_CD=now()");
|
||||||
|
|
||||||
|
int max_id = mySqlFunctions.sqlIntValue("select max(USR_ID) from sys_users");
|
||||||
|
|
||||||
|
if (checkBoxIsAdmin.Checked)
|
||||||
|
mySqlFunctions.Insert("INSERT INTO tst_users_type SET TUT_USR_ID=" + max_id.ToString() + ",TUT_TYPE='1',TUT_AUDIT_CU='" + vGlobal.tst_login_name + "',TUT_AUDIT_CD=now()");
|
||||||
|
else
|
||||||
|
mySqlFunctions.Insert("INSERT INTO tst_users_type SET TUT_USR_ID=" + max_id.ToString() + ",TUT_TYPE='0',TUT_AUDIT_CU='" + vGlobal.tst_login_name + "',TUT_AUDIT_CD=now()");
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else MessageBox.Show("Podano dwa różne hasła!");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+128
@@ -0,0 +1,128 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AggregateStockChMotorForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AggregateStockChMotorForm));
|
||||||
|
this.buttonWybierz = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.dataGridViewMotorLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxSearchMotor = new System.Windows.Forms.TextBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonWybierz
|
||||||
|
//
|
||||||
|
this.buttonWybierz.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonWybierz.Image = global::StacjaProb.Properties.Resources.if_table_select_row_64781;
|
||||||
|
this.buttonWybierz.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonWybierz.Location = new System.Drawing.Point(767, 342);
|
||||||
|
this.buttonWybierz.Name = "buttonWybierz";
|
||||||
|
this.buttonWybierz.Size = new System.Drawing.Size(108, 23);
|
||||||
|
this.buttonWybierz.TabIndex = 4;
|
||||||
|
this.buttonWybierz.Text = "Wybierz";
|
||||||
|
this.buttonWybierz.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonWybierz.Click += new System.EventHandler(this.buttonWybierz_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(16, 342);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 3;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// dataGridViewMotorLists
|
||||||
|
//
|
||||||
|
this.dataGridViewMotorLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewMotorLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewMotorLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewMotorLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewMotorLists.Location = new System.Drawing.Point(15, 42);
|
||||||
|
this.dataGridViewMotorLists.Name = "dataGridViewMotorLists";
|
||||||
|
this.dataGridViewMotorLists.ReadOnly = true;
|
||||||
|
this.dataGridViewMotorLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewMotorLists.Size = new System.Drawing.Size(860, 294);
|
||||||
|
this.dataGridViewMotorLists.TabIndex = 2;
|
||||||
|
this.dataGridViewMotorLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewMotorLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 19);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// textBoxSearchMotor
|
||||||
|
//
|
||||||
|
this.textBoxSearchMotor.Location = new System.Drawing.Point(60, 16);
|
||||||
|
this.textBoxSearchMotor.Name = "textBoxSearchMotor";
|
||||||
|
this.textBoxSearchMotor.Size = new System.Drawing.Size(143, 20);
|
||||||
|
this.textBoxSearchMotor.TabIndex = 1;
|
||||||
|
this.textBoxSearchMotor.TextChanged += new System.EventHandler(this.textBoxSearchMotor_TextChanged);
|
||||||
|
//
|
||||||
|
// AggregateStockChMotorForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(887, 380);
|
||||||
|
this.Controls.Add(this.buttonWybierz);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.dataGridViewMotorLists);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.textBoxSearchMotor);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AggregateStockChMotorForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Lista dostępnych silników na stanie";
|
||||||
|
this.Load += new System.EventHandler(this.AggregateStockChMotorForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonWybierz;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewMotorLists;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchMotor;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AggregateStockChMotorForm : Form
|
||||||
|
{
|
||||||
|
public AggregateStockChMotorForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCurrentMotorStockLists(string motorName = null)
|
||||||
|
{
|
||||||
|
string query = "";
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewMotorLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewMotorLists.ColumnCount = 9;
|
||||||
|
dataGridViewMotorLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewMotorLists.Columns[1].Name = "Typ silnika";
|
||||||
|
dataGridViewMotorLists.Columns[2].Name = "Numer silnika";
|
||||||
|
dataGridViewMotorLists.Columns[3].Name = "Moc [kW]";
|
||||||
|
dataGridViewMotorLists.Columns[4].Name = "Napięcie [V]";
|
||||||
|
dataGridViewMotorLists.Columns[5].Name = "Obroty";
|
||||||
|
dataGridViewMotorLists.Columns[6].Name = "Status";
|
||||||
|
dataGridViewMotorLists.Columns[7].Name = "Producent";
|
||||||
|
dataGridViewMotorLists.Columns[8].Name = "Kontrahent";
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[8].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
query = "select DRS_ID,DRS_SN_NUMBER,ENG_ID,ENG_NAME,ENG_POWER,ENG_VOLTAGE,ENG_RPM,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION from seg_dev_resources,seg_engines left join seg_manufacturers on MCF_ID=ENG_MCF_ID where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_AUDIT_USR=" + vGlobal.app_participants_id.ToString() + " and DRS_ID not in (select distinct APE_ENG_DRS_ID from seg_aggregate_pup_eng where APE_ENG_DRS_ID>0) and (ENG_NAME like '%" + motorName + "%' or DRS_SN_NUMBER like '%" + motorName + "%') order by ENG_NAME,ENG_POWER";
|
||||||
|
else
|
||||||
|
query = "select DRS_ID,DRS_SN_NUMBER,ENG_ID,ENG_NAME,ENG_POWER,ENG_VOLTAGE,ENG_RPM,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION from seg_dev_resources,seg_engines left join seg_manufacturers on MCF_ID=ENG_MCF_ID where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_ID not in (select distinct APE_ENG_DRS_ID from seg_aggregate_pup_eng where APE_ENG_DRS_ID>0) and (ENG_NAME like '%" + motorName + "%' or DRS_SN_NUMBER like '%" + motorName + "%') order by ENG_NAME,ENG_POWER";
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewMotorLists.Rows.Add(
|
||||||
|
dataReader["DRS_ID"],
|
||||||
|
dataReader["ENG_NAME"],
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["ENG_POWER"],
|
||||||
|
dataReader["ENG_VOLTAGE"],
|
||||||
|
dataReader["ENG_RPM"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["MCF_NAME"],
|
||||||
|
dataReader["PRT_DESCRIPTION"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AggregateStockChMotorForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = false;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorStockLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchMotor_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorStockLists(textBoxSearchMotor.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewMotorLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = true;
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonWybierz_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
AggregateStockEditForm.newMotorDevID = Convert.ToInt32(this.dataGridViewMotorLists.CurrentRow.Cells[0].Value.ToString().Replace(".", ","));
|
||||||
|
AggregateStockEditForm.newMotorDevName = this.dataGridViewMotorLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
AggregateStockEditForm.newMotorDevSN = this.dataGridViewMotorLists.CurrentRow.Cells[2].Value.ToString();
|
||||||
|
AggregateStockEditForm.newMotorDevPe = this.dataGridViewMotorLists.CurrentRow.Cells[3].Value.ToString();
|
||||||
|
AggregateStockEditForm.newMotorDevV = this.dataGridViewMotorLists.CurrentRow.Cells[4].Value.ToString();
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+128
@@ -0,0 +1,128 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AggregateStockChPumpForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AggregateStockChPumpForm));
|
||||||
|
this.buttonWybierz = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.dataGridViewPumpLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxSearchPump = new System.Windows.Forms.TextBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonWybierz
|
||||||
|
//
|
||||||
|
this.buttonWybierz.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonWybierz.Image = global::StacjaProb.Properties.Resources.if_table_select_row_64781;
|
||||||
|
this.buttonWybierz.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonWybierz.Location = new System.Drawing.Point(764, 341);
|
||||||
|
this.buttonWybierz.Name = "buttonWybierz";
|
||||||
|
this.buttonWybierz.Size = new System.Drawing.Size(108, 23);
|
||||||
|
this.buttonWybierz.TabIndex = 4;
|
||||||
|
this.buttonWybierz.Text = "Wybierz";
|
||||||
|
this.buttonWybierz.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonWybierz.Click += new System.EventHandler(this.buttonWybierz_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(13, 341);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 3;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// dataGridViewPumpLists
|
||||||
|
//
|
||||||
|
this.dataGridViewPumpLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewPumpLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewPumpLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewPumpLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewPumpLists.Location = new System.Drawing.Point(12, 41);
|
||||||
|
this.dataGridViewPumpLists.Name = "dataGridViewPumpLists";
|
||||||
|
this.dataGridViewPumpLists.ReadOnly = true;
|
||||||
|
this.dataGridViewPumpLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewPumpLists.Size = new System.Drawing.Size(860, 294);
|
||||||
|
this.dataGridViewPumpLists.TabIndex = 2;
|
||||||
|
this.dataGridViewPumpLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewPumpLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(9, 18);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// textBoxSearchPump
|
||||||
|
//
|
||||||
|
this.textBoxSearchPump.Location = new System.Drawing.Point(57, 15);
|
||||||
|
this.textBoxSearchPump.Name = "textBoxSearchPump";
|
||||||
|
this.textBoxSearchPump.Size = new System.Drawing.Size(143, 20);
|
||||||
|
this.textBoxSearchPump.TabIndex = 1;
|
||||||
|
this.textBoxSearchPump.TextChanged += new System.EventHandler(this.textBoxSearchPump_TextChanged);
|
||||||
|
//
|
||||||
|
// AggregateStockChPumpForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(883, 376);
|
||||||
|
this.Controls.Add(this.buttonWybierz);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.dataGridViewPumpLists);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.textBoxSearchPump);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AggregateStockChPumpForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Lista dostępnych pomp na stanie";
|
||||||
|
this.Load += new System.EventHandler(this.AggregateStockChPumpForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonWybierz;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewPumpLists;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchPump;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AggregateStockChPumpForm : Form
|
||||||
|
{
|
||||||
|
public AggregateStockChPumpForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje stan pomp
|
||||||
|
private void LoadCurrentPumpStockLists(string pumpName = null)
|
||||||
|
{
|
||||||
|
string query = "";
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewPumpLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewPumpLists.ColumnCount = 8;
|
||||||
|
dataGridViewPumpLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewPumpLists.Columns[1].Name = "Typ pompy";
|
||||||
|
dataGridViewPumpLists.Columns[2].Name = "Numer pompy";
|
||||||
|
dataGridViewPumpLists.Columns[3].Name = "Qn [m3/h]";
|
||||||
|
dataGridViewPumpLists.Columns[4].Name = "Hn [m]";
|
||||||
|
dataGridViewPumpLists.Columns[5].Name = "Status";
|
||||||
|
dataGridViewPumpLists.Columns[6].Name = "Producent";
|
||||||
|
dataGridViewPumpLists.Columns[7].Name = "Kontrahent";
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
query = "select DRS_ID,DRS_SN_NUMBER,PUP_ID,PUP_NAME,PUP_Q_N,PUP_H_P,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION from seg_dev_resources,seg_pumps left join seg_manufacturers on MCF_ID=PUP_MCF_ID where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_AUDIT_USR=" + vGlobal.app_participants_id.ToString() + " and DRS_ID not in (select distinct APE_PUP_DRS_ID from seg_aggregate_pup_eng where APE_PUP_DRS_ID>0) and (PUP_NAME like '%" + pumpName + "%' or DRS_SN_NUMBER like '%" + pumpName + "%') order by PUP_NAME,PUP_Q_N";
|
||||||
|
else
|
||||||
|
query = "select DRS_ID,DRS_SN_NUMBER,PUP_ID,PUP_NAME,PUP_Q_N,PUP_H_P,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION from seg_dev_resources,seg_pumps left join seg_manufacturers on MCF_ID=PUP_MCF_ID where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_ID not in (select distinct APE_PUP_DRS_ID from seg_aggregate_pup_eng where APE_PUP_DRS_ID>0) and (PUP_NAME like '%" + pumpName + "%' or DRS_SN_NUMBER like '%" + pumpName + "%') order by PUP_NAME,PUP_Q_N";
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewPumpLists.Rows.Add(
|
||||||
|
dataReader["DRS_ID"],
|
||||||
|
dataReader["PUP_NAME"],
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["PUP_Q_N"],
|
||||||
|
dataReader["PUP_H_P"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["MCF_NAME"],
|
||||||
|
dataReader["PRT_DESCRIPTION"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AggregateStockChPumpForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = false;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpStockLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchPump_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpStockLists(textBoxSearchPump.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewPumpLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = true;
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonWybierz_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
AggregateStockEditForm.newPumpDevID = Convert.ToInt32(this.dataGridViewPumpLists.CurrentRow.Cells[0].Value.ToString().Replace(".", ","));
|
||||||
|
AggregateStockEditForm.newPumpDevName = this.dataGridViewPumpLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
AggregateStockEditForm.newPumpDevSN = this.dataGridViewPumpLists.CurrentRow.Cells[2].Value.ToString();
|
||||||
|
AggregateStockEditForm.newPumpDevQn = this.dataGridViewPumpLists.CurrentRow.Cells[3].Value.ToString();
|
||||||
|
AggregateStockEditForm.newPumpDevHn = this.dataGridViewPumpLists.CurrentRow.Cells[4].Value.ToString();
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+545
@@ -0,0 +1,545 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AggregateStockEditForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AggregateStockEditForm));
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
|
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.textBoxMotorPower = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxMotorV = new System.Windows.Forms.TextBox();
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.textBoxMotorName = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxMotorSN = new System.Windows.Forms.TextBox();
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panel4 = new System.Windows.Forms.Panel();
|
||||||
|
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.richTextBoxUwagi = new System.Windows.Forms.RichTextBox();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.textBoxPumpHn = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxPumpQn = new System.Windows.Forms.TextBox();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.pictureBoxSearchPump = new System.Windows.Forms.PictureBox();
|
||||||
|
this.textBoxPumpName = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxPumpSN = new System.Windows.Forms.TextBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.linkLabelProtokol = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.textBoxWellName = new System.Windows.Forms.TextBox();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.linkLabelHistory = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.linkLabelDelConn = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.comboBoxStatus = new System.Windows.Forms.ComboBox();
|
||||||
|
this.comboBoxCompany = new System.Windows.Forms.ComboBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.groupBox3.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.panel4.SuspendLayout();
|
||||||
|
this.groupBox4.SuspendLayout();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchPump)).BeginInit();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(233, 0);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 1;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(127, 0);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 0;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.buttonCancel);
|
||||||
|
this.panel1.Controls.Add(this.buttonSave);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(345, 335);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(336, 26);
|
||||||
|
this.panel1.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Location = new System.Drawing.Point(20, 115);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(57, 13);
|
||||||
|
this.label8.TabIndex = 6;
|
||||||
|
this.label8.Text = "Moc [kW]:";
|
||||||
|
//
|
||||||
|
// label9
|
||||||
|
//
|
||||||
|
this.label9.AutoSize = true;
|
||||||
|
this.label9.Location = new System.Drawing.Point(9, 88);
|
||||||
|
this.label9.Name = "label9";
|
||||||
|
this.label9.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.label9.TabIndex = 4;
|
||||||
|
this.label9.Text = "Napięcie [V]:";
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.AutoSize = true;
|
||||||
|
this.label10.Location = new System.Drawing.Point(17, 33);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(60, 13);
|
||||||
|
this.label10.TabIndex = 0;
|
||||||
|
this.label10.Text = "Typ silnika:";
|
||||||
|
//
|
||||||
|
// label11
|
||||||
|
//
|
||||||
|
this.label11.AutoSize = true;
|
||||||
|
this.label11.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label11.Name = "label11";
|
||||||
|
this.label11.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label11.TabIndex = 2;
|
||||||
|
this.label11.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// groupBox3
|
||||||
|
//
|
||||||
|
this.groupBox3.Controls.Add(this.textBoxMotorPower);
|
||||||
|
this.groupBox3.Controls.Add(this.textBoxMotorV);
|
||||||
|
this.groupBox3.Controls.Add(this.pictureBox1);
|
||||||
|
this.groupBox3.Controls.Add(this.textBoxMotorName);
|
||||||
|
this.groupBox3.Controls.Add(this.textBoxMotorSN);
|
||||||
|
this.groupBox3.Controls.Add(this.label8);
|
||||||
|
this.groupBox3.Controls.Add(this.label9);
|
||||||
|
this.groupBox3.Controls.Add(this.label10);
|
||||||
|
this.groupBox3.Controls.Add(this.label11);
|
||||||
|
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox3.Location = new System.Drawing.Point(3, 169);
|
||||||
|
this.groupBox3.Name = "groupBox3";
|
||||||
|
this.groupBox3.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox3.TabIndex = 1;
|
||||||
|
this.groupBox3.TabStop = false;
|
||||||
|
this.groupBox3.Text = "Silnik";
|
||||||
|
//
|
||||||
|
// textBoxMotorPower
|
||||||
|
//
|
||||||
|
this.textBoxMotorPower.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxMotorPower.Location = new System.Drawing.Point(83, 112);
|
||||||
|
this.textBoxMotorPower.Name = "textBoxMotorPower";
|
||||||
|
this.textBoxMotorPower.ReadOnly = true;
|
||||||
|
this.textBoxMotorPower.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxMotorPower.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// textBoxMotorV
|
||||||
|
//
|
||||||
|
this.textBoxMotorV.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxMotorV.Location = new System.Drawing.Point(83, 85);
|
||||||
|
this.textBoxMotorV.Name = "textBoxMotorV";
|
||||||
|
this.textBoxMotorV.ReadOnly = true;
|
||||||
|
this.textBoxMotorV.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxMotorV.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.pictureBox1.Image = global::StacjaProb.Properties.Resources.Zoom_in_icon;
|
||||||
|
this.pictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(286, 27);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(31, 26);
|
||||||
|
this.pictureBox1.TabIndex = 21;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||||
|
//
|
||||||
|
// textBoxMotorName
|
||||||
|
//
|
||||||
|
this.textBoxMotorName.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxMotorName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxMotorName.Location = new System.Drawing.Point(83, 33);
|
||||||
|
this.textBoxMotorName.Name = "textBoxMotorName";
|
||||||
|
this.textBoxMotorName.ReadOnly = true;
|
||||||
|
this.textBoxMotorName.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxMotorName.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxMotorSN
|
||||||
|
//
|
||||||
|
this.textBoxMotorSN.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxMotorSN.Location = new System.Drawing.Point(83, 59);
|
||||||
|
this.textBoxMotorSN.Name = "textBoxMotorSN";
|
||||||
|
this.textBoxMotorSN.ReadOnly = true;
|
||||||
|
this.textBoxMotorSN.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxMotorSN.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel4, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(684, 364);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// panel4
|
||||||
|
//
|
||||||
|
this.panel4.Controls.Add(this.groupBox4);
|
||||||
|
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel4.Location = new System.Drawing.Point(345, 169);
|
||||||
|
this.panel4.Name = "panel4";
|
||||||
|
this.panel4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.panel4.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// groupBox4
|
||||||
|
//
|
||||||
|
this.groupBox4.Controls.Add(this.richTextBoxUwagi);
|
||||||
|
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox4.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.groupBox4.Name = "groupBox4";
|
||||||
|
this.groupBox4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox4.TabIndex = 0;
|
||||||
|
this.groupBox4.TabStop = false;
|
||||||
|
this.groupBox4.Text = "Uwagi";
|
||||||
|
//
|
||||||
|
// richTextBoxUwagi
|
||||||
|
//
|
||||||
|
this.richTextBoxUwagi.Location = new System.Drawing.Point(3, 19);
|
||||||
|
this.richTextBoxUwagi.Name = "richTextBoxUwagi";
|
||||||
|
this.richTextBoxUwagi.Size = new System.Drawing.Size(327, 129);
|
||||||
|
this.richTextBoxUwagi.TabIndex = 0;
|
||||||
|
this.richTextBoxUwagi.Text = "";
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPumpHn);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPumpQn);
|
||||||
|
this.groupBox1.Controls.Add(this.label5);
|
||||||
|
this.groupBox1.Controls.Add(this.label6);
|
||||||
|
this.groupBox1.Controls.Add(this.pictureBoxSearchPump);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPumpName);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPumpSN);
|
||||||
|
this.groupBox1.Controls.Add(this.label1);
|
||||||
|
this.groupBox1.Controls.Add(this.label2);
|
||||||
|
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Pompa";
|
||||||
|
//
|
||||||
|
// textBoxPumpHn
|
||||||
|
//
|
||||||
|
this.textBoxPumpHn.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxPumpHn.Location = new System.Drawing.Point(83, 108);
|
||||||
|
this.textBoxPumpHn.Name = "textBoxPumpHn";
|
||||||
|
this.textBoxPumpHn.ReadOnly = true;
|
||||||
|
this.textBoxPumpHn.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPumpHn.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// textBoxPumpQn
|
||||||
|
//
|
||||||
|
this.textBoxPumpQn.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxPumpQn.Location = new System.Drawing.Point(83, 82);
|
||||||
|
this.textBoxPumpQn.Name = "textBoxPumpQn";
|
||||||
|
this.textBoxPumpQn.ReadOnly = true;
|
||||||
|
this.textBoxPumpQn.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPumpQn.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(36, 111);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label5.TabIndex = 7;
|
||||||
|
this.label5.Text = "Hn [m]:";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(19, 85);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(58, 13);
|
||||||
|
this.label6.TabIndex = 5;
|
||||||
|
this.label6.Text = "Qn [m3/h]:";
|
||||||
|
//
|
||||||
|
// pictureBoxSearchPump
|
||||||
|
//
|
||||||
|
this.pictureBoxSearchPump.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.pictureBoxSearchPump.Image = global::StacjaProb.Properties.Resources.Zoom_in_icon;
|
||||||
|
this.pictureBoxSearchPump.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.pictureBoxSearchPump.Location = new System.Drawing.Point(286, 24);
|
||||||
|
this.pictureBoxSearchPump.Name = "pictureBoxSearchPump";
|
||||||
|
this.pictureBoxSearchPump.Size = new System.Drawing.Size(31, 26);
|
||||||
|
this.pictureBoxSearchPump.TabIndex = 18;
|
||||||
|
this.pictureBoxSearchPump.TabStop = false;
|
||||||
|
this.pictureBoxSearchPump.Click += new System.EventHandler(this.pictureBoxSearchPump_Click);
|
||||||
|
//
|
||||||
|
// textBoxPumpName
|
||||||
|
//
|
||||||
|
this.textBoxPumpName.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxPumpName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPumpName.Location = new System.Drawing.Point(83, 30);
|
||||||
|
this.textBoxPumpName.Name = "textBoxPumpName";
|
||||||
|
this.textBoxPumpName.ReadOnly = true;
|
||||||
|
this.textBoxPumpName.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPumpName.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// textBoxPumpSN
|
||||||
|
//
|
||||||
|
this.textBoxPumpSN.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxPumpSN.Location = new System.Drawing.Point(83, 56);
|
||||||
|
this.textBoxPumpSN.Name = "textBoxPumpSN";
|
||||||
|
this.textBoxPumpSN.ReadOnly = true;
|
||||||
|
this.textBoxPumpSN.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPumpSN.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(15, 33);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "Typ pompy:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label2.TabIndex = 3;
|
||||||
|
this.label2.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.linkLabelProtokol);
|
||||||
|
this.groupBox2.Controls.Add(this.textBoxWellName);
|
||||||
|
this.groupBox2.Controls.Add(this.label7);
|
||||||
|
this.groupBox2.Controls.Add(this.linkLabelHistory);
|
||||||
|
this.groupBox2.Controls.Add(this.linkLabelDelConn);
|
||||||
|
this.groupBox2.Controls.Add(this.comboBoxStatus);
|
||||||
|
this.groupBox2.Controls.Add(this.comboBoxCompany);
|
||||||
|
this.groupBox2.Controls.Add(this.label3);
|
||||||
|
this.groupBox2.Controls.Add(this.label4);
|
||||||
|
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(345, 3);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox2.TabIndex = 2;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Dodatkowe informacje";
|
||||||
|
//
|
||||||
|
// linkLabelProtokol
|
||||||
|
//
|
||||||
|
this.linkLabelProtokol.AutoSize = true;
|
||||||
|
this.linkLabelProtokol.Location = new System.Drawing.Point(200, 115);
|
||||||
|
this.linkLabelProtokol.Name = "linkLabelProtokol";
|
||||||
|
this.linkLabelProtokol.Size = new System.Drawing.Size(86, 13);
|
||||||
|
this.linkLabelProtokol.TabIndex = 6;
|
||||||
|
this.linkLabelProtokol.TabStop = true;
|
||||||
|
this.linkLabelProtokol.Text = "Protokół próby »";
|
||||||
|
this.linkLabelProtokol.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelProtokol_LinkClicked);
|
||||||
|
//
|
||||||
|
// textBoxWellName
|
||||||
|
//
|
||||||
|
this.textBoxWellName.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.textBoxWellName.Location = new System.Drawing.Point(89, 84);
|
||||||
|
this.textBoxWellName.Name = "textBoxWellName";
|
||||||
|
this.textBoxWellName.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxWellName.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.ForeColor = System.Drawing.Color.Blue;
|
||||||
|
this.label7.Location = new System.Drawing.Point(37, 87);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(46, 13);
|
||||||
|
this.label7.TabIndex = 4;
|
||||||
|
this.label7.Text = "Studnia:";
|
||||||
|
//
|
||||||
|
// linkLabelHistory
|
||||||
|
//
|
||||||
|
this.linkLabelHistory.AutoSize = true;
|
||||||
|
this.linkLabelHistory.Location = new System.Drawing.Point(235, 135);
|
||||||
|
this.linkLabelHistory.Name = "linkLabelHistory";
|
||||||
|
this.linkLabelHistory.Size = new System.Drawing.Size(51, 13);
|
||||||
|
this.linkLabelHistory.TabIndex = 8;
|
||||||
|
this.linkLabelHistory.TabStop = true;
|
||||||
|
this.linkLabelHistory.Text = "Historia »";
|
||||||
|
this.linkLabelHistory.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelHistory_LinkClicked);
|
||||||
|
//
|
||||||
|
// linkLabelDelConn
|
||||||
|
//
|
||||||
|
this.linkLabelDelConn.AutoSize = true;
|
||||||
|
this.linkLabelDelConn.Location = new System.Drawing.Point(21, 135);
|
||||||
|
this.linkLabelDelConn.Name = "linkLabelDelConn";
|
||||||
|
this.linkLabelDelConn.Size = new System.Drawing.Size(97, 13);
|
||||||
|
this.linkLabelDelConn.TabIndex = 7;
|
||||||
|
this.linkLabelDelConn.TabStop = true;
|
||||||
|
this.linkLabelDelConn.Text = "Usuń połączenie »";
|
||||||
|
this.linkLabelDelConn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelDelConn_LinkClicked);
|
||||||
|
//
|
||||||
|
// comboBoxStatus
|
||||||
|
//
|
||||||
|
this.comboBoxStatus.FormattingEnabled = true;
|
||||||
|
this.comboBoxStatus.Location = new System.Drawing.Point(89, 30);
|
||||||
|
this.comboBoxStatus.Name = "comboBoxStatus";
|
||||||
|
this.comboBoxStatus.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxStatus.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// comboBoxCompany
|
||||||
|
//
|
||||||
|
this.comboBoxCompany.FormattingEnabled = true;
|
||||||
|
this.comboBoxCompany.Location = new System.Drawing.Point(89, 57);
|
||||||
|
this.comboBoxCompany.Name = "comboBoxCompany";
|
||||||
|
this.comboBoxCompany.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxCompany.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(43, 33);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(40, 13);
|
||||||
|
this.label3.TabIndex = 0;
|
||||||
|
this.label3.Text = "Status:";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(21, 60);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label4.TabIndex = 2;
|
||||||
|
this.label4.Text = "Kontrahent:";
|
||||||
|
//
|
||||||
|
// AggregateStockEditForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(684, 364);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AggregateStockEditForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Agregat";
|
||||||
|
this.Load += new System.EventHandler(this.AggregateStockEditForm_Load);
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.groupBox3.ResumeLayout(false);
|
||||||
|
this.groupBox3.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.panel4.ResumeLayout(false);
|
||||||
|
this.groupBox4.ResumeLayout(false);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchPump)).EndInit();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Label label9;
|
||||||
|
private System.Windows.Forms.Label label10;
|
||||||
|
private System.Windows.Forms.Label label11;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox3;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
public System.Windows.Forms.TextBox textBoxMotorName;
|
||||||
|
public System.Windows.Forms.TextBox textBoxMotorSN;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Panel panel4;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox4;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBoxSearchPump;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPumpName;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPumpSN;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxStatus;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxCompany;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
public System.Windows.Forms.TextBox textBoxMotorPower;
|
||||||
|
public System.Windows.Forms.TextBox textBoxMotorV;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPumpHn;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPumpQn;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelHistory;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelDelConn;
|
||||||
|
public System.Windows.Forms.TextBox textBoxWellName;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
public System.Windows.Forms.RichTextBox richTextBoxUwagi;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelProtokol;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,346 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AggregateStockEditForm : Form
|
||||||
|
{
|
||||||
|
public int apeID = 0;
|
||||||
|
public int pumpDevID = 0;
|
||||||
|
public int motorDevID = 0;
|
||||||
|
|
||||||
|
public string selectedStatus = "";
|
||||||
|
public string selectedCompanies = "";
|
||||||
|
|
||||||
|
public static int newPumpDevID = 0;
|
||||||
|
public static string newPumpDevName = "";
|
||||||
|
public static string newPumpDevSN = "";
|
||||||
|
public static string newPumpDevQn = "";
|
||||||
|
public static string newPumpDevHn = "";
|
||||||
|
|
||||||
|
public static int newMotorDevID = 0;
|
||||||
|
public static string newMotorDevName = "";
|
||||||
|
public static string newMotorDevSN = "";
|
||||||
|
public static string newMotorDevV = "";
|
||||||
|
public static string newMotorDevPe = "";
|
||||||
|
|
||||||
|
private int testID = 0;
|
||||||
|
|
||||||
|
public string formName = "";
|
||||||
|
public AggregateStockEditForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AggregateStockEditForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Text += formName;
|
||||||
|
LoadStatuses();
|
||||||
|
LoadCompanies();
|
||||||
|
if (apeID>0)
|
||||||
|
{
|
||||||
|
newPumpDevID = pumpDevID;
|
||||||
|
newMotorDevID = motorDevID;
|
||||||
|
|
||||||
|
LoadConnectPump();
|
||||||
|
LoadConnectMotor();
|
||||||
|
buttonSave.Text = "Aktualizuj";
|
||||||
|
|
||||||
|
string getTestID = mySqlFunctions.sqlStringValue("select max(TST_ID) TST_ID from tst_tests where TST_PUP_NAME='"+ textBoxPumpName.Text + "' and TST_PUP_SN_NO='" + textBoxPumpSN.Text + "' and TST_ENG_NAME='" + textBoxMotorName.Text + "' and TST_ENG_SN_NO='" + textBoxMotorSN.Text + "'", "TST_ID");
|
||||||
|
|
||||||
|
if (getTestID.Length>0)
|
||||||
|
testID = Convert.ToInt32(getTestID);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
testID = 0;
|
||||||
|
linkLabelProtokol.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
linkLabelHistory.Visible = false;
|
||||||
|
linkLabelDelConn.Visible = false;
|
||||||
|
linkLabelProtokol.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadStatuses()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select DIC_ID,DIC_POL_LANG from sys_dictionaries where DIC_TYPE_ID=1 order by DIC_POL_LANG", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxStatus.Items.Insert(index, dataReader["DIC_POL_LANG"].ToString());
|
||||||
|
|
||||||
|
// zaznacza jako selected
|
||||||
|
if (dataReader["DIC_POL_LANG"].ToString() == selectedStatus)
|
||||||
|
comboBoxStatus.SelectedIndex = comboBoxStatus.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCompanies()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from sys_participants order by PRT_NAME", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxCompany.Items.Insert(index, dataReader["PRT_DESCRIPTION"].ToString());
|
||||||
|
|
||||||
|
if (dataReader["PRT_DESCRIPTION"].ToString() == selectedCompanies)
|
||||||
|
comboBoxCompany.SelectedIndex = comboBoxCompany.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadConnectPump()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from seg_dev_resources,seg_pumps where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_ID=" + pumpDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
textBoxPumpQn.Text = dataReader["PUP_Q_N"].ToString();
|
||||||
|
textBoxPumpHn.Text = dataReader["PUP_H_P"].ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadConnectMotor()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from seg_dev_resources,seg_engines where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_ID=" + motorDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
textBoxMotorV.Text = dataReader["ENG_VOLTAGE"].ToString();
|
||||||
|
textBoxMotorPower.Text = dataReader["ENG_POWER"].ToString();
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void pictureBoxSearchAggPump_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
if (newPumpDevID>0)
|
||||||
|
{
|
||||||
|
textBoxPumpName.Text = newPumpDevName;
|
||||||
|
textBoxPumpSN.Text = newPumpDevSN;
|
||||||
|
textBoxPumpQn.Text = newPumpDevQn;
|
||||||
|
textBoxPumpHn.Text = newPumpDevHn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void pictureBoxSearchAggMotor_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
if (newMotorDevID>0)
|
||||||
|
{
|
||||||
|
textBoxMotorName.Text = newMotorDevName;
|
||||||
|
textBoxMotorSN.Text = newMotorDevSN;
|
||||||
|
textBoxMotorV.Text = newMotorDevV;
|
||||||
|
textBoxMotorPower.Text = newMotorDevPe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pictureBoxSearchPump_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AggregateStockChPumpForm ascpForm = new AggregateStockChPumpForm();
|
||||||
|
ascpForm.FormClosed += new FormClosedEventHandler(pictureBoxSearchAggPump_FormClosed);
|
||||||
|
ascpForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pictureBox1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AggregateStockChMotorForm ascmForm = new AggregateStockChMotorForm();
|
||||||
|
ascmForm.FormClosed += new FormClosedEventHandler(pictureBoxSearchAggMotor_FormClosed);
|
||||||
|
ascmForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (newPumpDevID <= 0) newPumpDevID = pumpDevID;
|
||||||
|
if (newMotorDevID <= 0) newMotorDevID = motorDevID;
|
||||||
|
|
||||||
|
string statID = mySqlFunctions.sqlStringValue("select DIC_ID from sys_dictionaries where DIC_POL_LANG='" + comboBoxStatus.SelectedItem.ToString() + "'", "DIC_ID");
|
||||||
|
string partID = mySqlFunctions.sqlStringValue("select PRT_ID from sys_participants where PRT_DESCRIPTION ='" + comboBoxCompany.SelectedItem.ToString() + "'", "PRT_ID");
|
||||||
|
|
||||||
|
string pumpID = mySqlFunctions.sqlStringValue("select PUP_ID from seg_dev_resources,seg_pumps where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_ID=" + newPumpDevID.ToString(), "PUP_ID");
|
||||||
|
string engID = mySqlFunctions.sqlStringValue("select ENG_ID from seg_dev_resources,seg_engines where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_ID=" + newMotorDevID.ToString(), "ENG_ID");
|
||||||
|
|
||||||
|
if (apeID>0)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// aktualizuje agregat
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_aggregate_pup_eng SET APE_PUP_ID="+ pumpID + ",APE_PUP_DRS_ID="+ newPumpDevID.ToString() + ",APE_PUP_NAME='"+ textBoxPumpName.Text + "',APE_PUP_NO='" + textBoxPumpSN.Text + "',APE_ENG_ID="+ engID + ",APE_ENG_DRS_ID="+ newMotorDevID.ToString() + ",APE_ENG_NAME='"+ textBoxMotorName.Text + "',APE_ENG_NO='" + textBoxMotorSN.Text + "',APE_WLL_NAME='"+ textBoxWellName.Text + "',APE_AUDIT_CU='"+ vGlobal.tst_login_name + "',APE_AUDIT_CD=now(),APE_PRT_ID="+ partID + ",APE_DESCRIPTION='"+ richTextBoxUwagi.Text + "' WHERE APE_ID=" + apeID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_aggregate_pup_eng_his select * from seg_aggregate_pup_eng WHERE APE_ID=" + apeID.ToString(), mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
|
||||||
|
// aktualizuje pompe
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd1 = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_STATUS_DIC_ID="+ statID + ",DRS_AUDIT_USR='"+ partID + "',DRS_AUDIT_DATE=now() WHERE DRS_ID=" + newPumpDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd1.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his1 = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources WHERE DRS_ID=" + newPumpDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
his1.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
|
||||||
|
// aktualizuje silnik
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd2 = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_STATUS_DIC_ID=" + statID + ",DRS_AUDIT_USR='" + partID + "',DRS_AUDIT_DATE=now() WHERE DRS_ID=" + newMotorDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd2.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his2 = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources WHERE DRS_ID=" + newMotorDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
his2.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (newPumpDevID > 0 && newMotorDevID > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// dodaje agregat
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("INSERT INTO seg_aggregate_pup_eng SET APE_PUP_ID=" + pumpID + ",APE_PUP_DRS_ID=" + newPumpDevID.ToString() + ",APE_PUP_NAME='" + newPumpDevName + "',APE_PUP_NO='" + newPumpDevSN + "',APE_ENG_ID=" + engID + ",APE_ENG_DRS_ID=" + newMotorDevID.ToString() + ",APE_ENG_NAME='" + newMotorDevName + "',APE_ENG_NO='" + newMotorDevSN + "',APE_WLL_NAME='" + textBoxWellName.Text + "',APE_AUDIT_CU='" + vGlobal.tst_login_name + "',APE_AUDIT_CD=now(),APE_PRT_ID=" + partID + ",APE_DESCRIPTION='" + richTextBoxUwagi.Text + "'", mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_aggregate_pup_eng_his select * from seg_aggregate_pup_eng where APE_ID=(select max(APE_ID) from seg_aggregate_pup_eng)", mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
|
||||||
|
// aktualizuje pompe
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd1 = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_STATUS_DIC_ID=" + statID + ",DRS_AUDIT_USR='" + partID + "',DRS_AUDIT_DATE=now() WHERE DRS_ID=" + newPumpDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd1.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his1 = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources WHERE DRS_ID=" + newPumpDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
his1.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
|
||||||
|
// aktualizuje silnik
|
||||||
|
// ===========================================
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd2 = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_STATUS_DIC_ID=" + statID + ",DRS_AUDIT_USR='" + partID + "',DRS_AUDIT_DATE=now() WHERE DRS_ID=" + newMotorDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd2.ExecuteNonQuery();
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his2 = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources WHERE DRS_ID=" + newMotorDevID.ToString(), mySqlFunctions.connection);
|
||||||
|
his2.ExecuteNonQuery();
|
||||||
|
// ===========================================
|
||||||
|
this.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
MessageBox.Show("Przed zapisem należy wybrać dostępną pompę oraz silnik.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Nie wybrano statusu agregatu lub kontrahenta.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabelDelConn_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
if (MessageBox.Show("UWAGA!\nCzy na pewno chcesz usunąć połączenie pompa/silnik?", "Potwierdzenie usunięcia z bazy", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_aggregate_pup_eng SET APE_PUP_ID=NULL,APE_PUP_DRS_ID=NULL,APE_PUP_NAME=NULL,APE_PUP_NO=NULL,APE_ENG_ID=NULL,APE_ENG_DRS_ID=NULL,APE_ENG_NAME=NULL,APE_ENG_NO=NULL,APE_AUDIT_CU='janek',APE_AUDIT_CD=now() WHERE APE_ID=" + apeID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabelHistory_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
AggregateStockHistoryForm ashForm = new AggregateStockHistoryForm();
|
||||||
|
ashForm.apeID = apeID;
|
||||||
|
ashForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabelProtokol_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
fullTestReportForm.spm_test_id = testID;
|
||||||
|
fullTestReportForm formfullTestReportForm = new fullTestReportForm();
|
||||||
|
formfullTestReportForm.ShowDialog();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+126
@@ -0,0 +1,126 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AggregateStockHistoryForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AggregateStockHistoryForm));
|
||||||
|
this.dataGridViewAggHistory = new System.Windows.Forms.DataGridView();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.labelDate = new System.Windows.Forms.Label();
|
||||||
|
this.labelName = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dataGridViewAggHistory
|
||||||
|
//
|
||||||
|
this.dataGridViewAggHistory.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewAggHistory.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewAggHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewAggHistory.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewAggHistory.Location = new System.Drawing.Point(12, 47);
|
||||||
|
this.dataGridViewAggHistory.Name = "dataGridViewAggHistory";
|
||||||
|
this.dataGridViewAggHistory.ReadOnly = true;
|
||||||
|
this.dataGridViewAggHistory.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewAggHistory.Size = new System.Drawing.Size(860, 420);
|
||||||
|
this.dataGridViewAggHistory.TabIndex = 24;
|
||||||
|
this.dataGridViewAggHistory.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewAggHistory_CellContentClick);
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(761, 473);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 23;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// labelDate
|
||||||
|
//
|
||||||
|
this.labelDate.AutoSize = true;
|
||||||
|
this.labelDate.Location = new System.Drawing.Point(811, 16);
|
||||||
|
this.labelDate.Name = "labelDate";
|
||||||
|
this.labelDate.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.labelDate.TabIndex = 21;
|
||||||
|
this.labelDate.Text = "2017-12-12";
|
||||||
|
//
|
||||||
|
// labelName
|
||||||
|
//
|
||||||
|
this.labelName.AutoSize = true;
|
||||||
|
this.labelName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelName.Location = new System.Drawing.Point(16, 9);
|
||||||
|
this.labelName.Name = "labelName";
|
||||||
|
this.labelName.Size = new System.Drawing.Size(192, 20);
|
||||||
|
this.labelName.TabIndex = 20;
|
||||||
|
this.labelName.Text = "Typ pompy / Typ silnika";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(717, 16);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(88, 13);
|
||||||
|
this.label1.TabIndex = 22;
|
||||||
|
this.label1.Text = "Data aktualizacji:";
|
||||||
|
//
|
||||||
|
// AggregateStockHistoryForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(885, 504);
|
||||||
|
this.Controls.Add(this.dataGridViewAggHistory);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.labelDate);
|
||||||
|
this.Controls.Add(this.labelName);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AggregateStockHistoryForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Historia agregatu";
|
||||||
|
this.Load += new System.EventHandler(this.AggregateStockHistoryForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewAggHistory;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.Label labelDate;
|
||||||
|
private System.Windows.Forms.Label labelName;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AggregateStockHistoryForm : Form
|
||||||
|
{
|
||||||
|
public int apeID = 0;
|
||||||
|
|
||||||
|
public AggregateStockHistoryForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AggregateStockHistoryForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
dataGridViewAggHistory.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewAggHistory.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewAggHistory.ColumnCount = 8;
|
||||||
|
dataGridViewAggHistory.Columns[0].Name = "Typ pompy";
|
||||||
|
dataGridViewAggHistory.Columns[1].Name = "Numer pompy";
|
||||||
|
dataGridViewAggHistory.Columns[2].Name = "Typ silnika";
|
||||||
|
dataGridViewAggHistory.Columns[3].Name = "Numer silnika";
|
||||||
|
dataGridViewAggHistory.Columns[4].Name = "Studnia";
|
||||||
|
dataGridViewAggHistory.Columns[5].Name = "Kontrahent";
|
||||||
|
dataGridViewAggHistory.Columns[6].Name = "Data";
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select APE_ID,APE_PUP_NAME,APE_PUP_NO,APE_ENG_NAME,APE_ENG_NO,APE_WLL_NAME,(select PRT_DESCRIPTION from sys_participants where PRT_ID=APE_PRT_ID) PRT_DESCRIPTION,SUBSTRING(APE_AUDIT_CD,1,10) APE_AUDIT_CD,APE_PUP_ID,APE_ENG_ID,(select max(TST_ID) from tst_tests where TST_PUP_ID=APE_PUP_ID and TST_ENG_ID=APE_ENG_ID and TST_PUP_SN_NO=APE_PUP_NO and TST_ENG_SN_NO=APE_ENG_NO) TST_ID from seg_aggregate_pup_eng_his where APE_ID="+ apeID.ToString() + " order by APE_AUDIT_CD desc", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
if (index==0)
|
||||||
|
{
|
||||||
|
labelName.Text = dataReader["APE_PUP_NAME"].ToString() + " / " + dataReader["APE_ENG_NAME"].ToString();
|
||||||
|
labelDate.Text = dataReader["APE_AUDIT_CD"].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Rows.Add(
|
||||||
|
dataReader["APE_PUP_NAME"],
|
||||||
|
dataReader["APE_PUP_NO"],
|
||||||
|
dataReader["APE_ENG_NAME"],
|
||||||
|
dataReader["APE_ENG_NO"],
|
||||||
|
dataReader["APE_WLL_NAME"],
|
||||||
|
dataReader["PRT_DESCRIPTION"],
|
||||||
|
dataReader["APE_AUDIT_CD"],
|
||||||
|
dataReader["TST_ID"]
|
||||||
|
);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Columns[7].Visible = false;
|
||||||
|
|
||||||
|
DataGridViewButtonColumn btn = new DataGridViewButtonColumn();
|
||||||
|
dataGridViewAggHistory.Columns.Add(btn);
|
||||||
|
btn.HeaderText = "Protokół próby";
|
||||||
|
btn.Text = "Szczegóły »";
|
||||||
|
btn.Name = "btn";
|
||||||
|
btn.UseColumnTextForButtonValue = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewAggHistory_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ColumnIndex == 8)
|
||||||
|
{
|
||||||
|
if (this.dataGridViewAggHistory.CurrentRow.Cells[7].Value.ToString().Length>0)
|
||||||
|
{
|
||||||
|
fullTestReportForm.spm_test_id = Convert.ToInt32(this.dataGridViewAggHistory.CurrentRow.Cells[7].Value.ToString());
|
||||||
|
fullTestReportForm formfullTestReportForm = new fullTestReportForm();
|
||||||
|
formfullTestReportForm.ShowDialog();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
MessageBox.Show("Brak próby dla wybranego agregatu");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+172
@@ -0,0 +1,172 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class AggregateStockListForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AggregateStockListForm));
|
||||||
|
this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.dataGridViewAggLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxSearchAgg = new System.Windows.Forms.TextBox();
|
||||||
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.buttonAddAgg = new System.Windows.Forms.Button();
|
||||||
|
this.tableLayoutPanel.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggLists)).BeginInit();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.panel2.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel.ColumnCount = 1;
|
||||||
|
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel.Controls.Add(this.dataGridViewAggLists, 0, 1);
|
||||||
|
this.tableLayoutPanel.Controls.Add(this.panel1, 0, 0);
|
||||||
|
this.tableLayoutPanel.Controls.Add(this.panel2, 0, 2);
|
||||||
|
this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel.Name = "tableLayoutPanel";
|
||||||
|
this.tableLayoutPanel.RowCount = 3;
|
||||||
|
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
|
||||||
|
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
|
||||||
|
this.tableLayoutPanel.Size = new System.Drawing.Size(984, 561);
|
||||||
|
this.tableLayoutPanel.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// dataGridViewAggLists
|
||||||
|
//
|
||||||
|
this.dataGridViewAggLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewAggLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewAggLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewAggLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewAggLists.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.dataGridViewAggLists.Location = new System.Drawing.Point(3, 48);
|
||||||
|
this.dataGridViewAggLists.Name = "dataGridViewAggLists";
|
||||||
|
this.dataGridViewAggLists.ReadOnly = true;
|
||||||
|
this.dataGridViewAggLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewAggLists.Size = new System.Drawing.Size(978, 475);
|
||||||
|
this.dataGridViewAggLists.TabIndex = 0;
|
||||||
|
this.dataGridViewAggLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewAggLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.label1);
|
||||||
|
this.panel1.Controls.Add(this.textBoxSearchAgg);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(978, 39);
|
||||||
|
this.panel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(10, 12);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// textBoxSearchAgg
|
||||||
|
//
|
||||||
|
this.textBoxSearchAgg.Location = new System.Drawing.Point(58, 9);
|
||||||
|
this.textBoxSearchAgg.Name = "textBoxSearchAgg";
|
||||||
|
this.textBoxSearchAgg.Size = new System.Drawing.Size(212, 20);
|
||||||
|
this.textBoxSearchAgg.TabIndex = 1;
|
||||||
|
this.textBoxSearchAgg.TextChanged += new System.EventHandler(this.textBoxSearchAgg_TextChanged);
|
||||||
|
//
|
||||||
|
// panel2
|
||||||
|
//
|
||||||
|
this.panel2.Controls.Add(this.buttonClose);
|
||||||
|
this.panel2.Controls.Add(this.buttonAddAgg);
|
||||||
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel2.Location = new System.Drawing.Point(3, 529);
|
||||||
|
this.panel2.Name = "panel2";
|
||||||
|
this.panel2.Size = new System.Drawing.Size(978, 29);
|
||||||
|
this.panel2.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(864, 3);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 1;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// buttonAddAgg
|
||||||
|
//
|
||||||
|
this.buttonAddAgg.Image = ((System.Drawing.Image)(resources.GetObject("buttonAddAgg.Image")));
|
||||||
|
this.buttonAddAgg.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonAddAgg.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.buttonAddAgg.Name = "buttonAddAgg";
|
||||||
|
this.buttonAddAgg.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonAddAgg.TabIndex = 0;
|
||||||
|
this.buttonAddAgg.Text = "Dodaj";
|
||||||
|
this.buttonAddAgg.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonAddAgg.Click += new System.EventHandler(this.buttonAddAgg_Click);
|
||||||
|
//
|
||||||
|
// AggregateStockListForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(984, 561);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AggregateStockListForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Stan agregatów pompowych";
|
||||||
|
this.Load += new System.EventHandler(this.AggregateStockListForm_Load);
|
||||||
|
this.tableLayoutPanel.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggLists)).EndInit();
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.panel1.PerformLayout();
|
||||||
|
this.panel2.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Panel panel2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchAgg;
|
||||||
|
private System.Windows.Forms.Button buttonAddAgg;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewAggLists;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class AggregateStockListForm : Form
|
||||||
|
{
|
||||||
|
public AggregateStockListForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
this.Text += " (" + vGlobal.app_participants_name + ")";
|
||||||
|
else
|
||||||
|
this.Text += " (Wszyscy kontrahenci)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje stan pomp
|
||||||
|
private void LoadCurrentAggregateLists(string searchName = null)
|
||||||
|
{
|
||||||
|
searchName = textBoxSearchAgg.Text;
|
||||||
|
|
||||||
|
dataGridViewAggLists.DataSource = null;
|
||||||
|
dataGridViewAggLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewAggLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewAggLists.ColumnCount = 14;
|
||||||
|
dataGridViewAggLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewAggLists.Columns[1].Name = "Typ pompy";
|
||||||
|
dataGridViewAggLists.Columns[2].Name = "Numer pompy";
|
||||||
|
dataGridViewAggLists.Columns[3].Name = "Status pompy";
|
||||||
|
dataGridViewAggLists.Columns[4].Name = "Typ silnika";
|
||||||
|
dataGridViewAggLists.Columns[5].Name = "Numer silnika";
|
||||||
|
dataGridViewAggLists.Columns[6].Name = "Status silnika";
|
||||||
|
dataGridViewAggLists.Columns[7].Name = "Oddział";
|
||||||
|
dataGridViewAggLists.Columns[8].Name = "Przypisana studnia";
|
||||||
|
dataGridViewAggLists.Columns[9].Name = "Aktualizowane przez";
|
||||||
|
dataGridViewAggLists.Columns[10].Name = "Data aktualizacji";
|
||||||
|
|
||||||
|
dataGridViewAggLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewAggLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggLists.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewAggLists.Columns[8].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewAggLists.Columns[9].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewAggLists.Columns[10].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
string query = "";
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
query = "select APE_ID,APE_PUP_DRS_ID,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=(select DRS_RESOURCES_DIC_ID from seg_dev_resources where DRS_ID=APE_PUP_DRS_ID)) APE_PUP_STATUS,APE_PUP_NAME,APE_PUP_NO,APE_ENG_DRS_ID,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=(select DRS_RESOURCES_DIC_ID from seg_dev_resources where DRS_ID=APE_ENG_DRS_ID)) APE_ENG_STATUS,APE_ENG_NAME,APE_ENG_NO,APE_WLL_NAME,(select PRT_DESCRIPTION from sys_participants where PRT_ID=APE_PRT_ID) PRT_DESCRIPTION,APE_AUDIT_CU,SUBSTRING(APE_AUDIT_CD,1,10) APE_AUDIT_CD,APE_DESCRIPTION from seg_aggregate_pup_eng where APE_PUP_DRS_ID>0 and APE_ENG_DRS_ID>0 and APE_PRT_ID=" + vGlobal.app_participants_id.ToString() + " and (APE_PUP_NAME like '%" + searchName + "%' or APE_PUP_NO like '%" + searchName + "%' or APE_ENG_NAME like '%" + searchName + "%' or APE_ENG_NO like '%" + searchName + "%') order by APE_PUP_NAME, APE_ENG_NAME";
|
||||||
|
else
|
||||||
|
query = "select APE_ID,APE_PUP_DRS_ID,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=(select DRS_RESOURCES_DIC_ID from seg_dev_resources where DRS_ID=APE_PUP_DRS_ID)) APE_PUP_STATUS,APE_PUP_NAME,APE_PUP_NO,APE_ENG_DRS_ID,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=(select DRS_RESOURCES_DIC_ID from seg_dev_resources where DRS_ID=APE_ENG_DRS_ID)) APE_ENG_STATUS,APE_ENG_NAME,APE_ENG_NO,APE_WLL_NAME,(select PRT_DESCRIPTION from sys_participants where PRT_ID=APE_PRT_ID) PRT_DESCRIPTION,APE_AUDIT_CU,SUBSTRING(APE_AUDIT_CD,1,10) APE_AUDIT_CD,APE_DESCRIPTION from seg_aggregate_pup_eng where APE_PUP_DRS_ID>0 and APE_ENG_DRS_ID>0 and (APE_PUP_NAME like '%" + searchName + "%' or APE_PUP_NO like '%" + searchName + "%' or APE_ENG_NAME like '%" + searchName + "%' or APE_ENG_NO like '%" + searchName + "%') order by APE_PUP_NAME, APE_ENG_NAME";
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewAggLists.Rows.Add(
|
||||||
|
dataReader["APE_ID"],
|
||||||
|
dataReader["APE_PUP_NAME"],
|
||||||
|
dataReader["APE_PUP_NO"],
|
||||||
|
dataReader["APE_PUP_STATUS"],
|
||||||
|
dataReader["APE_ENG_NAME"],
|
||||||
|
dataReader["APE_ENG_NO"],
|
||||||
|
dataReader["APE_ENG_STATUS"],
|
||||||
|
dataReader["PRT_DESCRIPTION"],
|
||||||
|
dataReader["APE_WLL_NAME"],
|
||||||
|
dataReader["APE_AUDIT_CU"],
|
||||||
|
dataReader["APE_AUDIT_CD"],
|
||||||
|
|
||||||
|
dataReader["APE_PUP_DRS_ID"],
|
||||||
|
dataReader["APE_ENG_DRS_ID"],
|
||||||
|
dataReader["APE_DESCRIPTION"]
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
dataGridViewAggLists.Columns[11].Visible = false;
|
||||||
|
dataGridViewAggLists.Columns[12].Visible = false;
|
||||||
|
dataGridViewAggLists.Columns[13].Visible = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void AggregateStockListForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentAggregateLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchAgg_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
LoadCurrentAggregateLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dataGridViewAggLists_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
LoadCurrentAggregateLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void dataGridViewAggLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
AggregateStockEditForm aseForm = new AggregateStockEditForm();
|
||||||
|
aseForm.formName = " ("+ this.dataGridViewAggLists.CurrentRow.Cells[1].Value.ToString() +" / " + this.dataGridViewAggLists.CurrentRow.Cells[4].Value.ToString() +")";
|
||||||
|
aseForm.apeID = Convert.ToInt32(this.dataGridViewAggLists.CurrentRow.Cells[0].Value.ToString());
|
||||||
|
aseForm.pumpDevID = Convert.ToInt32(this.dataGridViewAggLists.CurrentRow.Cells[11].Value.ToString());
|
||||||
|
aseForm.motorDevID = Convert.ToInt32(this.dataGridViewAggLists.CurrentRow.Cells[12].Value.ToString());
|
||||||
|
aseForm.textBoxPumpName.Text = this.dataGridViewAggLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
aseForm.textBoxPumpSN.Text = this.dataGridViewAggLists.CurrentRow.Cells[2].Value.ToString();
|
||||||
|
aseForm.textBoxMotorName.Text = this.dataGridViewAggLists.CurrentRow.Cells[4].Value.ToString();
|
||||||
|
aseForm.textBoxMotorSN.Text = this.dataGridViewAggLists.CurrentRow.Cells[5].Value.ToString();
|
||||||
|
aseForm.textBoxWellName.Text = this.dataGridViewAggLists.CurrentRow.Cells[8].Value.ToString();
|
||||||
|
|
||||||
|
aseForm.richTextBoxUwagi.Text = this.dataGridViewAggLists.CurrentRow.Cells[13].Value.ToString();
|
||||||
|
|
||||||
|
aseForm.selectedStatus = this.dataGridViewAggLists.CurrentRow.Cells[3].Value.ToString();
|
||||||
|
aseForm.selectedCompanies = this.dataGridViewAggLists.CurrentRow.Cells[7].Value.ToString();
|
||||||
|
|
||||||
|
aseForm.FormClosed += new FormClosedEventHandler(dataGridViewAggLists_FormClosed);
|
||||||
|
aseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonAddAgg_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AggregateStockEditForm aseForm = new AggregateStockEditForm();
|
||||||
|
aseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Accord" publicKeyToken="fa1a88e29555ccf7" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.8.0.0" newVersion="3.8.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Accord.Math" publicKeyToken="fa1a88e29555ccf7" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.8.0.0" newVersion="3.8.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.4.0.0" newVersion="9.4.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
Generated
+120
@@ -0,0 +1,120 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class BackUpForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BackUpForm));
|
||||||
|
this.textBoxFilePath = new System.Windows.Forms.TextBox();
|
||||||
|
this.progressBar = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.buttonSearch = new System.Windows.Forms.Button();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBoxFilePath
|
||||||
|
//
|
||||||
|
this.textBoxFilePath.Enabled = false;
|
||||||
|
this.textBoxFilePath.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxFilePath.Location = new System.Drawing.Point(16, 17);
|
||||||
|
this.textBoxFilePath.Name = "textBoxFilePath";
|
||||||
|
this.textBoxFilePath.Size = new System.Drawing.Size(398, 21);
|
||||||
|
this.textBoxFilePath.TabIndex = 0;
|
||||||
|
this.textBoxFilePath.Text = "Wybierz plik, kliknij – Przeglądaj";
|
||||||
|
//
|
||||||
|
// progressBar
|
||||||
|
//
|
||||||
|
this.progressBar.Location = new System.Drawing.Point(16, 56);
|
||||||
|
this.progressBar.Name = "progressBar";
|
||||||
|
this.progressBar.Size = new System.Drawing.Size(515, 23);
|
||||||
|
this.progressBar.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// buttonSearch
|
||||||
|
//
|
||||||
|
this.buttonSearch.Location = new System.Drawing.Point(420, 16);
|
||||||
|
this.buttonSearch.Name = "buttonSearch";
|
||||||
|
this.buttonSearch.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonSearch.TabIndex = 1;
|
||||||
|
this.buttonSearch.Text = "Przeglądaj";
|
||||||
|
this.buttonSearch.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonSearch.Click += new System.EventHandler(this.buttonSearch_Click);
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(420, 17);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 24;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.label1.ForeColor = System.Drawing.Color.Red;
|
||||||
|
this.label1.Location = new System.Drawing.Point(97, 60);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(324, 16);
|
||||||
|
this.label1.TabIndex = 25;
|
||||||
|
this.label1.Text = "Trwa eksport danych do pliku. Proszę czekać!";
|
||||||
|
//
|
||||||
|
// BackUpForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(555, 103);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.progressBar);
|
||||||
|
this.Controls.Add(this.buttonSearch);
|
||||||
|
this.Controls.Add(this.textBoxFilePath);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "BackUpForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Kopia zapasowa";
|
||||||
|
this.Load += new System.EventHandler(this.BackUpForm_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBoxFilePath;
|
||||||
|
private System.Windows.Forms.ProgressBar progressBar;
|
||||||
|
private System.Windows.Forms.Button buttonSearch;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class BackUpForm : Form
|
||||||
|
{
|
||||||
|
public BackUpForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BackUpForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonClose.Visible = false;
|
||||||
|
label1.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonSearch_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Create a SaveFileDialog to request a path and file name to save to.
|
||||||
|
SaveFileDialog saveRichBoxFile = new SaveFileDialog();
|
||||||
|
DateTime logdate = DateTime.Now;
|
||||||
|
|
||||||
|
// Initialize the SaveFileDialog to specify the RTF extension for the file.
|
||||||
|
saveRichBoxFile.DefaultExt = "*.sql";
|
||||||
|
saveRichBoxFile.Filter = "sql|*.sql";
|
||||||
|
saveRichBoxFile.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||||
|
saveRichBoxFile.FileName = logdate.ToString("yyyyMMdd_HHmmss") + "_softspm_backup";
|
||||||
|
saveRichBoxFile.FilterIndex = 2;
|
||||||
|
saveRichBoxFile.RestoreDirectory = true;
|
||||||
|
|
||||||
|
progressBar.Value = 0;
|
||||||
|
progressBar.Maximum = 10;
|
||||||
|
progressBar.Step = 1;
|
||||||
|
|
||||||
|
|
||||||
|
// Determine if the user selected a file name from the saveFileDialog.
|
||||||
|
if (saveRichBoxFile.ShowDialog() == System.Windows.Forms.DialogResult.OK && saveRichBoxFile.FileName.Length > 0)
|
||||||
|
{
|
||||||
|
buttonSearch.Enabled = false;
|
||||||
|
label1.Visible = true;
|
||||||
|
textBoxFilePath.Text = saveRichBoxFile.FileName;
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
|
// Save the contents of the RichTextBox into the file.
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = new MySqlCommand())
|
||||||
|
{
|
||||||
|
using (MySqlBackup mb = new MySqlBackup(cmd))
|
||||||
|
{
|
||||||
|
cmd.Connection = mySqlFunctions.connection;
|
||||||
|
mySqlFunctions.connection.Open();
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.AddCreateDatabase = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportTableStructure = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportRows = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportProcedures = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportFunctions = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportTriggers = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportViews = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportInfo.ExportEvents = true;
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
mb.ExportToFile(saveRichBoxFile.FileName);
|
||||||
|
progressBar.PerformStep();
|
||||||
|
|
||||||
|
label1.Visible = false;
|
||||||
|
buttonSearch.Visible = false;
|
||||||
|
buttonClose.Visible = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show("Kopia zapasowa została pomyślnie zapisana w pliku:\n" + saveRichBoxFile.FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+154
@@ -0,0 +1,154 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class ChangePassword
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePassword));
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.labelOldPass = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxOldPass = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxNewPass = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxRePass = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(21, 22);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
|
||||||
|
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox1.TabIndex = 0;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// labelOldPass
|
||||||
|
//
|
||||||
|
this.labelOldPass.AutoSize = true;
|
||||||
|
this.labelOldPass.Location = new System.Drawing.Point(202, 26);
|
||||||
|
this.labelOldPass.Name = "labelOldPass";
|
||||||
|
this.labelOldPass.Size = new System.Drawing.Size(65, 13);
|
||||||
|
this.labelOldPass.TabIndex = 0;
|
||||||
|
this.labelOldPass.Text = "Stare hasło:";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(199, 52);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.label1.TabIndex = 2;
|
||||||
|
this.label1.Text = "Nowe hasło:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(160, 78);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(107, 13);
|
||||||
|
this.label2.TabIndex = 4;
|
||||||
|
this.label2.Text = "Powtórz nowe hasło:";
|
||||||
|
//
|
||||||
|
// textBoxOldPass
|
||||||
|
//
|
||||||
|
this.textBoxOldPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxOldPass.Location = new System.Drawing.Point(273, 23);
|
||||||
|
this.textBoxOldPass.Name = "textBoxOldPass";
|
||||||
|
this.textBoxOldPass.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.textBoxOldPass.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxNewPass
|
||||||
|
//
|
||||||
|
this.textBoxNewPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxNewPass.Location = new System.Drawing.Point(273, 49);
|
||||||
|
this.textBoxNewPass.Name = "textBoxNewPass";
|
||||||
|
this.textBoxNewPass.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.textBoxNewPass.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// textBoxRePass
|
||||||
|
//
|
||||||
|
this.textBoxRePass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxRePass.Location = new System.Drawing.Point(273, 75);
|
||||||
|
this.textBoxRePass.Name = "textBoxRePass";
|
||||||
|
this.textBoxRePass.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.textBoxRePass.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(425, 127);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 6;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// ChangePassword
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(554, 175);
|
||||||
|
this.Controls.Add(this.buttonSave);
|
||||||
|
this.Controls.Add(this.textBoxRePass);
|
||||||
|
this.Controls.Add(this.textBoxNewPass);
|
||||||
|
this.Controls.Add(this.textBoxOldPass);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.labelOldPass);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ChangePassword";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Zmiana hasła";
|
||||||
|
this.Load += new System.EventHandler(this.ChangePassword_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.Label labelOldPass;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.TextBox textBoxOldPass;
|
||||||
|
private System.Windows.Forms.TextBox textBoxNewPass;
|
||||||
|
private System.Windows.Forms.TextBox textBoxRePass;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class ChangePassword : Form
|
||||||
|
{
|
||||||
|
public ChangePassword()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (mySqlFunctions.sqlIntValue("select count(1) from sys_users where USR_PASSWORD= md5('"+textBoxOldPass.Text+"') and USR_ID="+vGlobal.tst_usr_id.ToString())>0)
|
||||||
|
{
|
||||||
|
if (String.Compare(textBoxNewPass.Text, textBoxRePass.Text, false) == 0)
|
||||||
|
{
|
||||||
|
mySqlFunctions.Insert("update sys_users set USR_PASSWORD=md5('" + textBoxNewPass.Text + "') where USR_ID=" + vGlobal.tst_usr_id.ToString());
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else MessageBox.Show("Podano dwa różne hasła!");
|
||||||
|
}
|
||||||
|
else MessageBox.Show("Stare hasło jest niepoprawne!");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangePassword_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
textBoxOldPass.MaxLength = 32;
|
||||||
|
textBoxOldPass.PasswordChar = '*';
|
||||||
|
textBoxNewPass.MaxLength = 32;
|
||||||
|
textBoxNewPass.PasswordChar = '*';
|
||||||
|
textBoxRePass.MaxLength = 32;
|
||||||
|
textBoxRePass.PasswordChar = '*';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+133
@@ -0,0 +1,133 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class ChoosePumpUnit
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChoosePumpUnit));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.dataGridViewPumpUnit = new System.Windows.Forms.DataGridView();
|
||||||
|
this.textBoxSearchPumpUnit = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.labelKabelComm = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpUnit)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(17, 18);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(50, 16);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// dataGridViewPumpUnit
|
||||||
|
//
|
||||||
|
this.dataGridViewPumpUnit.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewPumpUnit.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewPumpUnit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewPumpUnit.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewPumpUnit.Location = new System.Drawing.Point(16, 47);
|
||||||
|
this.dataGridViewPumpUnit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.dataGridViewPumpUnit.Name = "dataGridViewPumpUnit";
|
||||||
|
this.dataGridViewPumpUnit.ReadOnly = true;
|
||||||
|
this.dataGridViewPumpUnit.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewPumpUnit.RowHeadersWidth = 51;
|
||||||
|
this.dataGridViewPumpUnit.Size = new System.Drawing.Size(1353, 409);
|
||||||
|
this.dataGridViewPumpUnit.TabIndex = 2;
|
||||||
|
this.dataGridViewPumpUnit.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewPumpUnit_CellContentClick);
|
||||||
|
//
|
||||||
|
// textBoxSearchPumpUnit
|
||||||
|
//
|
||||||
|
this.textBoxSearchPumpUnit.Location = new System.Drawing.Point(81, 15);
|
||||||
|
this.textBoxSearchPumpUnit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.textBoxSearchPumpUnit.Name = "textBoxSearchPumpUnit";
|
||||||
|
this.textBoxSearchPumpUnit.Size = new System.Drawing.Size(281, 22);
|
||||||
|
this.textBoxSearchPumpUnit.TabIndex = 1;
|
||||||
|
this.textBoxSearchPumpUnit.TextChanged += new System.EventHandler(this.textBoxSearchPumpUnit_TextChanged);
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(1221, 470);
|
||||||
|
this.buttonClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(148, 28);
|
||||||
|
this.buttonClose.TabIndex = 3;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// labelKabelComm
|
||||||
|
//
|
||||||
|
this.labelKabelComm.AutoSize = true;
|
||||||
|
this.labelKabelComm.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelKabelComm.ForeColor = System.Drawing.Color.Red;
|
||||||
|
this.labelKabelComm.Location = new System.Drawing.Point(13, 474);
|
||||||
|
this.labelKabelComm.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.labelKabelComm.Name = "labelKabelComm";
|
||||||
|
this.labelKabelComm.Size = new System.Drawing.Size(59, 18);
|
||||||
|
this.labelKabelComm.TabIndex = 4;
|
||||||
|
this.labelKabelComm.Text = "SEGAP";
|
||||||
|
//
|
||||||
|
// ChoosePumpUnit
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(1390, 527);
|
||||||
|
this.Controls.Add(this.labelKabelComm);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.dataGridViewPumpUnit);
|
||||||
|
this.Controls.Add(this.textBoxSearchPumpUnit);
|
||||||
|
this.HelpButton = true;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ChoosePumpUnit";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Lista agregatów";
|
||||||
|
this.Load += new System.EventHandler(this.ChoosePumpUnit_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpUnit)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewPumpUnit;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchPumpUnit;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.Label labelKabelComm;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class ChoosePumpUnit : Form
|
||||||
|
{
|
||||||
|
public ChoosePumpUnit()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCurrentPumpUnit(string srcName = null)
|
||||||
|
{
|
||||||
|
bool brakDanychWystapil = false;
|
||||||
|
string query = "";
|
||||||
|
dataGridViewPumpUnit.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewPumpUnit.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewPumpUnit.ColumnCount = 9;
|
||||||
|
dataGridViewPumpUnit.Columns[0].Name = "id";
|
||||||
|
dataGridViewPumpUnit.Columns[1].Name = "Typ pompy";
|
||||||
|
dataGridViewPumpUnit.Columns[2].Name = "Numer pompy";
|
||||||
|
dataGridViewPumpUnit.Columns[3].Name = "Typ silnika";
|
||||||
|
dataGridViewPumpUnit.Columns[4].Name = "Numer silnika";
|
||||||
|
dataGridViewPumpUnit.Columns[5].Name = "Napięcie [V]";
|
||||||
|
dataGridViewPumpUnit.Columns[6].Name = "Prąd znamionowy [A]";
|
||||||
|
dataGridViewPumpUnit.Columns[7].Name = "Kabel";
|
||||||
|
dataGridViewPumpUnit.Columns[8].Name = "Oddział";
|
||||||
|
|
||||||
|
|
||||||
|
dataGridViewPumpUnit.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpUnit.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpUnit.Columns[8].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
query = "SELECT * FROM tst_aggregate_remonty, seg_dev_resources LEFT JOIN seg_engines ON ENG_ID=DRS_DEV_ID WHERE TAR_ENG_DRS_ID=DRS_ID AND (TAR_PUP_NAME LIKE '%" + srcName + "%' OR TAR_PUP_SN_NO LIKE '%" + srcName + "%' OR TAR_ENG_NAME LIKE '%" + srcName + "%' OR TAR_ENG_SN_NO LIKE '%" + srcName + "%' OR ENG_VOLTAGE LIKE '%" + srcName + "%' OR ENG_ELECTRICITY LIKE '%" + srcName + "%') AND TAR_DEV_RESOURCES_ID=706 order by TAR_PUP_NAME, TAR_ENG_NAME";
|
||||||
|
//query = "SELECT * FROM tst_aggregate_remonty,seg_engines WHERE TAR_ENG_ID=ENG_ID AND (TAR_PUP_NAME LIKE '%" + srcName + "%' OR TAR_PUP_SN_NO LIKE '%" + srcName + "%' OR TAR_ENG_NAME LIKE '%" + srcName + "%' OR TAR_ENG_SN_NO LIKE '%" + srcName + "%' OR ENG_VOLTAGE LIKE '%" + srcName + "%' OR ENG_ELECTRICITY LIKE '%" + srcName + "%') AND TAR_DEV_RESOURCES_ID=706 order by TAR_PUP_NAME, TAR_ENG_NAME";
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
string kabelInfo = dataReader.IsDBNull(10) || string.IsNullOrWhiteSpace(dataReader[10].ToString())
|
||||||
|
? "Brak danych w bazie"
|
||||||
|
: dataReader[10].ToString();
|
||||||
|
|
||||||
|
int rowIndex = dataGridViewPumpUnit.Rows.Add(
|
||||||
|
dataReader["TAR_ID"],
|
||||||
|
dataReader["TAR_PUP_NAME"],
|
||||||
|
dataReader["TAR_PUP_SN_NO"],
|
||||||
|
dataReader["TAR_ENG_NAME"],
|
||||||
|
dataReader["TAR_ENG_SN_NO"],
|
||||||
|
dataReader["ENG_VOLTAGE"],
|
||||||
|
dataReader["ENG_ELECTRICITY"],
|
||||||
|
kabelInfo,
|
||||||
|
dataReader["TAR_DEPARTMENT"]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Jeśli brak danych o kablu – podświetl wiersz na żółto
|
||||||
|
if (kabelInfo == "Brak danych w bazie")
|
||||||
|
{
|
||||||
|
dataGridViewPumpUnit.Rows[rowIndex].DefaultCellStyle.BackColor = Color.LightYellow;
|
||||||
|
brakDanychWystapil = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
|
||||||
|
if (brakDanychWystapil)
|
||||||
|
{
|
||||||
|
labelKabelComm.Text = "UWAGA! Dla niektórych agregatów brak danych o kablu - należy niezwłocznie przeprowadzić synchronizację z SEGAP Remonty.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
labelKabelComm.Text = string.Empty; // wyczyszczenie komunikatu, jeśli wszystko OK
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void ChoosePumpUnit_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpUnit();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchPumpUnit_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpUnit(textBoxSearchPumpUnit.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewPumpUnit_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int rowIndex = e.RowIndex;
|
||||||
|
DataGridViewRow row = dataGridViewPumpUnit.Rows[rowIndex];
|
||||||
|
vGlobal.ape_aggregate_id = Convert.ToInt32(row.Cells[0].Value);
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+112
@@ -0,0 +1,112 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class CompanyLists
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CompanyLists));
|
||||||
|
this.textBoxSearchCompany = new System.Windows.Forms.TextBox();
|
||||||
|
this.dataGridViewCompanyLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewCompanyLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBoxSearchCompany
|
||||||
|
//
|
||||||
|
this.textBoxSearchCompany.Location = new System.Drawing.Point(61, 10);
|
||||||
|
this.textBoxSearchCompany.Name = "textBoxSearchCompany";
|
||||||
|
this.textBoxSearchCompany.Size = new System.Drawing.Size(212, 20);
|
||||||
|
this.textBoxSearchCompany.TabIndex = 1;
|
||||||
|
this.textBoxSearchCompany.TextChanged += new System.EventHandler(this.textBoxSearchCompany_TextChanged);
|
||||||
|
//
|
||||||
|
// dataGridViewCompanyLists
|
||||||
|
//
|
||||||
|
this.dataGridViewCompanyLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewCompanyLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewCompanyLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewCompanyLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewCompanyLists.Location = new System.Drawing.Point(12, 38);
|
||||||
|
this.dataGridViewCompanyLists.Name = "dataGridViewCompanyLists";
|
||||||
|
this.dataGridViewCompanyLists.ReadOnly = true;
|
||||||
|
this.dataGridViewCompanyLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewCompanyLists.Size = new System.Drawing.Size(822, 266);
|
||||||
|
this.dataGridViewCompanyLists.TabIndex = 2;
|
||||||
|
this.dataGridViewCompanyLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewCompanyLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(723, 310);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 3;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// CompanyLists
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(846, 338);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.dataGridViewCompanyLists);
|
||||||
|
this.Controls.Add(this.textBoxSearchCompany);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "CompanyLists";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Lista kontrahentów";
|
||||||
|
this.Load += new System.EventHandler(this.CompanyLists_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewCompanyLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchCompany;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewCompanyLists;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class CompanyLists : Form
|
||||||
|
{
|
||||||
|
public CompanyLists()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje listę klientów
|
||||||
|
private void LoadCurrentCompanyLists(string cpmName = null)
|
||||||
|
{
|
||||||
|
dataGridViewCompanyLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewCompanyLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewCompanyLists.ColumnCount = 3;
|
||||||
|
dataGridViewCompanyLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewCompanyLists.Columns[1].Name = "Nazwa skrócona";
|
||||||
|
dataGridViewCompanyLists.Columns[2].Name = "Pełna nazwa";
|
||||||
|
|
||||||
|
dataGridViewCompanyLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewCompanyLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewCompanyLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from sys_participants where PRT_DESCRIPTION like '%" + cpmName + "%' order by PRT_ID", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewCompanyLists.Rows.Add(
|
||||||
|
dataReader[0],
|
||||||
|
dataReader[1],
|
||||||
|
dataReader[2]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void CompanyLists_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentCompanyLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchCompany_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentCompanyLists(textBoxSearchCompany.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
//MessageBox.Show(textBoxSearchCompany.Text);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewCompanyLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int rowIndex = e.RowIndex;
|
||||||
|
DataGridViewRow row = dataGridViewCompanyLists.Rows[rowIndex];
|
||||||
|
vGlobal.app_participants_id = Convert.ToInt32(row.Cells[0].Value);
|
||||||
|
vGlobal.app_participants_name = row.Cells[2].Value.ToString();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
pumpCatalogueAdd form = new pumpCatalogueAdd();
|
||||||
|
form.pumpID = Convert.ToInt32(pumpID);
|
||||||
|
form.textBoxTypPompy.Text = inPumpType.Text;
|
||||||
|
form.textBoxQn.Text = inQn.Text;
|
||||||
|
form.textBoxHp.Text = inHp.Text;
|
||||||
|
form.textBoxETAmax.Text = inETAmax.Text;
|
||||||
|
form.textBoxDlugosc.Text = inDlugosc.Text;
|
||||||
|
form.textBoxSrednica.Text = inSrednica.Text;
|
||||||
|
form.textBoxMasa.Text = inMasa.Text;
|
||||||
|
form.comboBoxProd.Text = inManufacturers.Text;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+160
@@ -0,0 +1,160 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class CompanyListsData
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CompanyListsData));
|
||||||
|
this.dataGridViewKontrahList = new System.Windows.Forms.DataGridView();
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.buttonDodajKonrtah = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewKontrahList)).BeginInit();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dataGridViewKontrahList
|
||||||
|
//
|
||||||
|
this.dataGridViewKontrahList.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewKontrahList.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewKontrahList.AllowUserToOrderColumns = true;
|
||||||
|
this.dataGridViewKontrahList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewKontrahList.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewKontrahList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.dataGridViewKontrahList.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.dataGridViewKontrahList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.dataGridViewKontrahList.Name = "dataGridViewKontrahList";
|
||||||
|
this.dataGridViewKontrahList.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewKontrahList.RowHeadersWidth = 51;
|
||||||
|
this.dataGridViewKontrahList.Size = new System.Drawing.Size(925, 391);
|
||||||
|
this.dataGridViewKontrahList.TabIndex = 5;
|
||||||
|
this.dataGridViewKontrahList.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewKontrahList_CellEndEdit);
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 1;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.dataGridViewKontrahList, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 2;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 88.07018F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.92982F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(933, 454);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.buttonClose);
|
||||||
|
this.panel1.Controls.Add(this.buttonSave);
|
||||||
|
this.panel1.Controls.Add(this.buttonDodajKonrtah);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(4, 403);
|
||||||
|
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(925, 47);
|
||||||
|
this.panel1.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(765, 9);
|
||||||
|
this.buttonClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(148, 28);
|
||||||
|
this.buttonClose.TabIndex = 11;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(765, 9);
|
||||||
|
this.buttonSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(148, 28);
|
||||||
|
this.buttonSave.TabIndex = 8;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// buttonDodajKonrtah
|
||||||
|
//
|
||||||
|
this.buttonDodajKonrtah.Image = ((System.Drawing.Image)(resources.GetObject("buttonDodajKonrtah.Image")));
|
||||||
|
this.buttonDodajKonrtah.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonDodajKonrtah.Location = new System.Drawing.Point(12, 9);
|
||||||
|
this.buttonDodajKonrtah.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.buttonDodajKonrtah.Name = "buttonDodajKonrtah";
|
||||||
|
this.buttonDodajKonrtah.Size = new System.Drawing.Size(148, 28);
|
||||||
|
this.buttonDodajKonrtah.TabIndex = 7;
|
||||||
|
this.buttonDodajKonrtah.Text = "Dodaj";
|
||||||
|
this.buttonDodajKonrtah.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonDodajKonrtah.Click += new System.EventHandler(this.buttonDodajKonrtah_Click);
|
||||||
|
//
|
||||||
|
// CompanyListsData
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(933, 454);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "CompanyListsData";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Oddziały";
|
||||||
|
this.Load += new System.EventHandler(this.CompanyListsData_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewKontrahList)).EndInit();
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewKontrahList;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
private System.Windows.Forms.Button buttonDodajKonrtah;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class CompanyListsData : Form
|
||||||
|
{
|
||||||
|
private MySqlDataAdapter sqlDataAdapter = null;
|
||||||
|
private MySqlCommandBuilder sqlCommandBuilder = null;
|
||||||
|
private DataTable dataTable = null;
|
||||||
|
private BindingSource bindingSource = null;
|
||||||
|
|
||||||
|
public CompanyListsData()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCurrentKontrah()
|
||||||
|
{
|
||||||
|
sqlDataAdapter = new MySqlDataAdapter("select PRT_ID,PRT_NAME,PRT_DESCRIPTION from sys_participants order by PRT_ID", mySqlFunctions.connection);
|
||||||
|
sqlCommandBuilder = new MySqlCommandBuilder(sqlDataAdapter);
|
||||||
|
dataTable = new DataTable();
|
||||||
|
sqlDataAdapter.Fill(dataTable);
|
||||||
|
bindingSource = new BindingSource();
|
||||||
|
bindingSource.DataSource = dataTable;
|
||||||
|
dataGridViewKontrahList.DataSource = bindingSource;
|
||||||
|
|
||||||
|
dataGridViewKontrahList.Columns["PRT_ID"].HeaderText = "Id";
|
||||||
|
dataGridViewKontrahList.Columns["PRT_ID"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
|
||||||
|
dataGridViewKontrahList.Columns["PRT_NAME"].HeaderText = "Nazwa skrócona";
|
||||||
|
dataGridViewKontrahList.Columns["PRT_NAME"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
dataGridViewKontrahList.Columns["PRT_DESCRIPTION"].HeaderText = "Nazwa pełna";
|
||||||
|
dataGridViewKontrahList.Columns["PRT_DESCRIPTION"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CompanyListsData_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Dla RAMBu
|
||||||
|
buttonDodajKonrtah.Visible = false;
|
||||||
|
|
||||||
|
buttonSave.Visible = false;
|
||||||
|
buttonClose.Visible = true;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentKontrah();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewKontrahList_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
buttonClose.Visible = false;
|
||||||
|
buttonSave.Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
sqlDataAdapter.Update(dataTable);
|
||||||
|
}
|
||||||
|
catch (Exception exceptionObj)
|
||||||
|
{
|
||||||
|
MessageBox.Show(exceptionObj.Message.ToString());
|
||||||
|
}
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonDodajKonrtah_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CompanyListsDataAdd newAddForm = new CompanyListsDataAdd();
|
||||||
|
newAddForm.FormClosed += new FormClosedEventHandler(buttonDodajKonrtah_FormClosed);
|
||||||
|
newAddForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
void buttonDodajKonrtah_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
buttonSave.Visible = false;
|
||||||
|
buttonClose.Visible = true;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentKontrah();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+115
@@ -0,0 +1,115 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class CompanyListsDataAdd
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CompanyListsDataAdd));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxShortName = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxFullName = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(19, 28);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(90, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Nazwa skrócona:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(35, 57);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(74, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Nazwa pełna:";
|
||||||
|
//
|
||||||
|
// textBoxShortName
|
||||||
|
//
|
||||||
|
this.textBoxShortName.Location = new System.Drawing.Point(115, 25);
|
||||||
|
this.textBoxShortName.Name = "textBoxShortName";
|
||||||
|
this.textBoxShortName.Size = new System.Drawing.Size(266, 20);
|
||||||
|
this.textBoxShortName.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxFullName
|
||||||
|
//
|
||||||
|
this.textBoxFullName.Location = new System.Drawing.Point(115, 54);
|
||||||
|
this.textBoxFullName.Name = "textBoxFullName";
|
||||||
|
this.textBoxFullName.Size = new System.Drawing.Size(266, 20);
|
||||||
|
this.textBoxFullName.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(399, 96);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 4;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// CompanyListsDataAdd
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(511, 131);
|
||||||
|
this.Controls.Add(this.buttonSave);
|
||||||
|
this.Controls.Add(this.textBoxFullName);
|
||||||
|
this.Controls.Add(this.textBoxShortName);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "CompanyListsDataAdd";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Dodawanie nowego kontrahenta";
|
||||||
|
this.Load += new System.EventHandler(this.CompanyListsDataAdd_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.TextBox textBoxShortName;
|
||||||
|
private System.Windows.Forms.TextBox textBoxFullName;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class CompanyListsDataAdd : Form
|
||||||
|
{
|
||||||
|
public CompanyListsDataAdd()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompanyListsDataAdd_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (textBoxShortName.TextLength>2 && textBoxFullName.TextLength>2)
|
||||||
|
{
|
||||||
|
if (mySqlFunctions.sqlIntValue("select count(*) from sys_participants where PRT_NAME='" + textBoxShortName.Text + "' and PRT_DESCRIPTION='" + textBoxFullName.Text + "'") == 0)
|
||||||
|
{
|
||||||
|
mySqlFunctions.Insert("INSERT INTO sys_participants SET PRT_NAME='" + textBoxShortName.Text + "',PRT_DESCRIPTION='" + textBoxFullName.Text + "',PRT_SYSTEM_TYPE='SoftSPM_test',PRT_SYSTEM_ACCESS_LEVEL=1,PRT_STATUS='1',PRT_AUDIT_CU='" + vGlobal.tst_login_name + "',PRT_AUDIT_CD=now()");
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Wprowadzone nazwy muszą zawierać co najmniej 3 znaki.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+134
@@ -0,0 +1,134 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class LoginForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.textBoxLogin = new System.Windows.Forms.TextBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxPass = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonLogin = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
|
||||||
|
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox1.TabIndex = 0;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// textBoxLogin
|
||||||
|
//
|
||||||
|
this.textBoxLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxLogin.Location = new System.Drawing.Point(205, 24);
|
||||||
|
this.textBoxLogin.Name = "textBoxLogin";
|
||||||
|
this.textBoxLogin.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.textBoxLogin.TabIndex = 1;
|
||||||
|
this.textBoxLogin.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxLogin_KeyUp);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.label1.Location = new System.Drawing.Point(158, 27);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(41, 15);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Login:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(157, 54);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(42, 15);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Hasło:";
|
||||||
|
//
|
||||||
|
// textBoxPass
|
||||||
|
//
|
||||||
|
this.textBoxPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPass.Location = new System.Drawing.Point(205, 51);
|
||||||
|
this.textBoxPass.Name = "textBoxPass";
|
||||||
|
this.textBoxPass.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.textBoxPass.TabIndex = 3;
|
||||||
|
this.textBoxPass.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxPass_KeyUp);
|
||||||
|
//
|
||||||
|
// buttonLogin
|
||||||
|
//
|
||||||
|
this.buttonLogin.Location = new System.Drawing.Point(382, 93);
|
||||||
|
this.buttonLogin.Name = "buttonLogin";
|
||||||
|
this.buttonLogin.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonLogin.TabIndex = 4;
|
||||||
|
this.buttonLogin.Text = "OK";
|
||||||
|
this.buttonLogin.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
|
||||||
|
//
|
||||||
|
// LoginForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(495, 155);
|
||||||
|
this.Controls.Add(this.buttonLogin);
|
||||||
|
this.Controls.Add(this.textBoxPass);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.textBoxLogin);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "LoginForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "SoftSPM - Logowanie";
|
||||||
|
this.Load += new System.EventHandler(this.LoginForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxLogin;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.TextBox textBoxPass;
|
||||||
|
private System.Windows.Forms.Button buttonLogin;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class LoginForm : Form
|
||||||
|
{
|
||||||
|
public LoginForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoginForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
textBoxPass.MaxLength = 32;
|
||||||
|
textBoxPass.PasswordChar = '*';
|
||||||
|
|
||||||
|
string userRoot = "HKEY_CURRENT_USER\\SoftSPM";
|
||||||
|
string noSuch = (string)Microsoft.Win32.Registry.GetValue(userRoot, "COMPANY_NAME", "");
|
||||||
|
|
||||||
|
if (String.Compare(noSuch, "SoftSPM", true) == 0)
|
||||||
|
{
|
||||||
|
string vLastLoginName = Microsoft.Win32.Registry.GetValue(userRoot + "\\SPM_TST", "LAST_USER", "").ToString();
|
||||||
|
textBoxLogin.Text = vLastLoginName;
|
||||||
|
if (vLastLoginName.Length>0)
|
||||||
|
{
|
||||||
|
textBoxPass.Focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LogIn()
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select USR_ID,USR_FIRST_NAME,USR_LAST_NAME,TUT_TYPE from sys_users left join tst_users_type ON TUT_USR_ID=USR_ID where USR_USERNAME='" + textBoxLogin.Text + "' and USR_PASSWORD=md5('" + textBoxPass.Text + "')", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
|
||||||
|
vGlobal.tst_usr_id = Convert.ToInt32(dataReader["USR_ID"].ToString());
|
||||||
|
vGlobal.tst_login_name = dataReader["USR_FIRST_NAME"].ToString() + " " + dataReader["USR_LAST_NAME"].ToString();
|
||||||
|
if (String.Compare(dataReader["TUT_TYPE"].ToString(), "1", true) == 0)
|
||||||
|
vGlobal.tst_login_admin_priv = true;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index > 0)
|
||||||
|
{
|
||||||
|
vGlobal.tst_login_acces = true;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Wprowadzono błędny login lub hasło!");
|
||||||
|
textBoxPass.Text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonLogin_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
const string userRoot = "HKEY_CURRENT_USER\\SoftSPM";
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "LAST_USER", textBoxLogin.Text);
|
||||||
|
|
||||||
|
LogIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxLogin_KeyUp(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
LogIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxPass_KeyUp(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
LogIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+114
@@ -0,0 +1,114 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class ModbusServerConfigForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ModbusServerConfigForm));
|
||||||
|
this.inSterownikPort = new System.Windows.Forms.TextBox();
|
||||||
|
this.inSterownikIP = new System.Windows.Forms.TextBox();
|
||||||
|
this.inButtonOK = new System.Windows.Forms.Button();
|
||||||
|
this.user_label = new System.Windows.Forms.Label();
|
||||||
|
this.IP_label = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// inSterownikPort
|
||||||
|
//
|
||||||
|
this.inSterownikPort.Location = new System.Drawing.Point(159, 63);
|
||||||
|
this.inSterownikPort.Name = "inSterownikPort";
|
||||||
|
this.inSterownikPort.Size = new System.Drawing.Size(181, 20);
|
||||||
|
this.inSterownikPort.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// inSterownikIP
|
||||||
|
//
|
||||||
|
this.inSterownikIP.Location = new System.Drawing.Point(159, 37);
|
||||||
|
this.inSterownikIP.Name = "inSterownikIP";
|
||||||
|
this.inSterownikIP.Size = new System.Drawing.Size(181, 20);
|
||||||
|
this.inSterownikIP.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// inButtonOK
|
||||||
|
//
|
||||||
|
this.inButtonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.inButtonOK.Location = new System.Drawing.Point(378, 66);
|
||||||
|
this.inButtonOK.Name = "inButtonOK";
|
||||||
|
this.inButtonOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.inButtonOK.TabIndex = 17;
|
||||||
|
this.inButtonOK.Text = "OK";
|
||||||
|
this.inButtonOK.UseVisualStyleBackColor = true;
|
||||||
|
this.inButtonOK.Click += new System.EventHandler(this.inButtonOK_Click);
|
||||||
|
//
|
||||||
|
// user_label
|
||||||
|
//
|
||||||
|
this.user_label.AutoSize = true;
|
||||||
|
this.user_label.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.user_label.Location = new System.Drawing.Point(39, 66);
|
||||||
|
this.user_label.Name = "user_label";
|
||||||
|
this.user_label.Size = new System.Drawing.Size(29, 13);
|
||||||
|
this.user_label.TabIndex = 11;
|
||||||
|
this.user_label.Text = "Port:";
|
||||||
|
//
|
||||||
|
// IP_label
|
||||||
|
//
|
||||||
|
this.IP_label.AutoSize = true;
|
||||||
|
this.IP_label.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.IP_label.Location = new System.Drawing.Point(39, 40);
|
||||||
|
this.IP_label.Name = "IP_label";
|
||||||
|
this.IP_label.Size = new System.Drawing.Size(104, 13);
|
||||||
|
this.IP_label.TabIndex = 9;
|
||||||
|
this.IP_label.Text = "Adres IP sterownika:";
|
||||||
|
//
|
||||||
|
// ModbusServerConfigForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(504, 124);
|
||||||
|
this.Controls.Add(this.inSterownikPort);
|
||||||
|
this.Controls.Add(this.inSterownikIP);
|
||||||
|
this.Controls.Add(this.inButtonOK);
|
||||||
|
this.Controls.Add(this.user_label);
|
||||||
|
this.Controls.Add(this.IP_label);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ModbusServerConfigForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Konfiguracja połączenia z szfoą sterowniczą";
|
||||||
|
this.Load += new System.EventHandler(this.ModbusServerConfigForm_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox inSterownikPort;
|
||||||
|
private System.Windows.Forms.TextBox inSterownikIP;
|
||||||
|
private System.Windows.Forms.Button inButtonOK;
|
||||||
|
private System.Windows.Forms.Label user_label;
|
||||||
|
private System.Windows.Forms.Label IP_label;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class ModbusServerConfigForm : Form
|
||||||
|
{
|
||||||
|
public ModbusServerConfigForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ModbusServerConfigForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
inSterownikIP.Text = vGlobal.vModbus_hostname;
|
||||||
|
inSterownikPort.Text = vGlobal.vModbus_port;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void inButtonOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
modBusFunctions.CloseConnection();
|
||||||
|
|
||||||
|
const string userRoot = "HKEY_CURRENT_USER\\SoftSPM";
|
||||||
|
|
||||||
|
vGlobal.vModbus_hostname = inSterownikIP.Text;
|
||||||
|
vGlobal.vModbus_port = inSterownikPort.Text;
|
||||||
|
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "MODBUS_TCP", inSterownikIP.Text);
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "MODBUS_PORT", inSterownikPort.Text);
|
||||||
|
|
||||||
|
|
||||||
|
modBusFunctions.initConnection();
|
||||||
|
if (!modBusFunctions.isConnected)
|
||||||
|
MessageBox.Show("Problem z połączeniem z serwerem Modbus TCP");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modBusFunctions.isConnected = false;
|
||||||
|
//ReadWriteFile.SaveDbAccessConfig();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+128
@@ -0,0 +1,128 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class MotorStockChFromCatalogForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MotorStockChFromCatalogForm));
|
||||||
|
this.dataGridViewMotorLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxSearchMotor = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonWybierz = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dataGridViewMotorLists
|
||||||
|
//
|
||||||
|
this.dataGridViewMotorLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewMotorLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewMotorLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewMotorLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewMotorLists.Location = new System.Drawing.Point(12, 36);
|
||||||
|
this.dataGridViewMotorLists.Name = "dataGridViewMotorLists";
|
||||||
|
this.dataGridViewMotorLists.ReadOnly = true;
|
||||||
|
this.dataGridViewMotorLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewMotorLists.Size = new System.Drawing.Size(860, 294);
|
||||||
|
this.dataGridViewMotorLists.TabIndex = 2;
|
||||||
|
this.dataGridViewMotorLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewMotorLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(9, 13);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// textBoxSearchMotor
|
||||||
|
//
|
||||||
|
this.textBoxSearchMotor.Location = new System.Drawing.Point(57, 10);
|
||||||
|
this.textBoxSearchMotor.Name = "textBoxSearchMotor";
|
||||||
|
this.textBoxSearchMotor.Size = new System.Drawing.Size(143, 20);
|
||||||
|
this.textBoxSearchMotor.TabIndex = 1;
|
||||||
|
this.textBoxSearchMotor.TextChanged += new System.EventHandler(this.textBoxSearchPump_TextChanged);
|
||||||
|
//
|
||||||
|
// buttonWybierz
|
||||||
|
//
|
||||||
|
this.buttonWybierz.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonWybierz.Image = global::StacjaProb.Properties.Resources.if_table_select_row_64781;
|
||||||
|
this.buttonWybierz.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonWybierz.Location = new System.Drawing.Point(764, 336);
|
||||||
|
this.buttonWybierz.Name = "buttonWybierz";
|
||||||
|
this.buttonWybierz.Size = new System.Drawing.Size(108, 23);
|
||||||
|
this.buttonWybierz.TabIndex = 4;
|
||||||
|
this.buttonWybierz.Text = "Wybierz";
|
||||||
|
this.buttonWybierz.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonWybierz.Click += new System.EventHandler(this.buttonWybierz_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(13, 336);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 3;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// MotorStockChFromCatalogForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 366);
|
||||||
|
this.Controls.Add(this.buttonWybierz);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.dataGridViewMotorLists);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.textBoxSearchMotor);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MotorStockChFromCatalogForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Wybierz silnik";
|
||||||
|
this.Load += new System.EventHandler(this.MotorStockChFromCatalogForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewMotorLists;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchMotor;
|
||||||
|
private System.Windows.Forms.Button buttonWybierz;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class MotorStockChFromCatalogForm : Form
|
||||||
|
{
|
||||||
|
public MotorStockChFromCatalogForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje stan silników
|
||||||
|
private void LoadCurrentMotorLists(string motorName = null)
|
||||||
|
{
|
||||||
|
dataGridViewMotorLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewMotorLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewMotorLists.ColumnCount = 7;
|
||||||
|
dataGridViewMotorLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewMotorLists.Columns[1].Name = "Typ silnika";
|
||||||
|
dataGridViewMotorLists.Columns[2].Name = "Moc [kW]";
|
||||||
|
dataGridViewMotorLists.Columns[3].Name = "Napięcie [V]";
|
||||||
|
dataGridViewMotorLists.Columns[4].Name = "Sprawność";
|
||||||
|
dataGridViewMotorLists.Columns[5].Name = "Obroty";
|
||||||
|
dataGridViewMotorLists.Columns[6].Name = "Producent";
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from seg_engines left join seg_manufacturers on MCF_ID=ENG_MCF_ID where ENG_NAME like '%"+ motorName + "%' order by ENG_NAME,ENG_POWER", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewMotorLists.Rows.Add(
|
||||||
|
dataReader["ENG_ID"],
|
||||||
|
dataReader["ENG_NAME"],
|
||||||
|
dataReader["ENG_POWER"],
|
||||||
|
dataReader["ENG_VOLTAGE"],
|
||||||
|
dataReader["ENG_ETA"],
|
||||||
|
dataReader["ENG_RPM"],
|
||||||
|
dataReader["MCF_NAME"]
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void MotorStockChFromCatalogForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = false;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchPump_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorLists(textBoxSearchMotor.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewMotorLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = true;
|
||||||
|
}
|
||||||
|
catch{ }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonWybierz_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MotorStockEditForm.newMotorID = Convert.ToInt32(this.dataGridViewMotorLists.CurrentRow.Cells[0].Value.ToString().Replace(".", ","));
|
||||||
|
MotorStockEditForm.newMotorName = this.dataGridViewMotorLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+512
@@ -0,0 +1,512 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class MotorStockEditForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MotorStockEditForm));
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonDelete = new System.Windows.Forms.Button();
|
||||||
|
this.labelMkW = new System.Windows.Forms.Label();
|
||||||
|
this.labelMV = new System.Windows.Forms.Label();
|
||||||
|
this.labelMSN = new System.Windows.Forms.Label();
|
||||||
|
this.labelMName = new System.Windows.Forms.Label();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
|
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.dateTimePickerUpdate = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.richTextBoxUwagi = new System.Windows.Forms.RichTextBox();
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panel4 = new System.Windows.Forms.Panel();
|
||||||
|
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.pictureBoxSearchMotor = new System.Windows.Forms.PictureBox();
|
||||||
|
this.comboBoxCompany = new System.Windows.Forms.ComboBox();
|
||||||
|
this.textBoxPName = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxNS = new System.Windows.Forms.TextBox();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.comboBoxStatus = new System.Windows.Forms.ComboBox();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.linkLabelHistoria = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.dateTimePickerAva = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.dateTimePickerBuy = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.groupBox3.SuspendLayout();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.panel4.SuspendLayout();
|
||||||
|
this.groupBox4.SuspendLayout();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchMotor)).BeginInit();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(236, 0);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 2;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(130, 0);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 1;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.buttonCancel);
|
||||||
|
this.panel1.Controls.Add(this.buttonDelete);
|
||||||
|
this.panel1.Controls.Add(this.buttonSave);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(345, 335);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(336, 26);
|
||||||
|
this.panel1.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// buttonDelete
|
||||||
|
//
|
||||||
|
this.buttonDelete.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonDelete.Image = global::StacjaProb.Properties.Resources.if_database_delete_35951;
|
||||||
|
this.buttonDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonDelete.Location = new System.Drawing.Point(24, 0);
|
||||||
|
this.buttonDelete.Name = "buttonDelete";
|
||||||
|
this.buttonDelete.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonDelete.TabIndex = 0;
|
||||||
|
this.buttonDelete.Text = "Usuń";
|
||||||
|
this.buttonDelete.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);
|
||||||
|
//
|
||||||
|
// labelMkW
|
||||||
|
//
|
||||||
|
this.labelMkW.AutoSize = true;
|
||||||
|
this.labelMkW.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMkW.Location = new System.Drawing.Point(83, 112);
|
||||||
|
this.labelMkW.Name = "labelMkW";
|
||||||
|
this.labelMkW.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMkW.TabIndex = 18;
|
||||||
|
this.labelMkW.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMV
|
||||||
|
//
|
||||||
|
this.labelMV.AutoSize = true;
|
||||||
|
this.labelMV.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMV.Location = new System.Drawing.Point(83, 84);
|
||||||
|
this.labelMV.Name = "labelMV";
|
||||||
|
this.labelMV.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMV.TabIndex = 17;
|
||||||
|
this.labelMV.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMSN
|
||||||
|
//
|
||||||
|
this.labelMSN.AutoSize = true;
|
||||||
|
this.labelMSN.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMSN.Location = new System.Drawing.Point(83, 57);
|
||||||
|
this.labelMSN.Name = "labelMSN";
|
||||||
|
this.labelMSN.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMSN.TabIndex = 16;
|
||||||
|
this.labelMSN.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMName
|
||||||
|
//
|
||||||
|
this.labelMName.AutoSize = true;
|
||||||
|
this.labelMName.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMName.Location = new System.Drawing.Point(81, 31);
|
||||||
|
this.labelMName.Name = "labelMName";
|
||||||
|
this.labelMName.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMName.TabIndex = 15;
|
||||||
|
this.labelMName.Text = "...";
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Location = new System.Drawing.Point(36, 114);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label8.TabIndex = 14;
|
||||||
|
this.label8.Text = "Hn [m]:";
|
||||||
|
//
|
||||||
|
// label9
|
||||||
|
//
|
||||||
|
this.label9.AutoSize = true;
|
||||||
|
this.label9.Location = new System.Drawing.Point(19, 84);
|
||||||
|
this.label9.Name = "label9";
|
||||||
|
this.label9.Size = new System.Drawing.Size(58, 13);
|
||||||
|
this.label9.TabIndex = 12;
|
||||||
|
this.label9.Text = "Qn [m3/h]:";
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.AutoSize = true;
|
||||||
|
this.label10.Location = new System.Drawing.Point(15, 33);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label10.TabIndex = 8;
|
||||||
|
this.label10.Text = "Typ pompy:";
|
||||||
|
//
|
||||||
|
// label11
|
||||||
|
//
|
||||||
|
this.label11.AutoSize = true;
|
||||||
|
this.label11.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label11.Name = "label11";
|
||||||
|
this.label11.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label11.TabIndex = 10;
|
||||||
|
this.label11.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// groupBox3
|
||||||
|
//
|
||||||
|
this.groupBox3.Controls.Add(this.labelMkW);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMV);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMSN);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMName);
|
||||||
|
this.groupBox3.Controls.Add(this.label8);
|
||||||
|
this.groupBox3.Controls.Add(this.label9);
|
||||||
|
this.groupBox3.Controls.Add(this.label10);
|
||||||
|
this.groupBox3.Controls.Add(this.label11);
|
||||||
|
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox3.Location = new System.Drawing.Point(3, 169);
|
||||||
|
this.groupBox3.Name = "groupBox3";
|
||||||
|
this.groupBox3.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox3.TabIndex = 6;
|
||||||
|
this.groupBox3.TabStop = false;
|
||||||
|
this.groupBox3.Text = "Powiązana pompa";
|
||||||
|
//
|
||||||
|
// dateTimePickerUpdate
|
||||||
|
//
|
||||||
|
this.dateTimePickerUpdate.Location = new System.Drawing.Point(109, 78);
|
||||||
|
this.dateTimePickerUpdate.Name = "dateTimePickerUpdate";
|
||||||
|
this.dateTimePickerUpdate.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerUpdate.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.Location = new System.Drawing.Point(15, 81);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(88, 13);
|
||||||
|
this.label7.TabIndex = 4;
|
||||||
|
this.label7.Text = "Data aktualizacji:";
|
||||||
|
//
|
||||||
|
// richTextBoxUwagi
|
||||||
|
//
|
||||||
|
this.richTextBoxUwagi.Location = new System.Drawing.Point(3, 19);
|
||||||
|
this.richTextBoxUwagi.Name = "richTextBoxUwagi";
|
||||||
|
this.richTextBoxUwagi.Size = new System.Drawing.Size(327, 129);
|
||||||
|
this.richTextBoxUwagi.TabIndex = 0;
|
||||||
|
this.richTextBoxUwagi.Text = "";
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel4, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(684, 364);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// panel4
|
||||||
|
//
|
||||||
|
this.panel4.Controls.Add(this.groupBox4);
|
||||||
|
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel4.Location = new System.Drawing.Point(345, 169);
|
||||||
|
this.panel4.Name = "panel4";
|
||||||
|
this.panel4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.panel4.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// groupBox4
|
||||||
|
//
|
||||||
|
this.groupBox4.Controls.Add(this.richTextBoxUwagi);
|
||||||
|
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox4.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.groupBox4.Name = "groupBox4";
|
||||||
|
this.groupBox4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox4.TabIndex = 0;
|
||||||
|
this.groupBox4.TabStop = false;
|
||||||
|
this.groupBox4.Text = "Uwagi";
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.pictureBoxSearchMotor);
|
||||||
|
this.groupBox1.Controls.Add(this.comboBoxCompany);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPName);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxNS);
|
||||||
|
this.groupBox1.Controls.Add(this.label4);
|
||||||
|
this.groupBox1.Controls.Add(this.label3);
|
||||||
|
this.groupBox1.Controls.Add(this.label1);
|
||||||
|
this.groupBox1.Controls.Add(this.label2);
|
||||||
|
this.groupBox1.Controls.Add(this.comboBoxStatus);
|
||||||
|
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Dane podstawowe";
|
||||||
|
//
|
||||||
|
// pictureBoxSearchMotor
|
||||||
|
//
|
||||||
|
this.pictureBoxSearchMotor.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.pictureBoxSearchMotor.Image = global::StacjaProb.Properties.Resources.Zoom_in_icon;
|
||||||
|
this.pictureBoxSearchMotor.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.pictureBoxSearchMotor.Location = new System.Drawing.Point(286, 24);
|
||||||
|
this.pictureBoxSearchMotor.Name = "pictureBoxSearchMotor";
|
||||||
|
this.pictureBoxSearchMotor.Size = new System.Drawing.Size(31, 26);
|
||||||
|
this.pictureBoxSearchMotor.TabIndex = 18;
|
||||||
|
this.pictureBoxSearchMotor.TabStop = false;
|
||||||
|
this.pictureBoxSearchMotor.Click += new System.EventHandler(this.pictureBoxSearchMotor_Click);
|
||||||
|
//
|
||||||
|
// comboBoxCompany
|
||||||
|
//
|
||||||
|
this.comboBoxCompany.FormattingEnabled = true;
|
||||||
|
this.comboBoxCompany.Location = new System.Drawing.Point(83, 109);
|
||||||
|
this.comboBoxCompany.Name = "comboBoxCompany";
|
||||||
|
this.comboBoxCompany.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxCompany.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// textBoxPName
|
||||||
|
//
|
||||||
|
this.textBoxPName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPName.Location = new System.Drawing.Point(83, 30);
|
||||||
|
this.textBoxPName.Name = "textBoxPName";
|
||||||
|
this.textBoxPName.ReadOnly = true;
|
||||||
|
this.textBoxPName.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPName.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxNS
|
||||||
|
//
|
||||||
|
this.textBoxNS.Location = new System.Drawing.Point(83, 56);
|
||||||
|
this.textBoxNS.Name = "textBoxNS";
|
||||||
|
this.textBoxNS.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxNS.TabIndex = 3;
|
||||||
|
this.textBoxNS.Leave += new System.EventHandler(this.textBoxNS_Leave);
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(15, 112);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label4.TabIndex = 6;
|
||||||
|
this.label4.Text = "Kontrahent:";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(37, 85);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(40, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "Status:";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(17, 32);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(60, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Typ silnika:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// comboBoxStatus
|
||||||
|
//
|
||||||
|
this.comboBoxStatus.FormattingEnabled = true;
|
||||||
|
this.comboBoxStatus.Location = new System.Drawing.Point(83, 82);
|
||||||
|
this.comboBoxStatus.Name = "comboBoxStatus";
|
||||||
|
this.comboBoxStatus.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxStatus.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.linkLabelHistoria);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerUpdate);
|
||||||
|
this.groupBox2.Controls.Add(this.label7);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerAva);
|
||||||
|
this.groupBox2.Controls.Add(this.label6);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerBuy);
|
||||||
|
this.groupBox2.Controls.Add(this.label5);
|
||||||
|
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(345, 3);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox2.TabIndex = 1;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Dodatkowe informacje";
|
||||||
|
//
|
||||||
|
// linkLabelHistoria
|
||||||
|
//
|
||||||
|
this.linkLabelHistoria.AutoSize = true;
|
||||||
|
this.linkLabelHistoria.Location = new System.Drawing.Point(227, 117);
|
||||||
|
this.linkLabelHistoria.Name = "linkLabelHistoria";
|
||||||
|
this.linkLabelHistoria.Size = new System.Drawing.Size(82, 13);
|
||||||
|
this.linkLabelHistoria.TabIndex = 6;
|
||||||
|
this.linkLabelHistoria.TabStop = true;
|
||||||
|
this.linkLabelHistoria.Text = "Pokaż historię »";
|
||||||
|
this.linkLabelHistoria.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelHistoria_LinkClicked);
|
||||||
|
//
|
||||||
|
// dateTimePickerAva
|
||||||
|
//
|
||||||
|
this.dateTimePickerAva.Location = new System.Drawing.Point(109, 52);
|
||||||
|
this.dateTimePickerAva.Name = "dateTimePickerAva";
|
||||||
|
this.dateTimePickerAva.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerAva.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(26, 55);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(77, 13);
|
||||||
|
this.label6.TabIndex = 2;
|
||||||
|
this.label6.Text = "Data przyjęcia:";
|
||||||
|
//
|
||||||
|
// dateTimePickerBuy
|
||||||
|
//
|
||||||
|
this.dateTimePickerBuy.Location = new System.Drawing.Point(109, 26);
|
||||||
|
this.dateTimePickerBuy.Name = "dateTimePickerBuy";
|
||||||
|
this.dateTimePickerBuy.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerBuy.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(32, 29);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(71, 13);
|
||||||
|
this.label5.TabIndex = 0;
|
||||||
|
this.label5.Text = "Data zakupu:";
|
||||||
|
//
|
||||||
|
// MotorStockEditForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(684, 364);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MotorStockEditForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Silnik - stan";
|
||||||
|
this.Load += new System.EventHandler(this.MotorStockEditForm_Load);
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.groupBox3.ResumeLayout(false);
|
||||||
|
this.groupBox3.PerformLayout();
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.panel4.ResumeLayout(false);
|
||||||
|
this.groupBox4.ResumeLayout(false);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchMotor)).EndInit();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Button buttonDelete;
|
||||||
|
private System.Windows.Forms.Label labelMkW;
|
||||||
|
private System.Windows.Forms.Label labelMV;
|
||||||
|
private System.Windows.Forms.Label labelMSN;
|
||||||
|
private System.Windows.Forms.Label labelMName;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Label label9;
|
||||||
|
private System.Windows.Forms.Label label10;
|
||||||
|
private System.Windows.Forms.Label label11;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox3;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerUpdate;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.RichTextBox richTextBoxUwagi;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Panel panel4;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox4;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBoxSearchMotor;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxCompany;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPName;
|
||||||
|
public System.Windows.Forms.TextBox textBoxNS;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxStatus;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerAva;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerBuy;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelHistoria;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class MotorStockEditForm : Form
|
||||||
|
{
|
||||||
|
public int devID;
|
||||||
|
public string selectedStatus = "";
|
||||||
|
public string selectedCompanies = "";
|
||||||
|
public static int newMotorID = 0;
|
||||||
|
public static string newMotorName = "";
|
||||||
|
|
||||||
|
public MotorStockEditForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MotorStockEditForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadStatuses();
|
||||||
|
LoadCompanies();
|
||||||
|
if (devID > 0)
|
||||||
|
{
|
||||||
|
pictureBoxSearchMotor.Visible = false;
|
||||||
|
LoadConectPump();
|
||||||
|
buttonSave.Text = "Aktualizuj";
|
||||||
|
richTextBoxUwagi.Text = mySqlFunctions.sqlStringValue("select DRS_DEV_DESCRIPTION from seg_dev_resources where DRS_ID=" + devID.ToString(), "DRS_DEV_DESCRIPTION");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buttonSave.Enabled = false;
|
||||||
|
buttonDelete.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadStatuses()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select DIC_ID,DIC_POL_LANG from sys_dictionaries where DIC_TYPE_ID=1 order by DIC_POL_LANG", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxStatus.Items.Insert(index, dataReader["DIC_POL_LANG"].ToString());
|
||||||
|
|
||||||
|
// zaznacza jako selected
|
||||||
|
if (dataReader["DIC_POL_LANG"].ToString() == selectedStatus)
|
||||||
|
comboBoxStatus.SelectedIndex = comboBoxStatus.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCompanies()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from sys_participants order by PRT_NAME", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxCompany.Items.Insert(index, dataReader["PRT_DESCRIPTION"].ToString());
|
||||||
|
|
||||||
|
if (dataReader["PRT_DESCRIPTION"].ToString() == selectedCompanies)
|
||||||
|
comboBoxCompany.SelectedIndex = comboBoxCompany.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//połączone pompy
|
||||||
|
private void LoadConectPump()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select APE_PUP_NAME,APE_PUP_NO,PUP_Q_N,PUP_H_P from seg_aggregate_pup_eng left join seg_pumps on PUP_ID=APE_PUP_ID where APE_ENG_DRS_ID=" + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
labelMName.Text = dataReader["APE_PUP_NAME"].ToString();
|
||||||
|
labelMSN.Text = dataReader["APE_PUP_NO"].ToString();
|
||||||
|
labelMV.Text = dataReader["PUP_Q_N"].ToString();
|
||||||
|
labelMkW.Text = dataReader["PUP_H_P"].ToString();
|
||||||
|
buttonDelete.Enabled = false;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string statID = mySqlFunctions.sqlStringValue("select DIC_ID from sys_dictionaries where DIC_POL_LANG='" + comboBoxStatus.SelectedItem.ToString() + "'", "DIC_ID");
|
||||||
|
string partID = mySqlFunctions.sqlStringValue("select PRT_ID from sys_participants where PRT_DESCRIPTION ='" + comboBoxCompany.SelectedItem.ToString() + "'", "PRT_ID");
|
||||||
|
|
||||||
|
//jeśli mamy do czynienia z EDYCJĄ - aktualizaujemy
|
||||||
|
if (devID > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_SN_NUMBER='" + textBoxNS.Text + "',DRS_BUY_DATE='" + dateTimePickerBuy.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_AVAILABLE_DATE='" + dateTimePickerAva.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_STATUS_DIC_ID='" + statID + "',DRS_DEV_DESCRIPTION='" + richTextBoxUwagi.Text + "',DRS_AUDIT_DATE=now(), DRS_AUDIT_USR= '" + partID + "' WHERE DRS_ID=" + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources where DRS_ID = " + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
//dodajemy
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Dodaje");
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("INSERT INTO seg_dev_resources SET DRS_DEV_ID=" + newMotorID.ToString() + ",DRS_DEV_TYPE=11,DRS_SN_NUMBER='" + textBoxNS.Text + "',DRS_BUY_DATE='" + dateTimePickerBuy.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_AVAILABLE_DATE='" + dateTimePickerAva.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_STATUS_DIC_ID='" + statID + "',DRS_DEV_DESCRIPTION='" + richTextBoxUwagi.Text + "',DRS_AUDIT_USR='" + partID + "',DRS_AUDIT_DATE=now()", mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources where DRS_ID=(select max(DRS_ID) from seg_dev_resources)", mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pictureBoxSearchMotor_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
textBoxPName.Text = newMotorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxNS_Leave(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (textBoxNS.TextLength > 0)
|
||||||
|
buttonSave.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pictureBoxSearchMotor_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MotorStockChFromCatalogForm mscfcForm = new MotorStockChFromCatalogForm();
|
||||||
|
mscfcForm.FormClosed += new FormClosedEventHandler(pictureBoxSearchMotor_FormClosed);
|
||||||
|
mscfcForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabelHistoria_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
MotorStockHistoryForm mshForm = new MotorStockHistoryForm();
|
||||||
|
mshForm.devID = devID;
|
||||||
|
mshForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (MessageBox.Show("UWAGA!\nProces nieodwracalny.\nCzy na pewno chcesz usunąć silnik ze stanu?", "Potwierdzenie usunięcia z bazy", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("DELETE FROM seg_dev_resources WHERE DRS_ID = " + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+166
@@ -0,0 +1,166 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class MotorStockHistoryForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MotorStockHistoryForm));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.labelDate = new System.Windows.Forms.Label();
|
||||||
|
this.labelName = new System.Windows.Forms.Label();
|
||||||
|
this.dataGridViewMotorHistory = new System.Windows.Forms.DataGridView();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.dataGridViewAggHistory = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorHistory)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(734, 14);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(71, 13);
|
||||||
|
this.label1.TabIndex = 13;
|
||||||
|
this.label1.Text = "Data zakupu:";
|
||||||
|
//
|
||||||
|
// labelDate
|
||||||
|
//
|
||||||
|
this.labelDate.AutoSize = true;
|
||||||
|
this.labelDate.Location = new System.Drawing.Point(811, 14);
|
||||||
|
this.labelDate.Name = "labelDate";
|
||||||
|
this.labelDate.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.labelDate.TabIndex = 12;
|
||||||
|
this.labelDate.Text = "2017-12-12";
|
||||||
|
//
|
||||||
|
// labelName
|
||||||
|
//
|
||||||
|
this.labelName.AutoSize = true;
|
||||||
|
this.labelName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelName.Location = new System.Drawing.Point(12, 7);
|
||||||
|
this.labelName.Name = "labelName";
|
||||||
|
this.labelName.Size = new System.Drawing.Size(92, 20);
|
||||||
|
this.labelName.TabIndex = 11;
|
||||||
|
this.labelName.Text = "Typ silnika";
|
||||||
|
//
|
||||||
|
// dataGridViewMotorHistory
|
||||||
|
//
|
||||||
|
this.dataGridViewMotorHistory.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewMotorHistory.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewMotorHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewMotorHistory.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewMotorHistory.Location = new System.Drawing.Point(12, 61);
|
||||||
|
this.dataGridViewMotorHistory.Name = "dataGridViewMotorHistory";
|
||||||
|
this.dataGridViewMotorHistory.ReadOnly = true;
|
||||||
|
this.dataGridViewMotorHistory.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewMotorHistory.Size = new System.Drawing.Size(860, 217);
|
||||||
|
this.dataGridViewMotorHistory.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(761, 526);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 2;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// dataGridViewAggHistory
|
||||||
|
//
|
||||||
|
this.dataGridViewAggHistory.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewAggHistory.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewAggHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewAggHistory.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewAggHistory.Location = new System.Drawing.Point(12, 303);
|
||||||
|
this.dataGridViewAggHistory.Name = "dataGridViewAggHistory";
|
||||||
|
this.dataGridViewAggHistory.ReadOnly = true;
|
||||||
|
this.dataGridViewAggHistory.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewAggHistory.Size = new System.Drawing.Size(860, 217);
|
||||||
|
this.dataGridViewAggHistory.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(9, 45);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(74, 13);
|
||||||
|
this.label2.TabIndex = 17;
|
||||||
|
this.label2.Text = "Historia silnika";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(9, 287);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(95, 13);
|
||||||
|
this.label3.TabIndex = 18;
|
||||||
|
this.label3.Text = "Historia agregatów";
|
||||||
|
//
|
||||||
|
// MotorStockHistoryForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 557);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.dataGridViewAggHistory);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.labelDate);
|
||||||
|
this.Controls.Add(this.labelName);
|
||||||
|
this.Controls.Add(this.dataGridViewMotorHistory);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MotorStockHistoryForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Historia silnika";
|
||||||
|
this.Load += new System.EventHandler(this.MotorStockHistoryForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorHistory)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label labelDate;
|
||||||
|
private System.Windows.Forms.Label labelName;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewMotorHistory;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewAggHistory;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class MotorStockHistoryForm : Form
|
||||||
|
{
|
||||||
|
public int devID;
|
||||||
|
|
||||||
|
public MotorStockHistoryForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MotorStockHistoryForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dataGridViewMotorHistory.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewMotorHistory.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewMotorHistory.ColumnCount = 5;
|
||||||
|
dataGridViewMotorHistory.Columns[0].Name = "Numer silnika";
|
||||||
|
dataGridViewMotorHistory.Columns[1].Name = "Status";
|
||||||
|
dataGridViewMotorHistory.Columns[2].Name = "Kontrahent";
|
||||||
|
dataGridViewMotorHistory.Columns[3].Name = "Opis";
|
||||||
|
dataGridViewMotorHistory.Columns[4].Name = "Data aktualizacji";
|
||||||
|
|
||||||
|
dataGridViewMotorHistory.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorHistory.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorHistory.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorHistory.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorHistory.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select ENG_NAME,DRS_SN_NUMBER,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION,DRS_DEV_DESCRIPTION,DRS_AUDIT_DATE from seg_dev_resources_his,seg_engines where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_ID=" + devID.ToString() + " order by DRS_AUDIT_DATE desc", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewMotorHistory.Rows.Add(
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["PRT_DESCRIPTION"],
|
||||||
|
dataReader["DRS_DEV_DESCRIPTION"],
|
||||||
|
dataReader["DRS_AUDIT_DATE"]
|
||||||
|
);
|
||||||
|
|
||||||
|
labelName.Text = dataReader["ENG_NAME"].ToString();
|
||||||
|
|
||||||
|
if (dataReader["DRS_BUY_DATE"].ToString().Length > 0)
|
||||||
|
labelDate.Text = dataReader["DRS_BUY_DATE"].ToString();
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewAggHistory.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewAggHistory.ColumnCount = 5;
|
||||||
|
dataGridViewAggHistory.Columns[0].Name = "Numer silnika";
|
||||||
|
dataGridViewAggHistory.Columns[1].Name = "Pompa";
|
||||||
|
dataGridViewAggHistory.Columns[2].Name = "Numer pompy";
|
||||||
|
dataGridViewAggHistory.Columns[3].Name = "Kontrahent";
|
||||||
|
dataGridViewAggHistory.Columns[4].Name = "Data";
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd1 = new MySql.Data.MySqlClient.MySqlCommand("select APE_ENG_NO,APE_PUP_NAME,APE_PUP_NO,(select PRT_DESCRIPTION from sys_participants where PRT_ID=APE_PRT_ID) PRT_DESCRIPTION,SUBSTRING(APE_AUDIT_CD,1,10) APE_AUDIT_CD from seg_aggregate_pup_eng_his where APE_ENG_DRS_ID=" + devID.ToString() + " order by APE_AUDIT_CD desc", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader1 = cmd1.ExecuteReader();
|
||||||
|
while (dataReader1.Read())
|
||||||
|
{
|
||||||
|
dataGridViewAggHistory.Rows.Add(
|
||||||
|
dataReader1["APE_ENG_NO"],
|
||||||
|
dataReader1["APE_PUP_NAME"],
|
||||||
|
dataReader1["APE_PUP_NO"],
|
||||||
|
dataReader1["PRT_DESCRIPTION"],
|
||||||
|
dataReader1["APE_AUDIT_CD"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dataReader1.Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+127
@@ -0,0 +1,127 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class MotorStockListForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MotorStockListForm));
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.buttonAddMotor = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.dataGridViewMotorLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.textBoxSearchMotor = new System.Windows.Forms.TextBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(761, 406);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 4;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// buttonAddMotor
|
||||||
|
//
|
||||||
|
this.buttonAddMotor.Image = ((System.Drawing.Image)(resources.GetObject("buttonAddMotor.Image")));
|
||||||
|
this.buttonAddMotor.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonAddMotor.Location = new System.Drawing.Point(12, 406);
|
||||||
|
this.buttonAddMotor.Name = "buttonAddMotor";
|
||||||
|
this.buttonAddMotor.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonAddMotor.TabIndex = 3;
|
||||||
|
this.buttonAddMotor.Text = "Dodaj";
|
||||||
|
this.buttonAddMotor.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonAddMotor.Click += new System.EventHandler(this.buttonAddMotor_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(17, 15);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// dataGridViewMotorLists
|
||||||
|
//
|
||||||
|
this.dataGridViewMotorLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewMotorLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewMotorLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewMotorLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewMotorLists.Location = new System.Drawing.Point(12, 47);
|
||||||
|
this.dataGridViewMotorLists.Name = "dataGridViewMotorLists";
|
||||||
|
this.dataGridViewMotorLists.ReadOnly = true;
|
||||||
|
this.dataGridViewMotorLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewMotorLists.Size = new System.Drawing.Size(860, 353);
|
||||||
|
this.dataGridViewMotorLists.TabIndex = 2;
|
||||||
|
this.dataGridViewMotorLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewMotorLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// textBoxSearchMotor
|
||||||
|
//
|
||||||
|
this.textBoxSearchMotor.Location = new System.Drawing.Point(65, 12);
|
||||||
|
this.textBoxSearchMotor.Name = "textBoxSearchMotor";
|
||||||
|
this.textBoxSearchMotor.Size = new System.Drawing.Size(212, 20);
|
||||||
|
this.textBoxSearchMotor.TabIndex = 1;
|
||||||
|
this.textBoxSearchMotor.TextChanged += new System.EventHandler(this.textBoxSearchMotor_TextChanged);
|
||||||
|
//
|
||||||
|
// MotorStockListForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 440);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.buttonAddMotor);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.dataGridViewMotorLists);
|
||||||
|
this.Controls.Add(this.textBoxSearchMotor);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MotorStockListForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Stan silników";
|
||||||
|
this.Load += new System.EventHandler(this.MotorStockListForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewMotorLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.Button buttonAddMotor;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewMotorLists;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchMotor;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class MotorStockListForm : Form
|
||||||
|
{
|
||||||
|
public MotorStockListForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
this.Text += " (" + vGlobal.app_participants_name + ")";
|
||||||
|
else
|
||||||
|
this.Text += " (Wszyscy kontrahenci)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje stan pomp
|
||||||
|
private void LoadCurrentMotorLists(string motorName = null)
|
||||||
|
{
|
||||||
|
motorName = textBoxSearchMotor.Text;
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewMotorLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewMotorLists.ColumnCount = 11;
|
||||||
|
dataGridViewMotorLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewMotorLists.Columns[1].Name = "Typ silnika";
|
||||||
|
dataGridViewMotorLists.Columns[2].Name = "Numer silnika";
|
||||||
|
dataGridViewMotorLists.Columns[3].Name = "Moc [kW]";
|
||||||
|
dataGridViewMotorLists.Columns[4].Name = "Naięcie [V]";
|
||||||
|
dataGridViewMotorLists.Columns[5].Name = "Producent";
|
||||||
|
dataGridViewMotorLists.Columns[6].Name = "Status";
|
||||||
|
dataGridViewMotorLists.Columns[7].Name = "Data zakupu";
|
||||||
|
dataGridViewMotorLists.Columns[8].Name = "Data przyjęcia";
|
||||||
|
dataGridViewMotorLists.Columns[9].Name = "Data aktualizacji";
|
||||||
|
dataGridViewMotorLists.Columns[10].Name = "Oddział";
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewMotorLists.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[8].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[9].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewMotorLists.Columns[10].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
|
||||||
|
string query = "";
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
query = "select DRS_ID,ENG_NAME,DRS_SN_NUMBER,ENG_VOLTAGE,ENG_POWER,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,SUBSTRING(DRS_AVAILABLE_DATE,1,10) DRS_AVAILABLE_DATE,SUBSTRING(DRS_AUDIT_DATE,1,10) DRS_AUDIT_DATE,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_RESOURCES_DIC_ID) DIC_POL_LANG,DRS_AUDIT_USR from seg_dev_resources, seg_engines left join seg_manufacturers on ENG_MCF_ID=MCF_ID where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_AUDIT_USR='" + vGlobal.app_participants_name.ToString() + "' and (ENG_NAME like '%" + motorName + "%' or DRS_SN_NUMBER like '%" + motorName + "%') order by ENG_NAME,ENG_POWER";
|
||||||
|
else
|
||||||
|
query = "select DRS_ID,ENG_NAME,DRS_SN_NUMBER,ENG_VOLTAGE,ENG_POWER,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,SUBSTRING(DRS_AVAILABLE_DATE,1,10) DRS_AVAILABLE_DATE,SUBSTRING(DRS_AUDIT_DATE,1,10) DRS_AUDIT_DATE,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_RESOURCES_DIC_ID) DIC_POL_LANG,DRS_AUDIT_USR PRT_DESCRIPTION from seg_dev_resources, seg_engines left join seg_manufacturers on ENG_MCF_ID=MCF_ID where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and (ENG_NAME like '%" + motorName + "%' or DRS_SN_NUMBER like '%" + motorName + "%') order by ENG_NAME,ENG_POWER";
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewMotorLists.Rows.Add(
|
||||||
|
dataReader["DRS_ID"],
|
||||||
|
dataReader["ENG_NAME"],
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["ENG_POWER"],
|
||||||
|
dataReader["ENG_VOLTAGE"],
|
||||||
|
dataReader["MCF_NAME"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["DRS_BUY_DATE"],
|
||||||
|
dataReader["DRS_AVAILABLE_DATE"],
|
||||||
|
dataReader["DRS_AUDIT_DATE"],
|
||||||
|
dataReader["DRS_AUDIT_USR"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
dataGridViewMotorLists.Columns[10].Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void MotorStockListForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchMotor_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentMotorLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonAddMotor_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MotorStockEditForm mseForm = new MotorStockEditForm();
|
||||||
|
mseForm.selectedStatus = "Nowy";
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
mseForm.selectedCompanies = vGlobal.app_participants_name;
|
||||||
|
|
||||||
|
mseForm.FormClosed += new FormClosedEventHandler(dataGridViewMotorLists_FormClosed);
|
||||||
|
mseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
void dataGridViewMotorLists_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
LoadCurrentMotorLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewMotorLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
MotorStockEditForm mseForm = new MotorStockEditForm();
|
||||||
|
mseForm.devID = Convert.ToInt32(this.dataGridViewMotorLists.CurrentRow.Cells[0].Value.ToString());
|
||||||
|
mseForm.textBoxPName.Text = this.dataGridViewMotorLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
mseForm.textBoxNS.Text = this.dataGridViewMotorLists.CurrentRow.Cells[2].Value.ToString();
|
||||||
|
mseForm.dateTimePickerBuy.Text = this.dataGridViewMotorLists.CurrentRow.Cells[7].Value.ToString();
|
||||||
|
mseForm.dateTimePickerAva.Text = this.dataGridViewMotorLists.CurrentRow.Cells[8].Value.ToString();
|
||||||
|
mseForm.dateTimePickerUpdate.Text = this.dataGridViewMotorLists.CurrentRow.Cells[9].Value.ToString();
|
||||||
|
mseForm.selectedStatus = this.dataGridViewMotorLists.CurrentRow.Cells[6].Value.ToString();
|
||||||
|
mseForm.selectedCompanies = this.dataGridViewMotorLists.CurrentRow.Cells[10].Value.ToString();
|
||||||
|
|
||||||
|
mseForm.FormClosed += new FormClosedEventHandler(dataGridViewMotorLists_FormClosed);
|
||||||
|
|
||||||
|
mseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+125
@@ -0,0 +1,125 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class MySQLServerConfigForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MySQLServerConfigForm));
|
||||||
|
this.IP_label = new System.Windows.Forms.Label();
|
||||||
|
this.user_label = new System.Windows.Forms.Label();
|
||||||
|
this.pass_label = new System.Windows.Forms.Label();
|
||||||
|
this.inHostName = new System.Windows.Forms.TextBox();
|
||||||
|
this.inUserName = new System.Windows.Forms.TextBox();
|
||||||
|
this.inPasword = new System.Windows.Forms.TextBox();
|
||||||
|
this.inButtonOK = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.inDbName = new System.Windows.Forms.TextBox();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// IP_label
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.IP_label, "IP_label");
|
||||||
|
this.IP_label.Name = "IP_label";
|
||||||
|
//
|
||||||
|
// user_label
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.user_label, "user_label");
|
||||||
|
this.user_label.Name = "user_label";
|
||||||
|
//
|
||||||
|
// pass_label
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.pass_label, "pass_label");
|
||||||
|
this.pass_label.Name = "pass_label";
|
||||||
|
//
|
||||||
|
// inHostName
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.inHostName, "inHostName");
|
||||||
|
this.inHostName.Name = "inHostName";
|
||||||
|
//
|
||||||
|
// inUserName
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.inUserName, "inUserName");
|
||||||
|
this.inUserName.Name = "inUserName";
|
||||||
|
//
|
||||||
|
// inPasword
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.inPasword, "inPasword");
|
||||||
|
this.inPasword.Name = "inPasword";
|
||||||
|
//
|
||||||
|
// inButtonOK
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.inButtonOK, "inButtonOK");
|
||||||
|
this.inButtonOK.Name = "inButtonOK";
|
||||||
|
this.inButtonOK.UseVisualStyleBackColor = true;
|
||||||
|
this.inButtonOK.Click += new System.EventHandler(this.inButtonOK_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.label1, "label1");
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
//
|
||||||
|
// inDbName
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.inDbName, "inDbName");
|
||||||
|
this.inDbName.Name = "inDbName";
|
||||||
|
//
|
||||||
|
// MySQLServerConfigForm
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this, "$this");
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.inDbName);
|
||||||
|
this.Controls.Add(this.inPasword);
|
||||||
|
this.Controls.Add(this.inUserName);
|
||||||
|
this.Controls.Add(this.inHostName);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.inButtonOK);
|
||||||
|
this.Controls.Add(this.pass_label);
|
||||||
|
this.Controls.Add(this.user_label);
|
||||||
|
this.Controls.Add(this.IP_label);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "MySQLServerConfigForm";
|
||||||
|
this.Load += new System.EventHandler(this.MySQLServerConfigForm_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label IP_label;
|
||||||
|
private System.Windows.Forms.Label user_label;
|
||||||
|
private System.Windows.Forms.Label pass_label;
|
||||||
|
private System.Windows.Forms.TextBox inHostName;
|
||||||
|
private System.Windows.Forms.TextBox inUserName;
|
||||||
|
private System.Windows.Forms.TextBox inPasword;
|
||||||
|
private System.Windows.Forms.Button inButtonOK;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox inDbName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class MySQLServerConfigForm : Form
|
||||||
|
{
|
||||||
|
public MySQLServerConfigForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
inPasword.MaxLength = 32;
|
||||||
|
inPasword.PasswordChar = '*';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MySQLServerConfigForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
inHostName.Text = vGlobal.vMySql_hostname;
|
||||||
|
inUserName.Text = vGlobal.vMySql_user;
|
||||||
|
inPasword.Text = vGlobal.vMySql_pass;
|
||||||
|
inDbName.Text = vGlobal.vMySql_dbname;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void inButtonOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
const string userRoot = "HKEY_CURRENT_USER\\SoftSPM";
|
||||||
|
|
||||||
|
vGlobal.vMySql_hostname = inHostName.Text;
|
||||||
|
vGlobal.vMySql_dbname = inDbName.Text;
|
||||||
|
vGlobal.vMySql_user = inUserName.Text;
|
||||||
|
vGlobal.vMySql_pass = inPasword.Text;
|
||||||
|
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "HOST_NAME", inHostName.Text);
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "DB_USER", inUserName.Text);
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "DB_USER_PASSWORD", inPasword.Text);
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot + "\\SPM_TST", "DB_NAME", inDbName.Text);
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (!mySqlFunctions.OpenConnection())
|
||||||
|
MessageBox.Show("Problem z połączeniem z bazą danych");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
//ReadWriteFile.SaveDbAccessConfig();
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Generated
+62
@@ -0,0 +1,62 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class PleaseWait
|
||||||
|
{
|
||||||
|
/// <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 Component 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.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.label1.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.label1.Location = new System.Drawing.Point(49, 12);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(401, 24);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Proszę Czekać - trwa wczytywanie danych";
|
||||||
|
//
|
||||||
|
// PleaseWait
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.MenuText;
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Name = "PleaseWait";
|
||||||
|
this.Size = new System.Drawing.Size(500, 50);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class PleaseWait : UserControl
|
||||||
|
{
|
||||||
|
public PleaseWait()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
Generated
+123
@@ -0,0 +1,123 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class ProductKeyForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductKeyForm));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxProductKey = new System.Windows.Forms.TextBox();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 18);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(131, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Wprowadź klucz produktu";
|
||||||
|
//
|
||||||
|
// textBoxProductKey
|
||||||
|
//
|
||||||
|
this.textBoxProductKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxProductKey.Location = new System.Drawing.Point(15, 34);
|
||||||
|
this.textBoxProductKey.MaxLength = 35;
|
||||||
|
this.textBoxProductKey.Name = "textBoxProductKey";
|
||||||
|
this.textBoxProductKey.Size = new System.Drawing.Size(394, 22);
|
||||||
|
this.textBoxProductKey.TabIndex = 1;
|
||||||
|
this.textBoxProductKey.TextChanged += new System.EventHandler(this.textBoxProductKey_TextChanged);
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(12, 91);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(286, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Jeśli nie posiadasz klucza, skontaktuj się z administratorem:";
|
||||||
|
//
|
||||||
|
// linkLabel1
|
||||||
|
//
|
||||||
|
this.linkLabel1.AutoSize = true;
|
||||||
|
this.linkLabel1.Location = new System.Drawing.Point(295, 91);
|
||||||
|
this.linkLabel1.Name = "linkLabel1";
|
||||||
|
this.linkLabel1.Size = new System.Drawing.Size(94, 13);
|
||||||
|
this.linkLabel1.TabIndex = 3;
|
||||||
|
this.linkLabel1.TabStop = true;
|
||||||
|
this.linkLabel1.Text = "info@softspm.com";
|
||||||
|
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(415, 34);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 10;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// ProductKeyForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
||||||
|
this.ClientSize = new System.Drawing.Size(531, 130);
|
||||||
|
this.Controls.Add(this.buttonSave);
|
||||||
|
this.Controls.Add(this.linkLabel1);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.textBoxProductKey);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ProductKeyForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Rejestracja produktu";
|
||||||
|
this.Load += new System.EventHandler(this.ProductKeyForm_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxProductKey;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class ProductKeyForm : Form
|
||||||
|
{
|
||||||
|
public ProductKeyForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process proc = new System.Diagnostics.Process();
|
||||||
|
proc.StartInfo.FileName = "mailto:info@softspm.com?subject=SoftSPM[Stacja Prób] - Klucz produktu&body=Klucz produktu dla "+ vGlobal.softwareLicencePart001 +" "+ vGlobal.softwareLicencePart002;
|
||||||
|
proc.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxProductKey_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//textBoxProductKey.Text = textBoxProductKey.Text.ToUpper();
|
||||||
|
textBoxProductKey.CharacterCasing = CharacterCasing.Upper;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (textBoxProductKey.Text == vGlobal.softwareProductKey)
|
||||||
|
{
|
||||||
|
vGlobal.softwareProductKeyIsOK = true;
|
||||||
|
string userRoot = "HKEY_CURRENT_USER\\SoftSPM";
|
||||||
|
Microsoft.Win32.Registry.SetValue(userRoot, "PRODUCT_KEY", textBoxProductKey.Text);
|
||||||
|
MessageBox.Show("Dziękujemy za zakup produktu SoftSPM – Stacja Prób.\n\n"+ vGlobal.softwareLicenceFull);
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (MessageBox.Show("UWAGA!\nWprowadzony klucz produktu jest niepoprawny.\nCzy chcesz korzystać z wersji nielicencjonowanej – brak możliwości prowadzenia prób?", "Weryfikacja klucza produktu", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
vGlobal.softwareProductKeyIsOK = false;
|
||||||
|
vGlobal.softwareLicenceFull = "BRAK LICENCJI – skontaktuj się z autorem systemu: info@softspm.com";
|
||||||
|
vGlobal.softwareLicencePart001 = "BRAK LICENCJI";
|
||||||
|
vGlobal.softwareLicencePart001 = "BRAK LICENCJI";
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProductKeyForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new OknoGlowneForm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("StacjaProb")]
|
||||||
|
[assembly: AssemblyDescription("StacjaProb")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("SoftSPM Przemysław Zatorski")]
|
||||||
|
[assembly: AssemblyProduct("StacjaProb")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © SoftSPM 2017")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("e3625a64-4fa1-4557-bb06-c08a02955691")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("2.01.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("2.01.0.0")]
|
||||||
+323
@@ -0,0 +1,323 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Ten kod został wygenerowany przez narzędzie.
|
||||||
|
// Wersja wykonawcza:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Zmiany w tym pliku mogą spowodować nieprawidłowe zachowanie i zostaną utracone, jeśli
|
||||||
|
// kod zostanie ponownie wygenerowany.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace StacjaProb.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Klasa zasobu wymagająca zdefiniowania typu do wyszukiwania zlokalizowanych ciągów itd.
|
||||||
|
/// </summary>
|
||||||
|
// Ta klasa została automatycznie wygenerowana za pomocą klasy StronglyTypedResourceBuilder
|
||||||
|
// przez narzędzie, takie jak ResGen lub Visual Studio.
|
||||||
|
// Aby dodać lub usunąć składową, edytuj plik ResX, a następnie ponownie uruchom narzędzie ResGen
|
||||||
|
// z opcją /str lub ponownie utwórz projekt VS.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Zwraca buforowane wystąpienie ResourceManager używane przez tę klasę.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StacjaProb.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Przesłania właściwość CurrentUICulture bieżącego wątku dla wszystkich
|
||||||
|
/// przypadków przeszukiwania zasobów za pomocą tej klasy zasobów wymagającej zdefiniowania typu.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap chart_icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("chart-icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap database_icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("database-icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap database_table_icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("database-table-icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap go_32146 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("go_32146", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_about_us_465047 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_about_us_465047", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_Blue_Backup_B_66548 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_Blue_Backup_B_66548", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_data_management_44975 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_data_management_44975", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_database_delete_35951 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_database_delete_35951", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_document_save_118916 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_document-save_118916", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_document_save_29767 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_document-save_29767", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_exit_28363 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_exit_28363", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_free_14_463013 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_free-14_463013", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_icon_112_search_plus_314479 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_icon-112-search-plus_314479", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_icon_125_printer_text_314822 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_icon-125-printer-text_314822", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_refresh_59198 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_refresh_59198", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_search_database_49618 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_search-database_49618", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_table_edit_64757 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_table_edit_64757", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap if_table_select_row_64781 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("if_table_select_row_64781", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap logo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("logo", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap logo_ramb {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("logo-ramb", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap mpwik {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("mpwik", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap mpwik1 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("mpwik1", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap mpwik2 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("mpwik2", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap pre_64 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("pre_64", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap red_search_icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("red-search-icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wyszukuje zlokalizowany zasób typu System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Zoom_in_icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Zoom-in-icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
<?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>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="if_icon-125-printer-text_314822" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_icon-125-printer-text_314822.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="database-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\database-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpwik2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\mpwik2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_free-14_463013" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_free-14_463013.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_data_management_44975" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_data_management_44975.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_document-save_118916" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_document-save_118916.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_table_select_row_64781" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_table_select_row_64781.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\logo.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_about_us_465047" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_about_us_465047.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_refresh_59198" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_refresh_59198.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_Blue_Backup_B_66548" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_Blue_Backup_B_66548.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_database_delete_35951" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_database_delete_35951.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpwik" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\mpwik.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="chart-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\chart-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="go_32146" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\go_32146.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="database-table-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\database-table-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_exit_28363" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_exit_28363.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_document-save_29767" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_document-save_29767.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_table_edit_64757" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_table_edit_64757.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="red-search-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\red-search-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="mpwik1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\mpwik1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_icon-112-search-plus_314479" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_icon-112-search-plus_314479.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Zoom-in-icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\Zoom-in-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="if_search-database_49618" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\if_search-database_49618.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="pre_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\pre_64.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="logo-ramb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\images\logo-ramb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace StacjaProb.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class PumpStockChFromCatalogForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
|
||||||
|
System.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PumpStockChFromCatalogForm));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxSearchPump = new System.Windows.Forms.TextBox();
|
||||||
|
this.dataGridViewPumpLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.buttonWybierz = new System.Windows.Forms.Button();
|
||||||
|
this.chartH = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||||
|
this.chartETA = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chartH)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chartETA)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(8, 15);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// textBoxSearchPump
|
||||||
|
//
|
||||||
|
this.textBoxSearchPump.Location = new System.Drawing.Point(56, 12);
|
||||||
|
this.textBoxSearchPump.Name = "textBoxSearchPump";
|
||||||
|
this.textBoxSearchPump.Size = new System.Drawing.Size(143, 20);
|
||||||
|
this.textBoxSearchPump.TabIndex = 1;
|
||||||
|
this.textBoxSearchPump.TextChanged += new System.EventHandler(this.textBoxSearchPump_TextChanged);
|
||||||
|
//
|
||||||
|
// dataGridViewPumpLists
|
||||||
|
//
|
||||||
|
this.dataGridViewPumpLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewPumpLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewPumpLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewPumpLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewPumpLists.Location = new System.Drawing.Point(11, 38);
|
||||||
|
this.dataGridViewPumpLists.Name = "dataGridViewPumpLists";
|
||||||
|
this.dataGridViewPumpLists.ReadOnly = true;
|
||||||
|
this.dataGridViewPumpLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewPumpLists.Size = new System.Drawing.Size(450, 494);
|
||||||
|
this.dataGridViewPumpLists.TabIndex = 2;
|
||||||
|
this.dataGridViewPumpLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewPumpLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// buttonWybierz
|
||||||
|
//
|
||||||
|
this.buttonWybierz.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonWybierz.Image = global::StacjaProb.Properties.Resources.if_table_select_row_64781;
|
||||||
|
this.buttonWybierz.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonWybierz.Location = new System.Drawing.Point(771, 541);
|
||||||
|
this.buttonWybierz.Name = "buttonWybierz";
|
||||||
|
this.buttonWybierz.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonWybierz.TabIndex = 6;
|
||||||
|
this.buttonWybierz.Text = "Wybierz";
|
||||||
|
this.buttonWybierz.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonWybierz.Click += new System.EventHandler(this.buttonWybierz_Click);
|
||||||
|
//
|
||||||
|
// chartH
|
||||||
|
//
|
||||||
|
this.chartH.BorderlineColor = System.Drawing.Color.Blue;
|
||||||
|
this.chartH.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
|
||||||
|
this.chartH.Location = new System.Drawing.Point(467, 38);
|
||||||
|
this.chartH.Name = "chartH";
|
||||||
|
this.chartH.Size = new System.Drawing.Size(404, 244);
|
||||||
|
this.chartH.TabIndex = 3;
|
||||||
|
this.chartH.Text = "chart1";
|
||||||
|
title1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
title1.ForeColor = System.Drawing.Color.Blue;
|
||||||
|
title1.Name = "mainTitleH";
|
||||||
|
title1.Text = "Podnoszenie H(Q)";
|
||||||
|
this.chartH.Titles.Add(title1);
|
||||||
|
//
|
||||||
|
// chartETA
|
||||||
|
//
|
||||||
|
this.chartETA.BorderlineColor = System.Drawing.Color.Blue;
|
||||||
|
this.chartETA.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
|
||||||
|
this.chartETA.Location = new System.Drawing.Point(467, 288);
|
||||||
|
this.chartETA.Name = "chartETA";
|
||||||
|
this.chartETA.Size = new System.Drawing.Size(404, 244);
|
||||||
|
this.chartETA.TabIndex = 4;
|
||||||
|
this.chartETA.Text = "chart1";
|
||||||
|
title2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
title2.ForeColor = System.Drawing.Color.Blue;
|
||||||
|
title2.Name = "mainTitleETA";
|
||||||
|
title2.Text = "Sprawność ƞ(Q)";
|
||||||
|
this.chartETA.Titles.Add(title2);
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(12, 541);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 5;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// PumpStockChFromCatalogForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 572);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.chartETA);
|
||||||
|
this.Controls.Add(this.chartH);
|
||||||
|
this.Controls.Add(this.buttonWybierz);
|
||||||
|
this.Controls.Add(this.dataGridViewPumpLists);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.textBoxSearchPump);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "PumpStockChFromCatalogForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Wybierz pompę";
|
||||||
|
this.Load += new System.EventHandler(this.PumpStockChFromCatalogForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chartH)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chartETA)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchPump;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewPumpLists;
|
||||||
|
private System.Windows.Forms.Button buttonWybierz;
|
||||||
|
public System.Windows.Forms.DataVisualization.Charting.Chart chartH;
|
||||||
|
public System.Windows.Forms.DataVisualization.Charting.Chart chartETA;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class PumpStockChFromCatalogForm : Form
|
||||||
|
{
|
||||||
|
public PumpStockChFromCatalogForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Ładuje stan pomp
|
||||||
|
private void LoadCurrentPumpLists(string pumpName = null)
|
||||||
|
{
|
||||||
|
dataGridViewPumpLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewPumpLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewPumpLists.ColumnCount = 7;
|
||||||
|
dataGridViewPumpLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewPumpLists.Columns[1].Name = "Typ pompy";
|
||||||
|
dataGridViewPumpLists.Columns[2].Name = "Qn [m3/h]";
|
||||||
|
dataGridViewPumpLists.Columns[3].Name = "Hn [m]";
|
||||||
|
dataGridViewPumpLists.Columns[4].Name = "Producent";
|
||||||
|
dataGridViewPumpLists.Columns[5].Name = "Eta";
|
||||||
|
dataGridViewPumpLists.Columns[6].Name = "Hmax";
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from seg_pumps left join seg_manufacturers on MCF_ID=PUP_MCF_ID where LENGTH(PUP_NAME)>0 and PUP_Q_N>0 and PUP_H_MAX>0 and PUP_NAME like '%"+ pumpName + "%' order by PUP_NAME,PUP_Q_N", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewPumpLists.Rows.Add(
|
||||||
|
dataReader["PUP_ID"],
|
||||||
|
dataReader["PUP_NAME"],
|
||||||
|
dataReader["PUP_Q_N"],
|
||||||
|
dataReader["PUP_H_P"],
|
||||||
|
dataReader["MCF_NAME"],
|
||||||
|
dataReader["PUP_ETA_MAX"],
|
||||||
|
dataReader["PUP_H_MAX"]
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Columns[6].Visible = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void PumpStockChFromCatalogForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonWybierz.Enabled = false;
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewPumpLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int pumpID = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(this.dataGridViewPumpLists.CurrentRow.Cells[0].Value.ToString().Replace(".", ","))));
|
||||||
|
int q_nom = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(this.dataGridViewPumpLists.CurrentRow.Cells[2].Value.ToString().Replace(".", ","))));
|
||||||
|
int q_max = Convert.ToInt32(Math.Ceiling(1.6 * q_nom));
|
||||||
|
int h_max = Convert.ToInt32(1.6 * Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(this.dataGridViewPumpLists.CurrentRow.Cells[6].Value.ToString().Replace(".", ",")))));
|
||||||
|
|
||||||
|
|
||||||
|
setChartAreasAndScale(chartH, "H", q_max, "Q [m3/h]", h_max, "H [m]");
|
||||||
|
setBackgroundArea(chartH, "H", 25, q_max, h_max, q_nom);
|
||||||
|
|
||||||
|
setChartAreasAndScale(chartETA, "ETA", q_max, "Q [m3/h]", 1, "ƞ");
|
||||||
|
setBackgroundArea(chartETA, "ETA", 25, q_max, 1, q_nom);
|
||||||
|
|
||||||
|
drawCatalougeSplineForPump(pumpID, q_max);
|
||||||
|
|
||||||
|
buttonWybierz.Enabled = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void setChartAreasAndScale(System.Windows.Forms.DataVisualization.Charting.Chart chartType, string name, int x_scope, string x_name, int y_scope, string y_name)
|
||||||
|
{
|
||||||
|
chartType.ChartAreas.Clear();
|
||||||
|
chartType.ChartAreas.Add(name);
|
||||||
|
chartType.ChartAreas[name].AxisX.Minimum = 0;
|
||||||
|
chartType.ChartAreas[name].AxisX.Maximum = x_scope;
|
||||||
|
chartType.ChartAreas[name].AxisX.Interval = x_scope / 10;
|
||||||
|
chartType.ChartAreas[name].AxisY.Minimum = 0;
|
||||||
|
chartType.ChartAreas[name].AxisY.Maximum = y_scope;
|
||||||
|
chartType.ChartAreas[name].AxisY.Interval = y_scope / 5;
|
||||||
|
chartType.ChartAreas[name].AxisX.Title = x_name;
|
||||||
|
chartType.ChartAreas[name].AxisY.Title = y_name;
|
||||||
|
chartType.ChartAreas[name].AxisX.LabelStyle.Font = new Font("Tahoma", 7);
|
||||||
|
chartType.ChartAreas[name].AxisY.LabelStyle.Font = new Font("Tahoma", 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void setBackgroundArea(System.Windows.Forms.DataVisualization.Charting.Chart chartType, string name, int alfa_color, int x_scope, int y_scope, double qn)
|
||||||
|
{
|
||||||
|
chartType.Series.Clear();
|
||||||
|
chartType.Series.Add(name + "_BG1");
|
||||||
|
chartType.Series[name + "_BG1"].Color = Color.FromArgb(alfa_color, 255, 0, 0);
|
||||||
|
chartType.Series[name + "_BG1"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||||
|
chartType.Series[name + "_BG1"].Points.AddXY(0, y_scope);
|
||||||
|
chartType.Series[name + "_BG1"].Points.AddXY(0.55 * qn, y_scope);
|
||||||
|
chartType.Series.Add(name + "_BG2");
|
||||||
|
chartType.Series[name + "_BG2"].Color = Color.FromArgb(alfa_color, 255, 255, 0);
|
||||||
|
chartType.Series[name + "_BG2"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||||
|
chartType.Series[name + "_BG2"].Points.AddXY(0.55 * qn, y_scope);
|
||||||
|
chartType.Series[name + "_BG2"].Points.AddXY(0.7 * qn, y_scope);
|
||||||
|
chartType.Series.Add(name + "_BG3");
|
||||||
|
chartType.Series[name + "_BG3"].Color = Color.FromArgb(alfa_color, 0, 255, 0);
|
||||||
|
chartType.Series[name + "_BG3"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||||
|
chartType.Series[name + "_BG3"].Points.AddXY(0.7 * qn, y_scope);
|
||||||
|
chartType.Series[name + "_BG3"].Points.AddXY(1.22 * qn, y_scope);
|
||||||
|
chartType.Series.Add(name + "_BG4");
|
||||||
|
chartType.Series[name + "_BG4"].Color = Color.FromArgb(alfa_color, 255, 255, 0);
|
||||||
|
chartType.Series[name + "_BG4"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||||
|
chartType.Series[name + "_BG4"].Points.AddXY(1.22 * qn, y_scope);
|
||||||
|
chartType.Series[name + "_BG4"].Points.AddXY(1.35 * qn, y_scope);
|
||||||
|
chartType.Series.Add(name + "_BG5");
|
||||||
|
chartType.Series[name + "_BG5"].Color = Color.FromArgb(alfa_color, 255, 0, 0);
|
||||||
|
chartType.Series[name + "_BG5"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||||
|
chartType.Series[name + "_BG5"].Points.AddXY(1.35 * qn, y_scope);
|
||||||
|
chartType.Series[name + "_BG5"].Points.AddXY(x_scope, y_scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void drawCatalougeSplineForPump(int pump_id, int q_max)
|
||||||
|
{
|
||||||
|
chartH.Series.Add("catalouge");
|
||||||
|
chartH.Series["catalouge"].Color = Color.FromArgb(255, 187, 0, 0);
|
||||||
|
chartH.Series["catalouge"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
|
||||||
|
|
||||||
|
chartETA.Series.Add("catalouge");
|
||||||
|
chartETA.Series["catalouge"].Color = Color.FromArgb(255, 187, 0, 0);
|
||||||
|
chartETA.Series["catalouge"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
|
||||||
|
|
||||||
|
|
||||||
|
string x3modelH = mySqlFunctions.getPolyRegresionModel(pump_id, 3);
|
||||||
|
string x3modelEta = mySqlFunctions.getPolyRegresionModel_ETA(pump_id, 3);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i <= q_max; i++)
|
||||||
|
{
|
||||||
|
chartH.Series["catalouge"].Points.AddXY(i, convertDataFromSerial.setYparamFor3(x3modelH, i));
|
||||||
|
chartETA.Series["catalouge"].Points.AddXY(i, convertDataFromSerial.setYparamFor3(x3modelEta, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonWybierz_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PumpStockEditForm.newPumpID = Convert.ToInt32(this.dataGridViewPumpLists.CurrentRow.Cells[0].Value.ToString());
|
||||||
|
PumpStockEditForm.newPumpName = this.dataGridViewPumpLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void textBoxSearchPump_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpLists(textBoxSearchPump.Text);
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+511
@@ -0,0 +1,511 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class PumpStockEditForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PumpStockEditForm));
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panel4 = new System.Windows.Forms.Panel();
|
||||||
|
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.richTextBoxUwagi = new System.Windows.Forms.RichTextBox();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.pictureBoxSearchPump = new System.Windows.Forms.PictureBox();
|
||||||
|
this.comboBoxCompany = new System.Windows.Forms.ComboBox();
|
||||||
|
this.textBoxPName = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxNS = new System.Windows.Forms.TextBox();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.comboBoxStatus = new System.Windows.Forms.ComboBox();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.linkLabelHistoria = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.dateTimePickerUpdate = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.dateTimePickerAva = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.dateTimePickerBuy = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.labelMkW = new System.Windows.Forms.Label();
|
||||||
|
this.labelMV = new System.Windows.Forms.Label();
|
||||||
|
this.labelMSN = new System.Windows.Forms.Label();
|
||||||
|
this.labelMName = new System.Windows.Forms.Label();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.buttonDelete = new System.Windows.Forms.Button();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.panel4.SuspendLayout();
|
||||||
|
this.groupBox4.SuspendLayout();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchPump)).BeginInit();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.groupBox3.SuspendLayout();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel4, 1, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 2);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(684, 364);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// panel4
|
||||||
|
//
|
||||||
|
this.panel4.Controls.Add(this.groupBox4);
|
||||||
|
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel4.Location = new System.Drawing.Point(345, 169);
|
||||||
|
this.panel4.Name = "panel4";
|
||||||
|
this.panel4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.panel4.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// groupBox4
|
||||||
|
//
|
||||||
|
this.groupBox4.Controls.Add(this.richTextBoxUwagi);
|
||||||
|
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox4.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.groupBox4.Name = "groupBox4";
|
||||||
|
this.groupBox4.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox4.TabIndex = 7;
|
||||||
|
this.groupBox4.TabStop = false;
|
||||||
|
this.groupBox4.Text = "Uwagi";
|
||||||
|
//
|
||||||
|
// richTextBoxUwagi
|
||||||
|
//
|
||||||
|
this.richTextBoxUwagi.Location = new System.Drawing.Point(3, 19);
|
||||||
|
this.richTextBoxUwagi.Name = "richTextBoxUwagi";
|
||||||
|
this.richTextBoxUwagi.Size = new System.Drawing.Size(327, 129);
|
||||||
|
this.richTextBoxUwagi.TabIndex = 0;
|
||||||
|
this.richTextBoxUwagi.Text = "";
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.pictureBoxSearchPump);
|
||||||
|
this.groupBox1.Controls.Add(this.comboBoxCompany);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxPName);
|
||||||
|
this.groupBox1.Controls.Add(this.textBoxNS);
|
||||||
|
this.groupBox1.Controls.Add(this.label4);
|
||||||
|
this.groupBox1.Controls.Add(this.label3);
|
||||||
|
this.groupBox1.Controls.Add(this.label1);
|
||||||
|
this.groupBox1.Controls.Add(this.label2);
|
||||||
|
this.groupBox1.Controls.Add(this.comboBoxStatus);
|
||||||
|
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Dane podstawowe";
|
||||||
|
//
|
||||||
|
// pictureBoxSearchPump
|
||||||
|
//
|
||||||
|
this.pictureBoxSearchPump.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.pictureBoxSearchPump.Image = global::StacjaProb.Properties.Resources.Zoom_in_icon;
|
||||||
|
this.pictureBoxSearchPump.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.pictureBoxSearchPump.Location = new System.Drawing.Point(286, 24);
|
||||||
|
this.pictureBoxSearchPump.Name = "pictureBoxSearchPump";
|
||||||
|
this.pictureBoxSearchPump.Size = new System.Drawing.Size(31, 26);
|
||||||
|
this.pictureBoxSearchPump.TabIndex = 18;
|
||||||
|
this.pictureBoxSearchPump.TabStop = false;
|
||||||
|
this.pictureBoxSearchPump.Click += new System.EventHandler(this.pictureBoxSearchPump_Click);
|
||||||
|
//
|
||||||
|
// comboBoxCompany
|
||||||
|
//
|
||||||
|
this.comboBoxCompany.FormattingEnabled = true;
|
||||||
|
this.comboBoxCompany.Location = new System.Drawing.Point(83, 109);
|
||||||
|
this.comboBoxCompany.Name = "comboBoxCompany";
|
||||||
|
this.comboBoxCompany.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxCompany.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// textBoxPName
|
||||||
|
//
|
||||||
|
this.textBoxPName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPName.Location = new System.Drawing.Point(83, 30);
|
||||||
|
this.textBoxPName.Name = "textBoxPName";
|
||||||
|
this.textBoxPName.ReadOnly = true;
|
||||||
|
this.textBoxPName.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxPName.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// textBoxNS
|
||||||
|
//
|
||||||
|
this.textBoxNS.Location = new System.Drawing.Point(83, 56);
|
||||||
|
this.textBoxNS.Name = "textBoxNS";
|
||||||
|
this.textBoxNS.Size = new System.Drawing.Size(197, 20);
|
||||||
|
this.textBoxNS.TabIndex = 3;
|
||||||
|
this.textBoxNS.Leave += new System.EventHandler(this.textBoxNS_Leave);
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(15, 112);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label4.TabIndex = 6;
|
||||||
|
this.label4.Text = "Kontrahent:";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(37, 85);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(40, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "Status:";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(15, 33);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Typ pompy:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// comboBoxStatus
|
||||||
|
//
|
||||||
|
this.comboBoxStatus.FormattingEnabled = true;
|
||||||
|
this.comboBoxStatus.Location = new System.Drawing.Point(83, 82);
|
||||||
|
this.comboBoxStatus.Name = "comboBoxStatus";
|
||||||
|
this.comboBoxStatus.Size = new System.Drawing.Size(197, 21);
|
||||||
|
this.comboBoxStatus.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.linkLabelHistoria);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerUpdate);
|
||||||
|
this.groupBox2.Controls.Add(this.label7);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerAva);
|
||||||
|
this.groupBox2.Controls.Add(this.label6);
|
||||||
|
this.groupBox2.Controls.Add(this.dateTimePickerBuy);
|
||||||
|
this.groupBox2.Controls.Add(this.label5);
|
||||||
|
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(345, 3);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox2.TabIndex = 1;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "Dodatkowe informacje";
|
||||||
|
//
|
||||||
|
// linkLabelHistoria
|
||||||
|
//
|
||||||
|
this.linkLabelHistoria.AutoSize = true;
|
||||||
|
this.linkLabelHistoria.Location = new System.Drawing.Point(227, 117);
|
||||||
|
this.linkLabelHistoria.Name = "linkLabelHistoria";
|
||||||
|
this.linkLabelHistoria.Size = new System.Drawing.Size(82, 13);
|
||||||
|
this.linkLabelHistoria.TabIndex = 6;
|
||||||
|
this.linkLabelHistoria.TabStop = true;
|
||||||
|
this.linkLabelHistoria.Text = "Pokaż historię »";
|
||||||
|
this.linkLabelHistoria.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelHistoria_LinkClicked);
|
||||||
|
//
|
||||||
|
// dateTimePickerUpdate
|
||||||
|
//
|
||||||
|
this.dateTimePickerUpdate.Location = new System.Drawing.Point(109, 78);
|
||||||
|
this.dateTimePickerUpdate.Name = "dateTimePickerUpdate";
|
||||||
|
this.dateTimePickerUpdate.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerUpdate.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.Location = new System.Drawing.Point(15, 81);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(88, 13);
|
||||||
|
this.label7.TabIndex = 4;
|
||||||
|
this.label7.Text = "Data aktualizacji:";
|
||||||
|
//
|
||||||
|
// dateTimePickerAva
|
||||||
|
//
|
||||||
|
this.dateTimePickerAva.Location = new System.Drawing.Point(109, 52);
|
||||||
|
this.dateTimePickerAva.Name = "dateTimePickerAva";
|
||||||
|
this.dateTimePickerAva.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerAva.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(26, 55);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(77, 13);
|
||||||
|
this.label6.TabIndex = 2;
|
||||||
|
this.label6.Text = "Data przyjęcia:";
|
||||||
|
//
|
||||||
|
// dateTimePickerBuy
|
||||||
|
//
|
||||||
|
this.dateTimePickerBuy.Location = new System.Drawing.Point(109, 26);
|
||||||
|
this.dateTimePickerBuy.Name = "dateTimePickerBuy";
|
||||||
|
this.dateTimePickerBuy.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.dateTimePickerBuy.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(32, 29);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(71, 13);
|
||||||
|
this.label5.TabIndex = 0;
|
||||||
|
this.label5.Text = "Data zakupu:";
|
||||||
|
//
|
||||||
|
// groupBox3
|
||||||
|
//
|
||||||
|
this.groupBox3.Controls.Add(this.labelMkW);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMV);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMSN);
|
||||||
|
this.groupBox3.Controls.Add(this.labelMName);
|
||||||
|
this.groupBox3.Controls.Add(this.label8);
|
||||||
|
this.groupBox3.Controls.Add(this.label9);
|
||||||
|
this.groupBox3.Controls.Add(this.label10);
|
||||||
|
this.groupBox3.Controls.Add(this.label11);
|
||||||
|
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.groupBox3.Location = new System.Drawing.Point(3, 169);
|
||||||
|
this.groupBox3.Name = "groupBox3";
|
||||||
|
this.groupBox3.Size = new System.Drawing.Size(336, 160);
|
||||||
|
this.groupBox3.TabIndex = 6;
|
||||||
|
this.groupBox3.TabStop = false;
|
||||||
|
this.groupBox3.Text = "Powiązany silnik";
|
||||||
|
//
|
||||||
|
// labelMkW
|
||||||
|
//
|
||||||
|
this.labelMkW.AutoSize = true;
|
||||||
|
this.labelMkW.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMkW.Location = new System.Drawing.Point(83, 112);
|
||||||
|
this.labelMkW.Name = "labelMkW";
|
||||||
|
this.labelMkW.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMkW.TabIndex = 18;
|
||||||
|
this.labelMkW.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMV
|
||||||
|
//
|
||||||
|
this.labelMV.AutoSize = true;
|
||||||
|
this.labelMV.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMV.Location = new System.Drawing.Point(83, 84);
|
||||||
|
this.labelMV.Name = "labelMV";
|
||||||
|
this.labelMV.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMV.TabIndex = 17;
|
||||||
|
this.labelMV.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMSN
|
||||||
|
//
|
||||||
|
this.labelMSN.AutoSize = true;
|
||||||
|
this.labelMSN.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMSN.Location = new System.Drawing.Point(83, 57);
|
||||||
|
this.labelMSN.Name = "labelMSN";
|
||||||
|
this.labelMSN.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMSN.TabIndex = 16;
|
||||||
|
this.labelMSN.Text = "...";
|
||||||
|
//
|
||||||
|
// labelMName
|
||||||
|
//
|
||||||
|
this.labelMName.AutoSize = true;
|
||||||
|
this.labelMName.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelMName.Location = new System.Drawing.Point(81, 31);
|
||||||
|
this.labelMName.Name = "labelMName";
|
||||||
|
this.labelMName.Size = new System.Drawing.Size(19, 15);
|
||||||
|
this.labelMName.TabIndex = 15;
|
||||||
|
this.labelMName.Text = "...";
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Location = new System.Drawing.Point(20, 112);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(57, 13);
|
||||||
|
this.label8.TabIndex = 14;
|
||||||
|
this.label8.Text = "Moc [kW]:";
|
||||||
|
//
|
||||||
|
// label9
|
||||||
|
//
|
||||||
|
this.label9.AutoSize = true;
|
||||||
|
this.label9.Location = new System.Drawing.Point(9, 84);
|
||||||
|
this.label9.Name = "label9";
|
||||||
|
this.label9.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.label9.TabIndex = 12;
|
||||||
|
this.label9.Text = "Napięcie [V]:";
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.AutoSize = true;
|
||||||
|
this.label10.Location = new System.Drawing.Point(17, 33);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(60, 13);
|
||||||
|
this.label10.TabIndex = 8;
|
||||||
|
this.label10.Text = "Typ silnika:";
|
||||||
|
//
|
||||||
|
// label11
|
||||||
|
//
|
||||||
|
this.label11.AutoSize = true;
|
||||||
|
this.label11.Location = new System.Drawing.Point(36, 59);
|
||||||
|
this.label11.Name = "label11";
|
||||||
|
this.label11.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label11.TabIndex = 10;
|
||||||
|
this.label11.Text = "Numer:";
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.buttonCancel);
|
||||||
|
this.panel1.Controls.Add(this.buttonDelete);
|
||||||
|
this.panel1.Controls.Add(this.buttonSave);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(345, 335);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(336, 26);
|
||||||
|
this.panel1.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Image = global::StacjaProb.Properties.Resources.if_exit_28363;
|
||||||
|
this.buttonCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(233, 0);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonCancel.TabIndex = 2;
|
||||||
|
this.buttonCancel.Text = "Zamknij";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// buttonDelete
|
||||||
|
//
|
||||||
|
this.buttonDelete.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonDelete.Image = global::StacjaProb.Properties.Resources.if_database_delete_35951;
|
||||||
|
this.buttonDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonDelete.Location = new System.Drawing.Point(21, 0);
|
||||||
|
this.buttonDelete.Name = "buttonDelete";
|
||||||
|
this.buttonDelete.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonDelete.TabIndex = 0;
|
||||||
|
this.buttonDelete.Text = "Usuń";
|
||||||
|
this.buttonDelete.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(127, 0);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 1;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = false;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// PumpStockEditForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(684, 364);
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "PumpStockEditForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Pompa - stan";
|
||||||
|
this.Load += new System.EventHandler(this.PumpStockEditForm_Load);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.panel4.ResumeLayout(false);
|
||||||
|
this.groupBox4.ResumeLayout(false);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSearchPump)).EndInit();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.groupBox3.ResumeLayout(false);
|
||||||
|
this.groupBox3.PerformLayout();
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.Panel panel4;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
public System.Windows.Forms.TextBox textBoxPName;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
public System.Windows.Forms.TextBox textBoxNS;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerBuy;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerAva;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
public System.Windows.Forms.DateTimePicker dateTimePickerUpdate;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox4;
|
||||||
|
private System.Windows.Forms.RichTextBox richTextBoxUwagi;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox3;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxStatus;
|
||||||
|
public System.Windows.Forms.ComboBox comboBoxCompany;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.Button buttonDelete;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
private System.Windows.Forms.Label labelMkW;
|
||||||
|
private System.Windows.Forms.Label labelMV;
|
||||||
|
private System.Windows.Forms.Label labelMSN;
|
||||||
|
private System.Windows.Forms.Label labelMName;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Label label9;
|
||||||
|
private System.Windows.Forms.Label label10;
|
||||||
|
private System.Windows.Forms.Label label11;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBoxSearchPump;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelHistoria;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class PumpStockEditForm : Form
|
||||||
|
{
|
||||||
|
public int devID;
|
||||||
|
public string selectedStatus = "";
|
||||||
|
public string selectedCompanies = "";
|
||||||
|
public static int newPumpID = 0;
|
||||||
|
public static string newPumpName = "";
|
||||||
|
|
||||||
|
|
||||||
|
public PumpStockEditForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PumpStockEditForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadStatuses();
|
||||||
|
LoadCompanies();
|
||||||
|
if (devID > 0)
|
||||||
|
{
|
||||||
|
pictureBoxSearchPump.Visible = false;
|
||||||
|
LoadConectMotor();
|
||||||
|
buttonSave.Text = "Aktualizuj";
|
||||||
|
richTextBoxUwagi.Text = mySqlFunctions.sqlStringValue("select DRS_DEV_DESCRIPTION from seg_dev_resources where DRS_ID="+ devID.ToString(), "DRS_DEV_DESCRIPTION");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buttonSave.Enabled = false;
|
||||||
|
buttonDelete.Enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadStatuses()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select DIC_ID,DIC_POL_LANG from sys_dictionaries where DIC_TYPE_ID=1 order by DIC_POL_LANG", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxStatus.Items.Insert(index, dataReader["DIC_POL_LANG"].ToString());
|
||||||
|
|
||||||
|
// zaznacza jako selected
|
||||||
|
if (dataReader["DIC_POL_LANG"].ToString() == selectedStatus)
|
||||||
|
comboBoxStatus.SelectedIndex = comboBoxStatus.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCompanies()
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select * from sys_participants order by PRT_NAME", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
comboBoxCompany.Items.Insert(index, dataReader["PRT_DESCRIPTION"].ToString());
|
||||||
|
|
||||||
|
if (dataReader["PRT_DESCRIPTION"].ToString() == selectedCompanies)
|
||||||
|
comboBoxCompany.SelectedIndex = comboBoxCompany.Items.Count - 1;
|
||||||
|
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadConectMotor()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
// Ładuje listę dostępnych Pomp
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select APE_ENG_NAME,APE_ENG_NO,ENG_VOLTAGE,ENG_POWER from seg_aggregate_pup_eng left join seg_engines on ENG_ID=APE_ENG_ID where APE_PUP_DRS_ID=" + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
labelMName.Text = dataReader["APE_ENG_NAME"].ToString();
|
||||||
|
labelMSN.Text = dataReader["APE_ENG_NO"].ToString();
|
||||||
|
labelMV.Text = dataReader["ENG_VOLTAGE"].ToString();
|
||||||
|
labelMkW.Text = dataReader["ENG_POWER"].ToString();
|
||||||
|
buttonDelete.Enabled = false;
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string statID = mySqlFunctions.sqlStringValue("select DIC_ID from sys_dictionaries where DIC_POL_LANG='" + comboBoxStatus.SelectedItem.ToString() + "'", "DIC_ID");
|
||||||
|
string partID = mySqlFunctions.sqlStringValue("select PRT_ID from sys_participants where PRT_DESCRIPTION ='" + comboBoxCompany.SelectedItem.ToString() + "'", "PRT_ID");
|
||||||
|
|
||||||
|
//jeśli mamy do czynienia z EDYCJĄ - aktualizaujemy
|
||||||
|
if (devID > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("UPDATE seg_dev_resources SET DRS_SN_NUMBER='" + textBoxNS.Text + "',DRS_BUY_DATE='" + dateTimePickerBuy.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_AVAILABLE_DATE='" + dateTimePickerAva.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_STATUS_DIC_ID='" + statID + "',DRS_DEV_DESCRIPTION='" + richTextBoxUwagi.Text + "',DRS_AUDIT_DATE=now(), DRS_AUDIT_USR= '" + partID + "' WHERE DRS_ID=" + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources where DRS_ID = " + devID.ToString(), mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
//dodajemy
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("INSERT INTO seg_dev_resources SET DRS_DEV_ID="+ newPumpID.ToString() + ",DRS_DEV_TYPE=10,DRS_SN_NUMBER='"+ textBoxNS.Text + "',DRS_BUY_DATE='" + dateTimePickerBuy.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_AVAILABLE_DATE='" + dateTimePickerAva.Value.ToString("yyyy-MM-dd HH:mm:ss") + "',DRS_STATUS_DIC_ID='" + statID + "',DRS_DEV_DESCRIPTION='" + richTextBoxUwagi.Text + "',DRS_AUDIT_USR='" + partID + "',DRS_AUDIT_DATE=now()", mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
// tabela historyczna
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand his = new MySql.Data.MySqlClient.MySqlCommand("insert into seg_dev_resources_his select * from seg_dev_resources where DRS_ID=(select max(DRS_ID) from seg_dev_resources)", mySqlFunctions.connection);
|
||||||
|
his.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pictureBoxSearchPump_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
textBoxPName.Text = newPumpName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pictureBoxSearchPump_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PumpStockChFromCatalogForm pscfcForm = new PumpStockChFromCatalogForm();
|
||||||
|
pscfcForm.FormClosed += new FormClosedEventHandler(pictureBoxSearchPump_FormClosed);
|
||||||
|
pscfcForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxNS_Leave(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (textBoxNS.TextLength > 0)
|
||||||
|
buttonSave.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabelHistoria_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
PumpStockHistoryForm pshForm = new PumpStockHistoryForm();
|
||||||
|
pshForm.devID = devID;
|
||||||
|
pshForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (MessageBox.Show("UWAGA!\nProces nieodwracalny.\nCzy na pewno chcesz usunąć pompę ze stanu?", "Potwierdzenie usunięcia z bazy", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("DELETE FROM seg_dev_resources WHERE DRS_ID = "+ devID.ToString(), mySqlFunctions.connection);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+167
@@ -0,0 +1,167 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class PumpStockHistoryForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PumpStockHistoryForm));
|
||||||
|
this.dataGridViewPumpHistory = new System.Windows.Forms.DataGridView();
|
||||||
|
this.labelName = new System.Windows.Forms.Label();
|
||||||
|
this.labelDate = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.dataGridViewAggHistory = new System.Windows.Forms.DataGridView();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpHistory)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dataGridViewPumpHistory
|
||||||
|
//
|
||||||
|
this.dataGridViewPumpHistory.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewPumpHistory.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewPumpHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewPumpHistory.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewPumpHistory.Location = new System.Drawing.Point(12, 61);
|
||||||
|
this.dataGridViewPumpHistory.Name = "dataGridViewPumpHistory";
|
||||||
|
this.dataGridViewPumpHistory.ReadOnly = true;
|
||||||
|
this.dataGridViewPumpHistory.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewPumpHistory.Size = new System.Drawing.Size(860, 217);
|
||||||
|
this.dataGridViewPumpHistory.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// labelName
|
||||||
|
//
|
||||||
|
this.labelName.AutoSize = true;
|
||||||
|
this.labelName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.labelName.Location = new System.Drawing.Point(12, 9);
|
||||||
|
this.labelName.Name = "labelName";
|
||||||
|
this.labelName.Size = new System.Drawing.Size(94, 20);
|
||||||
|
this.labelName.TabIndex = 6;
|
||||||
|
this.labelName.Text = "Typ pompy";
|
||||||
|
//
|
||||||
|
// labelDate
|
||||||
|
//
|
||||||
|
this.labelDate.AutoSize = true;
|
||||||
|
this.labelDate.Location = new System.Drawing.Point(811, 16);
|
||||||
|
this.labelDate.Name = "labelDate";
|
||||||
|
this.labelDate.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.labelDate.TabIndex = 7;
|
||||||
|
this.labelDate.Text = "2017-12-12";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(734, 16);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(71, 13);
|
||||||
|
this.label1.TabIndex = 8;
|
||||||
|
this.label1.Text = "Data zakupu:";
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(761, 526);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 2;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(9, 45);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(76, 13);
|
||||||
|
this.label2.TabIndex = 11;
|
||||||
|
this.label2.Text = "Historia pompy";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(9, 287);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(95, 13);
|
||||||
|
this.label3.TabIndex = 13;
|
||||||
|
this.label3.Text = "Historia agregatów";
|
||||||
|
//
|
||||||
|
// dataGridViewAggHistory
|
||||||
|
//
|
||||||
|
this.dataGridViewAggHistory.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewAggHistory.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewAggHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewAggHistory.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewAggHistory.Location = new System.Drawing.Point(12, 303);
|
||||||
|
this.dataGridViewAggHistory.Name = "dataGridViewAggHistory";
|
||||||
|
this.dataGridViewAggHistory.ReadOnly = true;
|
||||||
|
this.dataGridViewAggHistory.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewAggHistory.Size = new System.Drawing.Size(860, 217);
|
||||||
|
this.dataGridViewAggHistory.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// PumpStockHistoryForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 557);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.dataGridViewAggHistory);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.labelDate);
|
||||||
|
this.Controls.Add(this.labelName);
|
||||||
|
this.Controls.Add(this.dataGridViewPumpHistory);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "PumpStockHistoryForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Historia pompy";
|
||||||
|
this.Load += new System.EventHandler(this.PumpStockHistoryForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpHistory)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAggHistory)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewPumpHistory;
|
||||||
|
private System.Windows.Forms.Label labelName;
|
||||||
|
private System.Windows.Forms.Label labelDate;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewAggHistory;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class PumpStockHistoryForm : Form
|
||||||
|
{
|
||||||
|
public int devID;
|
||||||
|
public PumpStockHistoryForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PumpStockHistoryForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dataGridViewPumpHistory.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewPumpHistory.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewPumpHistory.ColumnCount = 5;
|
||||||
|
dataGridViewPumpHistory.Columns[0].Name = "Numer pompy";
|
||||||
|
dataGridViewPumpHistory.Columns[1].Name = "Status";
|
||||||
|
dataGridViewPumpHistory.Columns[2].Name = "Kontrahent";
|
||||||
|
dataGridViewPumpHistory.Columns[3].Name = "Opis";
|
||||||
|
dataGridViewPumpHistory.Columns[4].Name = "Data aktualizacji";
|
||||||
|
|
||||||
|
dataGridViewPumpHistory.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpHistory.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpHistory.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpHistory.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpHistory.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand("select PUP_NAME,DRS_SN_NUMBER,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_STATUS_DIC_ID) DIC_POL_LANG,(select PRT_DESCRIPTION from sys_participants where PRT_ID=DRS_AUDIT_USR) PRT_DESCRIPTION,DRS_DEV_DESCRIPTION,DRS_AUDIT_DATE from seg_dev_resources_his,seg_pumps where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_ID=" + devID.ToString() + " order by DRS_AUDIT_DATE desc", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewPumpHistory.Rows.Add(
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["PRT_DESCRIPTION"],
|
||||||
|
dataReader["DRS_DEV_DESCRIPTION"],
|
||||||
|
dataReader["DRS_AUDIT_DATE"]
|
||||||
|
);
|
||||||
|
|
||||||
|
labelName.Text = dataReader["PUP_NAME"].ToString();
|
||||||
|
|
||||||
|
if (dataReader["DRS_BUY_DATE"].ToString().Length>0)
|
||||||
|
labelDate.Text = dataReader["DRS_BUY_DATE"].ToString();
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewAggHistory.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewAggHistory.ColumnCount = 5;
|
||||||
|
dataGridViewAggHistory.Columns[0].Name = "Numer pompy";
|
||||||
|
dataGridViewAggHistory.Columns[1].Name = "Silnik";
|
||||||
|
dataGridViewAggHistory.Columns[2].Name = "Numer silnika";
|
||||||
|
dataGridViewAggHistory.Columns[3].Name = "Kontrahent";
|
||||||
|
dataGridViewAggHistory.Columns[4].Name = "Data";
|
||||||
|
|
||||||
|
dataGridViewAggHistory.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewAggHistory.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd1 = new MySql.Data.MySqlClient.MySqlCommand("select APE_PUP_NO,APE_ENG_NAME,APE_ENG_NO,(select PRT_DESCRIPTION from sys_participants where PRT_ID=APE_PRT_ID) PRT_DESCRIPTION,SUBSTRING(APE_AUDIT_CD,1,10) APE_AUDIT_CD from seg_aggregate_pup_eng_his where APE_PUP_DRS_ID=" + devID.ToString() + " order by APE_AUDIT_CD desc", mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader1 = cmd1.ExecuteReader();
|
||||||
|
while (dataReader1.Read())
|
||||||
|
{
|
||||||
|
dataGridViewAggHistory.Rows.Add(
|
||||||
|
dataReader1["APE_PUP_NO"],
|
||||||
|
dataReader1["APE_ENG_NAME"],
|
||||||
|
dataReader1["APE_ENG_NO"],
|
||||||
|
dataReader1["PRT_DESCRIPTION"],
|
||||||
|
dataReader1["APE_AUDIT_CD"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dataReader1.Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Generated
+127
@@ -0,0 +1,127 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class PumpStockListForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PumpStockListForm));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.dataGridViewPumpLists = new System.Windows.Forms.DataGridView();
|
||||||
|
this.textBoxSearchPump = new System.Windows.Forms.TextBox();
|
||||||
|
this.buttonClose = new System.Windows.Forms.Button();
|
||||||
|
this.buttonAddPump = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(17, 15);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(42, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Szukaj:";
|
||||||
|
//
|
||||||
|
// dataGridViewPumpLists
|
||||||
|
//
|
||||||
|
this.dataGridViewPumpLists.AllowUserToAddRows = false;
|
||||||
|
this.dataGridViewPumpLists.AllowUserToDeleteRows = false;
|
||||||
|
this.dataGridViewPumpLists.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.dataGridViewPumpLists.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||||
|
this.dataGridViewPumpLists.Location = new System.Drawing.Point(12, 47);
|
||||||
|
this.dataGridViewPumpLists.Name = "dataGridViewPumpLists";
|
||||||
|
this.dataGridViewPumpLists.ReadOnly = true;
|
||||||
|
this.dataGridViewPumpLists.RowHeadersVisible = false;
|
||||||
|
this.dataGridViewPumpLists.Size = new System.Drawing.Size(860, 353);
|
||||||
|
this.dataGridViewPumpLists.TabIndex = 2;
|
||||||
|
this.dataGridViewPumpLists.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewPumpLists_CellContentClick);
|
||||||
|
//
|
||||||
|
// textBoxSearchPump
|
||||||
|
//
|
||||||
|
this.textBoxSearchPump.Location = new System.Drawing.Point(65, 12);
|
||||||
|
this.textBoxSearchPump.Name = "textBoxSearchPump";
|
||||||
|
this.textBoxSearchPump.Size = new System.Drawing.Size(212, 20);
|
||||||
|
this.textBoxSearchPump.TabIndex = 1;
|
||||||
|
this.textBoxSearchPump.TextChanged += new System.EventHandler(this.textBoxSearchPump_TextChanged);
|
||||||
|
//
|
||||||
|
// buttonClose
|
||||||
|
//
|
||||||
|
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
|
||||||
|
this.buttonClose.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonClose.Location = new System.Drawing.Point(761, 406);
|
||||||
|
this.buttonClose.Name = "buttonClose";
|
||||||
|
this.buttonClose.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonClose.TabIndex = 4;
|
||||||
|
this.buttonClose.Text = "Zamknij";
|
||||||
|
this.buttonClose.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
|
||||||
|
//
|
||||||
|
// buttonAddPump
|
||||||
|
//
|
||||||
|
this.buttonAddPump.Image = ((System.Drawing.Image)(resources.GetObject("buttonAddPump.Image")));
|
||||||
|
this.buttonAddPump.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonAddPump.Location = new System.Drawing.Point(12, 406);
|
||||||
|
this.buttonAddPump.Name = "buttonAddPump";
|
||||||
|
this.buttonAddPump.Size = new System.Drawing.Size(111, 23);
|
||||||
|
this.buttonAddPump.TabIndex = 3;
|
||||||
|
this.buttonAddPump.Text = "Dodaj";
|
||||||
|
this.buttonAddPump.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonAddPump.Click += new System.EventHandler(this.buttonAddPump_Click);
|
||||||
|
//
|
||||||
|
// PumpStockListForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(884, 440);
|
||||||
|
this.Controls.Add(this.buttonClose);
|
||||||
|
this.Controls.Add(this.buttonAddPump);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.dataGridViewPumpLists);
|
||||||
|
this.Controls.Add(this.textBoxSearchPump);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "PumpStockListForm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Stan pomp";
|
||||||
|
this.Load += new System.EventHandler(this.PumpStockListForm_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewPumpLists)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.DataGridView dataGridViewPumpLists;
|
||||||
|
private System.Windows.Forms.TextBox textBoxSearchPump;
|
||||||
|
private System.Windows.Forms.Button buttonAddPump;
|
||||||
|
private System.Windows.Forms.Button buttonClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
public partial class PumpStockListForm : Form
|
||||||
|
{
|
||||||
|
public PumpStockListForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
this.Text += " ("+vGlobal.app_participants_name+")";
|
||||||
|
else
|
||||||
|
this.Text += " (Wszyscy kontrahenci)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ładuje stan pomp
|
||||||
|
private void LoadCurrentPumpLists(string pumpName = null)
|
||||||
|
{
|
||||||
|
pumpName = textBoxSearchPump.Text;
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Rows.Clear();
|
||||||
|
|
||||||
|
dataGridViewPumpLists.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridViewPumpLists.ColumnCount = 11;
|
||||||
|
dataGridViewPumpLists.Columns[0].Name = "id";
|
||||||
|
dataGridViewPumpLists.Columns[1].Name = "Typ pompy";
|
||||||
|
dataGridViewPumpLists.Columns[2].Name = "Numer pompy";
|
||||||
|
dataGridViewPumpLists.Columns[3].Name = "Qn [m3/h]";
|
||||||
|
dataGridViewPumpLists.Columns[4].Name = "Hn [m]";
|
||||||
|
dataGridViewPumpLists.Columns[5].Name = "Producent";
|
||||||
|
dataGridViewPumpLists.Columns[6].Name = "Status";
|
||||||
|
dataGridViewPumpLists.Columns[7].Name = "Data zakupu";
|
||||||
|
dataGridViewPumpLists.Columns[8].Name = "Data przyjęcia";
|
||||||
|
dataGridViewPumpLists.Columns[9].Name = "Data aktualizacji";
|
||||||
|
dataGridViewPumpLists.Columns[10].Name = "Oddział";
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[4].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[6].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
dataGridViewPumpLists.Columns[7].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[8].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[9].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
dataGridViewPumpLists.Columns[10].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
|
||||||
|
|
||||||
|
string query = "";
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
query = "select DRS_ID,PUP_NAME,DRS_SN_NUMBER,PUP_Q_N,PUP_H_P,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,SUBSTRING(DRS_AVAILABLE_DATE,1,10) DRS_AVAILABLE_DATE,SUBSTRING(DRS_AUDIT_DATE,1,10) DRS_AUDIT_DATE,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_RESOURCES_DIC_ID) DIC_POL_LANG,DRS_AUDIT_USR from seg_dev_resources,seg_pumps left join seg_manufacturers on PUP_MCF_ID=MCF_ID where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and DRS_AUDIT_USR='" + vGlobal.app_participants_name.ToString() + "' and (PUP_NAME like '%" + pumpName + "%' or DRS_SN_NUMBER like '%" + pumpName + "%') order by PUP_NAME,PUP_Q_N";
|
||||||
|
else
|
||||||
|
query = "select DRS_ID,PUP_NAME,DRS_SN_NUMBER,PUP_Q_N,PUP_H_P,SUBSTRING(DRS_BUY_DATE,1,10) DRS_BUY_DATE,SUBSTRING(DRS_AVAILABLE_DATE,1,10) DRS_AVAILABLE_DATE,SUBSTRING(DRS_AUDIT_DATE,1,10) DRS_AUDIT_DATE,MCF_NAME,(select DIC_POL_LANG from sys_dictionaries where DIC_ID=DRS_RESOURCES_DIC_ID) DIC_POL_LANG,DRS_AUDIT_USR from seg_dev_resources,seg_pumps left join seg_manufacturers on PUP_MCF_ID=MCF_ID where DRS_DEV_TYPE=10 and DRS_DEV_ID=PUP_ID and (PUP_NAME like '%" + pumpName + "%' or DRS_SN_NUMBER like '%" + pumpName + "%') order by PUP_NAME,PUP_Q_N";
|
||||||
|
|
||||||
|
|
||||||
|
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query, mySqlFunctions.connection);
|
||||||
|
MySql.Data.MySqlClient.MySqlDataReader dataReader = cmd.ExecuteReader();
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
dataGridViewPumpLists.Rows.Add(
|
||||||
|
dataReader["DRS_ID"],
|
||||||
|
dataReader["PUP_NAME"],
|
||||||
|
dataReader["DRS_SN_NUMBER"],
|
||||||
|
dataReader["PUP_Q_N"],
|
||||||
|
dataReader["PUP_H_P"],
|
||||||
|
dataReader["MCF_NAME"],
|
||||||
|
dataReader["DIC_POL_LANG"],
|
||||||
|
dataReader["DRS_BUY_DATE"],
|
||||||
|
dataReader["DRS_AVAILABLE_DATE"],
|
||||||
|
dataReader["DRS_AUDIT_DATE"],
|
||||||
|
dataReader["DRS_AUDIT_USR"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dataReader.Close();
|
||||||
|
|
||||||
|
dataGridViewPumpLists.Columns[10].Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void PumpStockListForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxSearchPump_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
|
||||||
|
LoadCurrentPumpLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dataGridViewPumpLists_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
mySqlFunctions.initConnection();
|
||||||
|
if (mySqlFunctions.OpenConnection())
|
||||||
|
{
|
||||||
|
LoadCurrentPumpLists();
|
||||||
|
mySqlFunctions.CloseConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridViewPumpLists_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
PumpStockEditForm pseForm = new PumpStockEditForm();
|
||||||
|
pseForm.devID = Convert.ToInt32(this.dataGridViewPumpLists.CurrentRow.Cells[0].Value.ToString());
|
||||||
|
pseForm.textBoxPName.Text = this.dataGridViewPumpLists.CurrentRow.Cells[1].Value.ToString();
|
||||||
|
pseForm.textBoxNS.Text = this.dataGridViewPumpLists.CurrentRow.Cells[2].Value.ToString();
|
||||||
|
pseForm.dateTimePickerBuy.Text = this.dataGridViewPumpLists.CurrentRow.Cells[7].Value.ToString();
|
||||||
|
pseForm.dateTimePickerAva.Text = this.dataGridViewPumpLists.CurrentRow.Cells[8].Value.ToString();
|
||||||
|
pseForm.dateTimePickerUpdate.Text = this.dataGridViewPumpLists.CurrentRow.Cells[9].Value.ToString();
|
||||||
|
pseForm.selectedStatus = this.dataGridViewPumpLists.CurrentRow.Cells[6].Value.ToString();
|
||||||
|
pseForm.selectedCompanies = this.dataGridViewPumpLists.CurrentRow.Cells[10].Value.ToString();
|
||||||
|
|
||||||
|
pseForm.FormClosed += new FormClosedEventHandler(dataGridViewPumpLists_FormClosed);
|
||||||
|
|
||||||
|
|
||||||
|
pseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonAddPump_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PumpStockEditForm pseForm = new PumpStockEditForm();
|
||||||
|
pseForm.selectedStatus = "Nowy";
|
||||||
|
if (vGlobal.app_participants_id > 0)
|
||||||
|
pseForm.selectedCompanies = vGlobal.app_participants_name;
|
||||||
|
|
||||||
|
pseForm.FormClosed += new FormClosedEventHandler(dataGridViewPumpLists_FormClosed);
|
||||||
|
pseForm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,96 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
|
||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
class ReadWriteFile
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void SaveDbAccessConfig()
|
||||||
|
{
|
||||||
|
string[] lines = {vGlobal.vMySql_hostname,vGlobal.vMySql_user,vGlobal.vMySql_pass,vGlobal.vMySql_dbname};
|
||||||
|
System.IO.File.WriteAllLines("dbacc.cfg", lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ReadDbAccessConfig()
|
||||||
|
{
|
||||||
|
if (File.Exists("dbacc.cfg"))
|
||||||
|
{
|
||||||
|
string[] lines = System.IO.File.ReadAllLines("dbacc.cfg");
|
||||||
|
vGlobal.vMySql_hostname = lines[0];
|
||||||
|
vGlobal.vMySql_user = lines[1];
|
||||||
|
vGlobal.vMySql_pass = lines[2];
|
||||||
|
vGlobal.vMySql_dbname = lines[3];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vGlobal.vMySql_hostname = "localhost";
|
||||||
|
vGlobal.vMySql_user = "softspm";
|
||||||
|
vGlobal.vMySql_pass = "softspm";
|
||||||
|
vGlobal.vMySql_dbname = "softspm";
|
||||||
|
string[] lines = {vGlobal.vMySql_hostname, vGlobal.vMySql_user, vGlobal.vMySql_pass, vGlobal.vMySql_dbname};
|
||||||
|
System.IO.File.WriteAllLines("dbacc.cfg", lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getLanguage(string lgnType)
|
||||||
|
{
|
||||||
|
string[] textToSplit;
|
||||||
|
if (File.Exists(lgnType))
|
||||||
|
{
|
||||||
|
string[] lines = System.IO.File.ReadAllLines(lgnType);
|
||||||
|
|
||||||
|
foreach (string element in lines)
|
||||||
|
{
|
||||||
|
if (element.Length > 3 && element.Substring(0,1)!="#")
|
||||||
|
{
|
||||||
|
textToSplit = element.Split('=');
|
||||||
|
if (textToSplit[0]=="systemName") vGlobal.vLng_systemName = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_MenuPlik") vGlobal.vLng_MenuPlik = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_MenuKatalog") vGlobal.vLng_MenuKatalog = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_MenuKonfiguracja") vGlobal.vLng_MenuKonfiguracja = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_MenuPomoc") vGlobal.vLng_MenuPomoc = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_MenuZamknij") vGlobal.vLng_MenuZamknij = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_SubMenuKatalogPomp") vGlobal.vLng_SubMenuKatalogPomp = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_SubMenuKatalogSilnikow") vGlobal.vLng_SubMenuKatalogSilnikow = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_SubMenuProducenci") vGlobal.vLng_SubMenuProducenci = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_SubMenuPolSzereg") vGlobal.vLng_SubMenuPolSzereg = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "main_SubMenuDbKonfig") vGlobal.vLng_SubMenuDbKonfig = textToSplit[1];
|
||||||
|
|
||||||
|
else if (textToSplit[0] == "dataGridPumpCatalogue_001") vGlobal.vLng_dataGridPumpCatalogue_001 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridPumpCatalogue_002") vGlobal.vLng_dataGridPumpCatalogue_002 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridPumpCatalogue_003") vGlobal.vLng_dataGridPumpCatalogue_003 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridPumpCatalogue_004") vGlobal.vLng_dataGridPumpCatalogue_004 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridPumpCatalogue_005") vGlobal.vLng_dataGridPumpCatalogue_005 = textToSplit[1];
|
||||||
|
|
||||||
|
else if (textToSplit[0] == "dataGridMotorCatalogue_001") vGlobal.vLng_dataGridMotorCatalogue_001 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridMotorCatalogue_002") vGlobal.vLng_dataGridMotorCatalogue_002 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridMotorCatalogue_003") vGlobal.vLng_dataGridMotorCatalogue_003 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridMotorCatalogue_004") vGlobal.vLng_dataGridMotorCatalogue_004 = textToSplit[1];
|
||||||
|
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_001") vGlobal.vLng_dataGridmanuMacturers_001 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_002") vGlobal.vLng_dataGridmanuMacturers_002 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_003") vGlobal.vLng_dataGridmanuMacturers_003 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_004") vGlobal.vLng_dataGridmanuMacturers_004 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_005") vGlobal.vLng_dataGridmanuMacturers_005 = textToSplit[1];
|
||||||
|
else if (textToSplit[0] == "dataGridmanuMacturers_006") vGlobal.vLng_dataGridmanuMacturers_006 = textToSplit[1];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+155
@@ -0,0 +1,155 @@
|
|||||||
|
namespace StacjaProb
|
||||||
|
{
|
||||||
|
partial class ResetUsersPass
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResetUsersPass));
|
||||||
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.comboBoxUsers = new System.Windows.Forms.ComboBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxRePass = new System.Windows.Forms.TextBox();
|
||||||
|
this.textBoxPass = new System.Windows.Forms.TextBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.buttonSave = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(27, 32);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
|
||||||
|
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox1.TabIndex = 0;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// comboBoxUsers
|
||||||
|
//
|
||||||
|
this.comboBoxUsers.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.comboBoxUsers.FormattingEnabled = true;
|
||||||
|
this.comboBoxUsers.Location = new System.Drawing.Point(283, 32);
|
||||||
|
this.comboBoxUsers.Name = "comboBoxUsers";
|
||||||
|
this.comboBoxUsers.Size = new System.Drawing.Size(281, 23);
|
||||||
|
this.comboBoxUsers.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(167, 37);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(110, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Wybierz użytkownika:";
|
||||||
|
//
|
||||||
|
// textBoxRePass
|
||||||
|
//
|
||||||
|
this.textBoxRePass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxRePass.Location = new System.Drawing.Point(283, 86);
|
||||||
|
this.textBoxRePass.Name = "textBoxRePass";
|
||||||
|
this.textBoxRePass.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxRePass.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// textBoxPass
|
||||||
|
//
|
||||||
|
this.textBoxPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.textBoxPass.Location = new System.Drawing.Point(283, 59);
|
||||||
|
this.textBoxPass.Name = "textBoxPass";
|
||||||
|
this.textBoxPass.Size = new System.Drawing.Size(281, 21);
|
||||||
|
this.textBoxPass.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(199, 91);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(78, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "Powtórz hasło:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(238, 64);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(39, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Hasło:";
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
this.buttonSave.Image = global::StacjaProb.Properties.Resources.if_document_save_29767;
|
||||||
|
this.buttonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.buttonSave.Location = new System.Drawing.Point(464, 137);
|
||||||
|
this.buttonSave.Name = "buttonSave";
|
||||||
|
this.buttonSave.Size = new System.Drawing.Size(100, 23);
|
||||||
|
this.buttonSave.TabIndex = 6;
|
||||||
|
this.buttonSave.Text = "Zapisz";
|
||||||
|
this.buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||||
|
//
|
||||||
|
// ResetUsersPass
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(618, 200);
|
||||||
|
this.Controls.Add(this.buttonSave);
|
||||||
|
this.Controls.Add(this.textBoxRePass);
|
||||||
|
this.Controls.Add(this.textBoxPass);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.comboBoxUsers);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "ResetUsersPass";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Reset hasła";
|
||||||
|
this.Load += new System.EventHandler(this.ResetUsersPass_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.ComboBox comboBoxUsers;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox textBoxRePass;
|
||||||
|
private System.Windows.Forms.TextBox textBoxPass;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user