diff --git a/.vs/Diplom B/v16/.suo b/.vs/Diplom B/v16/.suo index ffd6bde..abcd960 100644 Binary files a/.vs/Diplom B/v16/.suo and b/.vs/Diplom B/v16/.suo differ diff --git a/DB/MainDB.cs b/DB/MainDB.cs index 487c64a..de9d0b7 100644 --- a/DB/MainDB.cs +++ b/DB/MainDB.cs @@ -12,10 +12,18 @@ namespace Diplom_B.DB { public class MainDB : DbContext { - public DbSet Zakazchiki { get; set; } public DbSet Users { get; set; } + public DbSet Statusy { get; set; } + public DbSet Dogovory { get; set; } public DbSet Izdeliya { get; set; } + public DbSet DogIzds { get; set; } + public DbSet Zakazchiki { get; set; } + public DbSet Documenty { get; set; } public DbSet Izvescheniya { get; set; } + public DbSet DocIzvs { get; set; } + public DbSet Postavki { get; set; } + public DbSet Oplaty { get; set; } + public MainDB() { //Database.Migrate(); @@ -24,7 +32,7 @@ namespace Diplom_B.DB protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - optionsBuilder.UseSqlite("Data Source=" + Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "Diplom_B.db;"); + optionsBuilder.UseSqlite("Data Source=" + Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "Diplom_B.db;"); } protected override void OnModelCreating(ModelBuilder modelBuilder) { } @@ -35,15 +43,38 @@ namespace Diplom_B.DB public int Id { get; set; } public string Name { get; set; } public string Pass { get; set; } + public int Dog { get; set; } + public int Doc { get; set; } + public int Izv { get; set; } + public int Post { get; set; } + public int Izd { get; set; } + public int Zak { get; set; } + public int Set { get; set; } + public int Default { get; set; } } - public class Zakazchik + public class Status { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } - public string Name { get; set; } - public string Adress { get; set; } - public string Phone { get; set; } - public string Email { get; set; } + public string Stat { get; set; } + } + public class Dogovor + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public string DogNum { get; set; } + public List DogIzds { get; set; } + + [ForeignKey("Zakazchik")] + public int ZakazchikId { get; set; } + public Zakazchik Zakazchik { get; set; } + + public DateTime DataPostavky { get; set; } + public string Garantiy { get; set; } + public string PrikazZapusk { get; set; } + public double Avans { get; set; } + public List Platejy { get; set; } + public string Primechanie { get; set; } } public class Izdelie { @@ -57,6 +88,44 @@ namespace Diplom_B.DB public int OtdelRazrab { get; set; } public string Ved { get; set; } public string GlavKonstr { get; set; } + public List Postavky { get; set; } + public List DogIzds { get; set; } + } + public class DogIzd + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public int Kolvo { get; set; } + + [ForeignKey("Dogovor")] + public int DogovorId { get; set; } + public Dogovor Dogovor { get; set; } + + [ForeignKey("Izdelie")] + public int IzdelieId { get; set; } + public Izdelie Izdelie { get; set; } + } + public class Zakazchik + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public string Name { get; set; } + public string Adress { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + public List Dogovory { get; set; } + } + public class Document + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public string InvNum { get; set; } + public string DecNum { get; set; } + public string Name { get; set; } + public string FileName { get; set; } + public byte[] FileStruct { get; set; } + public string Primechanie { get; set; } + public List DocIzvs { get; set; } } public class Izveschenie { @@ -69,6 +138,52 @@ namespace Diplom_B.DB public string UkazVnedr { get; set; } public string FileName { get; set; } public byte[] FileStruct { get; set; } + public List DocIzvs { get; set; } + } + public class DocIzv + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + + [ForeignKey("Document")] + public int DocumentId { get; set; } + public Document Document { get; set; } + + [ForeignKey("Izveschenie")] + public int IzveschenieId { get; set; } + public Izveschenie Izveschenie { get; set; } + } + public class Postavka + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public string ZavNum { get; set; } + + [ForeignKey("Dogovor")] + public int? DogovorId { get; set; } + public Dogovor Dogovor { get; set; } + + [ForeignKey("Status")] + public int? StatNum { get; set; } + public Status Status { get; set; } + + public DateTime DataPostavki { get; set; } + public string Primechanie { get; set; } + + public int? IzdelieId { get; set; } + public Izdelie Izdelie { get; set; } + } + public class Oplata + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public double Summa { get; set; } + + [ForeignKey("Dogovor")] + public int DogovorId { get; set; } + public Dogovor Dogovor { get; set; } } + + } diff --git a/DB/WorkDB.cs b/DB/WorkDB.cs index 397ad14..3965fe1 100644 --- a/DB/WorkDB.cs +++ b/DB/WorkDB.cs @@ -12,17 +12,36 @@ namespace Diplom_B.DB { using (var DB = new MainDB()) { - var usr = (from u in DB.Users - where u.Name == "admin" - select u).ToArray(); - if (usr.Length < 1) { - DB.Users.Add(new DB.User() + var usr = (from u in DB.Users + where u.Name == "admin" + select u).ToArray(); + if (usr.Length < 1) { - Name = "admin", - Pass = "admin" - }); + DB.Users.Add(new DB.User() + { + Name = "admin", + Pass = "admin", + Dog = 3, + Doc = 3, + Izv = 3, + Post = 3, + Izd = 3, + Zak = 3, + Set = 3, + Default = 1 + }); + } } + { + var stat = (from u in DB.Statusy + select u).ToArray(); + if (stat.Length < 1) + { + DB.Statusy.Add(new Status() {Stat = "Без статуса." }); + } + } + DB.SaveChanges(); } } diff --git a/Diplom B.csproj b/Diplom B.csproj index 18e89be..30a4c28 100644 --- a/Diplom B.csproj +++ b/Diplom B.csproj @@ -266,11 +266,29 @@ - + Form - - ZakazchikForm.cs + + DocForm.cs + + + Form + + + DogForm.cs + + + Form + + + SetForm.cs + + + Form + + + ZakForm.cs Form @@ -305,11 +323,14 @@ + + DogForm.cs + PostForm.cs - - ZakazchikForm.cs + + ZakForm.cs IzvForm.cs diff --git a/DocForm.Designer.cs b/DocForm.Designer.cs new file mode 100644 index 0000000..7cd6c9a --- /dev/null +++ b/DocForm.Designer.cs @@ -0,0 +1,40 @@ + +namespace Diplom_B +{ + partial class DocForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "DocForm"; + } + + #endregion + } +} \ No newline at end of file diff --git a/DocForm.cs b/DocForm.cs new file mode 100644 index 0000000..2d850d9 --- /dev/null +++ b/DocForm.cs @@ -0,0 +1,20 @@ +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 Diplom_B +{ + public partial class DocForm : Form + { + public DocForm() + { + InitializeComponent(); + } + } +} diff --git a/DogForm.Designer.cs b/DogForm.Designer.cs new file mode 100644 index 0000000..0994557 --- /dev/null +++ b/DogForm.Designer.cs @@ -0,0 +1,47 @@ + +namespace Diplom_B +{ + partial class DogForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // DogForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Name = "DogForm"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/DogForm.cs b/DogForm.cs new file mode 100644 index 0000000..afaf400 --- /dev/null +++ b/DogForm.cs @@ -0,0 +1,20 @@ +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 Diplom_B +{ + public partial class DogForm : Form + { + public DogForm() + { + InitializeComponent(); + } + } +} diff --git a/ZakazchikForm.resx b/DogForm.resx similarity index 100% rename from ZakazchikForm.resx rename to DogForm.resx diff --git a/IzdForm.Designer.cs b/IzdForm.Designer.cs index 1bd52c9..9555eb3 100644 --- a/IzdForm.Designer.cs +++ b/IzdForm.Designer.cs @@ -29,9 +29,7 @@ namespace Diplom_B /// private void InitializeComponent() { - this.searchBox = new System.Windows.Forms.TextBox(); - this.resetSearchButton = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); + this.idzGridView = new System.Windows.Forms.DataGridView(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.clearButton = new System.Windows.Forms.Button(); this.idLable = new System.Windows.Forms.Label(); @@ -57,41 +55,36 @@ namespace Diplom_B this.shifrBox = new System.Windows.Forms.TextBox(); this.decBox = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.idzGridView = new System.Windows.Forms.DataGridView(); - this.groupBox1.SuspendLayout(); + this.label1 = new System.Windows.Forms.Label(); + this.resetSearchButton = new System.Windows.Forms.Button(); + this.searchBox = new System.Windows.Forms.TextBox(); + this.mainMenuStrip = new System.Windows.Forms.MenuStrip(); + this.договорToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.документыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.извещенияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.поставкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.заказчикиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.настройкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.idzGridView)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.mainMenuStrip.SuspendLayout(); this.SuspendLayout(); // - // searchBox + // idzGridView // - this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.idzGridView.AllowUserToAddRows = false; + this.idzGridView.AllowUserToDeleteRows = false; + this.idzGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.searchBox.Location = new System.Drawing.Point(387, 12); - this.searchBox.Name = "searchBox"; - this.searchBox.Size = new System.Drawing.Size(561, 20); - this.searchBox.TabIndex = 3; - this.searchBox.Tag = ""; - this.searchBox.TextChanged += new System.EventHandler(this.searchBox_TextChanged); - // - // resetSearchButton - // - this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.resetSearchButton.Location = new System.Drawing.Point(954, 10); - this.resetSearchButton.Name = "resetSearchButton"; - this.resetSearchButton.Size = new System.Drawing.Size(75, 23); - this.resetSearchButton.TabIndex = 4; - this.resetSearchButton.Text = "Сбросить"; - this.resetSearchButton.UseVisualStyleBackColor = true; - this.resetSearchButton.Click += new System.EventHandler(this.resetSearchButton_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(342, 15); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(39, 13); - this.label1.TabIndex = 5; - this.label1.Text = "Поиск"; + this.idzGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.idzGridView.Location = new System.Drawing.Point(345, 55); + this.idzGridView.Name = "idzGridView"; + this.idzGridView.RowHeadersVisible = false; + this.idzGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.idzGridView.Size = new System.Drawing.Size(684, 292); + this.idzGridView.TabIndex = 12; // // groupBox1 // @@ -121,10 +114,10 @@ namespace Diplom_B this.groupBox1.Controls.Add(this.shifrBox); this.groupBox1.Controls.Add(this.decBox); this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Location = new System.Drawing.Point(12, 10); + this.groupBox1.Location = new System.Drawing.Point(12, 27); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(324, 319); - this.groupBox1.TabIndex = 6; + this.groupBox1.Size = new System.Drawing.Size(324, 320); + this.groupBox1.TabIndex = 11; this.groupBox1.TabStop = false; this.groupBox1.Text = "Информационное окно"; // @@ -136,7 +129,6 @@ namespace Diplom_B this.clearButton.TabIndex = 24; this.clearButton.Text = "Сбросить"; this.clearButton.UseVisualStyleBackColor = true; - this.clearButton.Click += new System.EventHandler(this.clearButton_Click); // // idLable // @@ -193,7 +185,6 @@ namespace Diplom_B this.deleteButton.TabIndex = 18; this.deleteButton.Text = "Удалить"; this.deleteButton.UseVisualStyleBackColor = true; - this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click); // // changeButton // @@ -203,7 +194,6 @@ namespace Diplom_B this.changeButton.TabIndex = 17; this.changeButton.Text = "Изменить"; this.changeButton.UseVisualStyleBackColor = true; - this.changeButton.Click += new System.EventHandler(this.changeButton_Click); // // createButton // @@ -213,7 +203,6 @@ namespace Diplom_B this.createButton.TabIndex = 16; this.createButton.Text = "Создать"; this.createButton.UseVisualStyleBackColor = true; - this.createButton.Click += new System.EventHandler(this.createButton_Click); // // label9 // @@ -336,27 +325,99 @@ namespace Diplom_B this.label2.TabIndex = 0; this.label2.Text = "№"; // - // idzGridView + // label1 // - this.idzGridView.AllowUserToAddRows = false; - this.idzGridView.AllowUserToDeleteRows = false; - this.idzGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(342, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(39, 13); + this.label1.TabIndex = 10; + this.label1.Text = "Поиск"; + // + // resetSearchButton + // + this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.resetSearchButton.Location = new System.Drawing.Point(954, 27); + this.resetSearchButton.Name = "resetSearchButton"; + this.resetSearchButton.Size = new System.Drawing.Size(75, 23); + this.resetSearchButton.TabIndex = 9; + this.resetSearchButton.Text = "Сбросить"; + this.resetSearchButton.UseVisualStyleBackColor = true; + // + // searchBox + // + this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.idzGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.idzGridView.Location = new System.Drawing.Point(345, 38); - this.idzGridView.Name = "idzGridView"; - this.idzGridView.RowHeadersVisible = false; - this.idzGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.idzGridView.Size = new System.Drawing.Size(684, 291); - this.idzGridView.TabIndex = 7; - this.idzGridView.CurrentCellChanged += new System.EventHandler(this.izdGridView_CurrentCellChanged); + this.searchBox.Location = new System.Drawing.Point(387, 29); + this.searchBox.Name = "searchBox"; + this.searchBox.Size = new System.Drawing.Size(561, 20); + this.searchBox.TabIndex = 8; + this.searchBox.Tag = ""; + // + // mainMenuStrip + // + this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.договорToolStripMenuItem, + this.документыToolStripMenuItem, + this.извещенияToolStripMenuItem, + this.поставкиToolStripMenuItem, + this.изделияToolStripMenuItem, + this.заказчикиToolStripMenuItem, + this.настройкиToolStripMenuItem}); + this.mainMenuStrip.Location = new System.Drawing.Point(0, 0); + this.mainMenuStrip.Name = "mainMenuStrip"; + this.mainMenuStrip.Size = new System.Drawing.Size(1041, 24); + this.mainMenuStrip.TabIndex = 13; + this.mainMenuStrip.Text = "menuStrip1"; + // + // договорToolStripMenuItem + // + this.договорToolStripMenuItem.Name = "договорToolStripMenuItem"; + this.договорToolStripMenuItem.Size = new System.Drawing.Size(66, 20); + this.договорToolStripMenuItem.Text = "Договор"; + // + // документыToolStripMenuItem + // + this.документыToolStripMenuItem.Name = "документыToolStripMenuItem"; + this.документыToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.документыToolStripMenuItem.Text = "Документы"; + // + // извещенияToolStripMenuItem + // + this.извещенияToolStripMenuItem.Name = "извещенияToolStripMenuItem"; + this.извещенияToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.извещенияToolStripMenuItem.Text = "Извещения"; + // + // поставкиToolStripMenuItem + // + this.поставкиToolStripMenuItem.Name = "поставкиToolStripMenuItem"; + this.поставкиToolStripMenuItem.Size = new System.Drawing.Size(71, 20); + this.поставкиToolStripMenuItem.Text = "Поставки"; + // + // изделияToolStripMenuItem + // + this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; + this.изделияToolStripMenuItem.Size = new System.Drawing.Size(65, 20); + this.изделияToolStripMenuItem.Text = "Изделия"; + // + // заказчикиToolStripMenuItem + // + this.заказчикиToolStripMenuItem.Name = "заказчикиToolStripMenuItem"; + this.заказчикиToolStripMenuItem.Size = new System.Drawing.Size(76, 20); + this.заказчикиToolStripMenuItem.Text = "Заказчики"; + // + // настройкиToolStripMenuItem + // + this.настройкиToolStripMenuItem.Name = "настройкиToolStripMenuItem"; + this.настройкиToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.настройкиToolStripMenuItem.Text = "Настройки"; // // IzdForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1041, 341); + this.ClientSize = new System.Drawing.Size(1041, 359); + this.Controls.Add(this.mainMenuStrip); this.Controls.Add(this.idzGridView); this.Controls.Add(this.groupBox1); this.Controls.Add(this.label1); @@ -365,29 +426,24 @@ namespace Diplom_B this.Name = "IzdForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Изделия"; + ((System.ComponentModel.ISupportInitialize)(this.idzGridView)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.idzGridView)).EndInit(); + this.mainMenuStrip.ResumeLayout(false); + this.mainMenuStrip.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - private System.Windows.Forms.TextBox searchBox; - private System.Windows.Forms.Button resetSearchButton; - private System.Windows.Forms.Label label1; + + private System.Windows.Forms.DataGridView idzGridView; private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox vedBox; - private System.Windows.Forms.TextBox otdRazBox; - private System.Windows.Forms.TextBox cenaBox; - private System.Windows.Forms.TextBox literaBox; - private System.Windows.Forms.TextBox shifrBox; - private System.Windows.Forms.TextBox decBox; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Label idLable; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox nameBox; private System.Windows.Forms.Label errorLable; private System.Windows.Forms.Button selectButton; private System.Windows.Forms.Button deleteButton; @@ -398,10 +454,26 @@ namespace Diplom_B private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox nameBox; - private System.Windows.Forms.Label idLable; - private System.Windows.Forms.Button clearButton; - private System.Windows.Forms.DataGridView idzGridView; - } + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox vedBox; + private System.Windows.Forms.TextBox otdRazBox; + private System.Windows.Forms.TextBox cenaBox; + private System.Windows.Forms.TextBox literaBox; + private System.Windows.Forms.TextBox shifrBox; + private System.Windows.Forms.TextBox decBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button resetSearchButton; + private System.Windows.Forms.TextBox searchBox; + private System.Windows.Forms.MenuStrip mainMenuStrip; + private System.Windows.Forms.ToolStripMenuItem договорToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem документыToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem извещенияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem поставкиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem изделияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem заказчикиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem настройкиToolStripMenuItem; + } } \ No newline at end of file diff --git a/IzdForm.resx b/IzdForm.resx index 1af7de1..f80b0f3 100644 --- a/IzdForm.resx +++ b/IzdForm.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/IzvForm.Designer.cs b/IzvForm.Designer.cs index b1a63f5..4df552b 100644 --- a/IzvForm.Designer.cs +++ b/IzvForm.Designer.cs @@ -29,6 +29,14 @@ namespace Diplom_B /// private void InitializeComponent() { + this.selectFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.mainMenuStrip = new System.Windows.Forms.MenuStrip(); + this.договорToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.izvGridView = new System.Windows.Forms.DataGridView(); + this.resetSearchButton = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.searchBox = new System.Windows.Forms.TextBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.linkFileLabel = new System.Windows.Forms.LinkLabel(); @@ -52,17 +60,87 @@ namespace Diplom_B this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.searchBox = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.resetSearchButton = new System.Windows.Forms.Button(); - this.izvGridView = new System.Windows.Forms.DataGridView(); - this.selectFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.документыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.извещенияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.поставкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.заказчикиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.настройкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mainMenuStrip.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.izvGridView)).BeginInit(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.izvGridView)).BeginInit(); this.SuspendLayout(); // + // selectFileDialog + // + this.selectFileDialog.Title = "Выбор файла для загрузки"; + // + // mainMenuStrip + // + this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.договорToolStripMenuItem, + this.документыToolStripMenuItem, + this.извещенияToolStripMenuItem, + this.поставкиToolStripMenuItem, + this.изделияToolStripMenuItem, + this.заказчикиToolStripMenuItem, + this.настройкиToolStripMenuItem}); + this.mainMenuStrip.Location = new System.Drawing.Point(0, 0); + this.mainMenuStrip.Name = "mainMenuStrip"; + this.mainMenuStrip.Size = new System.Drawing.Size(869, 24); + this.mainMenuStrip.TabIndex = 0; + this.mainMenuStrip.Text = "menuStrip1"; + // + // договорToolStripMenuItem + // + this.договорToolStripMenuItem.Name = "договорToolStripMenuItem"; + this.договорToolStripMenuItem.Size = new System.Drawing.Size(66, 20); + this.договорToolStripMenuItem.Text = "Договор"; + // + // izvGridView + // + this.izvGridView.AllowUserToAddRows = false; + this.izvGridView.AllowUserToDeleteRows = false; + this.izvGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.izvGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.izvGridView.Location = new System.Drawing.Point(324, 53); + this.izvGridView.Name = "izvGridView"; + this.izvGridView.RowHeadersVisible = false; + this.izvGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.izvGridView.Size = new System.Drawing.Size(533, 256); + this.izvGridView.TabIndex = 19; + // + // resetSearchButton + // + this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.resetSearchButton.Location = new System.Drawing.Point(782, 25); + this.resetSearchButton.Name = "resetSearchButton"; + this.resetSearchButton.Size = new System.Drawing.Size(75, 23); + this.resetSearchButton.TabIndex = 18; + this.resetSearchButton.Text = "Сбросить"; + this.resetSearchButton.UseVisualStyleBackColor = true; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(321, 30); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(39, 13); + this.label10.TabIndex = 17; + this.label10.Text = "Поиск"; + // + // searchBox + // + this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.searchBox.Location = new System.Drawing.Point(366, 27); + this.searchBox.Name = "searchBox"; + this.searchBox.Size = new System.Drawing.Size(410, 20); + this.searchBox.TabIndex = 16; + // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -86,10 +164,10 @@ namespace Diplom_B this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Location = new System.Drawing.Point(12, 27); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(303, 283); - this.groupBox1.TabIndex = 0; + this.groupBox1.Size = new System.Drawing.Size(303, 282); + this.groupBox1.TabIndex = 15; this.groupBox1.TabStop = false; this.groupBox1.Text = "Информационное окно"; // @@ -116,7 +194,6 @@ namespace Diplom_B this.linkFileLabel.Text = "Ссылка на файл."; this.linkFileLabel.Visible = false; this.linkFileLabel.VisitedLinkColor = System.Drawing.Color.Blue; - this.linkFileLabel.Click += new System.EventHandler(this.linkFileLabel_Click); // // resetFileButton // @@ -126,7 +203,6 @@ namespace Diplom_B this.resetFileButton.TabIndex = 32; this.resetFileButton.Text = "Удалить"; this.resetFileButton.UseVisualStyleBackColor = true; - this.resetFileButton.Click += new System.EventHandler(this.resetFileButton_Click); // // fileLoadButton // @@ -136,7 +212,6 @@ namespace Diplom_B this.fileLoadButton.TabIndex = 23; this.fileLoadButton.Text = "Выбрать"; this.fileLoadButton.UseVisualStyleBackColor = true; - this.fileLoadButton.Click += new System.EventHandler(this.fileLoadButton_Click); // // errorLabel // @@ -168,7 +243,6 @@ namespace Diplom_B this.createIzvButton.TabIndex = 26; this.createIzvButton.Text = "Создать"; this.createIzvButton.UseVisualStyleBackColor = true; - this.createIzvButton.Click += new System.EventHandler(this.createIzvButton_Click); // // changeIzvButton // @@ -178,7 +252,6 @@ namespace Diplom_B this.changeIzvButton.TabIndex = 27; this.changeIzvButton.Text = "Изменить"; this.changeIzvButton.UseVisualStyleBackColor = true; - this.changeIzvButton.Click += new System.EventHandler(this.changeIzvButton_Click); // // idLabel // @@ -197,7 +270,6 @@ namespace Diplom_B this.ResetIzvButton.TabIndex = 29; this.ResetIzvButton.Text = "Сбросить"; this.ResetIzvButton.UseVisualStyleBackColor = true; - this.ResetIzvButton.Click += new System.EventHandler(this.ResetIzvButton_Click); // // deleteIzvButton // @@ -207,7 +279,6 @@ namespace Diplom_B this.deleteIzvButton.TabIndex = 28; this.deleteIzvButton.Text = "Удалить"; this.deleteIzvButton.UseVisualStyleBackColor = true; - this.deleteIzvButton.Click += new System.EventHandler(this.deleteIzvButton_Click); // // ukazVnedrBox // @@ -298,109 +369,106 @@ namespace Diplom_B this.label1.TabIndex = 9; this.label1.Text = "№"; // - // searchBox + // документыToolStripMenuItem // - this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.searchBox.Location = new System.Drawing.Point(366, 12); - this.searchBox.Name = "searchBox"; - this.searchBox.Size = new System.Drawing.Size(410, 20); - this.searchBox.TabIndex = 1; - this.searchBox.TextChanged += new System.EventHandler(this.searchBox_TextChanged); + this.документыToolStripMenuItem.Name = "документыToolStripMenuItem"; + this.документыToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.документыToolStripMenuItem.Text = "Документы"; // - // label10 + // извещенияToolStripMenuItem // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(321, 15); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(39, 13); - this.label10.TabIndex = 2; - this.label10.Text = "Поиск"; + this.извещенияToolStripMenuItem.Name = "извещенияToolStripMenuItem"; + this.извещенияToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.извещенияToolStripMenuItem.Text = "Извещения"; // - // resetSearchButton + // поставкиToolStripMenuItem // - this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.resetSearchButton.Location = new System.Drawing.Point(782, 10); - this.resetSearchButton.Name = "resetSearchButton"; - this.resetSearchButton.Size = new System.Drawing.Size(75, 23); - this.resetSearchButton.TabIndex = 3; - this.resetSearchButton.Text = "Сбросить"; - this.resetSearchButton.UseVisualStyleBackColor = true; - this.resetSearchButton.Click += new System.EventHandler(this.resetSearch_Click); + this.поставкиToolStripMenuItem.Name = "поставкиToolStripMenuItem"; + this.поставкиToolStripMenuItem.Size = new System.Drawing.Size(71, 20); + this.поставкиToolStripMenuItem.Text = "Поставки"; // - // izvGridView + // изделияToolStripMenuItem // - this.izvGridView.AllowUserToAddRows = false; - this.izvGridView.AllowUserToDeleteRows = false; - this.izvGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.izvGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.izvGridView.Location = new System.Drawing.Point(324, 38); - this.izvGridView.Name = "izvGridView"; - this.izvGridView.RowHeadersVisible = false; - this.izvGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.izvGridView.Size = new System.Drawing.Size(533, 257); - this.izvGridView.TabIndex = 4; - this.izvGridView.CurrentCellChanged += new System.EventHandler(this.izvGridView_CurrentCellChanged); + this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; + this.изделияToolStripMenuItem.Size = new System.Drawing.Size(65, 20); + this.изделияToolStripMenuItem.Text = "Изделия"; // - // selectFileDialog + // заказчикиToolStripMenuItem // - this.selectFileDialog.Title = "Выбор файла для загрузки"; + this.заказчикиToolStripMenuItem.Name = "заказчикиToolStripMenuItem"; + this.заказчикиToolStripMenuItem.Size = new System.Drawing.Size(76, 20); + this.заказчикиToolStripMenuItem.Text = "Заказчики"; + // + // настройкиToolStripMenuItem + // + this.настройкиToolStripMenuItem.Name = "настройкиToolStripMenuItem"; + this.настройкиToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.настройкиToolStripMenuItem.Text = "Настройки"; // // IzvForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(869, 307); + this.ClientSize = new System.Drawing.Size(869, 321); this.Controls.Add(this.izvGridView); this.Controls.Add(this.resetSearchButton); this.Controls.Add(this.label10); this.Controls.Add(this.searchBox); this.Controls.Add(this.groupBox1); + this.Controls.Add(this.mainMenuStrip); + this.MainMenuStrip = this.mainMenuStrip; this.Name = "IzvForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Извещения"; + this.mainMenuStrip.ResumeLayout(false); + this.mainMenuStrip.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.izvGridView)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.izvGridView)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - + private System.Windows.Forms.OpenFileDialog selectFileDialog; + private System.Windows.Forms.SaveFileDialog saveFileDialog; + private System.Windows.Forms.MenuStrip mainMenuStrip; + private System.Windows.Forms.ToolStripMenuItem договорToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem документыToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem извещенияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem поставкиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem изделияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem заказчикиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem настройкиToolStripMenuItem; + private System.Windows.Forms.DataGridView izvGridView; + private System.Windows.Forms.Button resetSearchButton; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox searchBox; private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.LinkLabel linkFileLabel; + private System.Windows.Forms.Button resetFileButton; + private System.Windows.Forms.Button fileLoadButton; private System.Windows.Forms.Label errorLabel; private System.Windows.Forms.Button SelectIzvButton; private System.Windows.Forms.Button createIzvButton; private System.Windows.Forms.Button changeIzvButton; private System.Windows.Forms.Label idLabel; private System.Windows.Forms.Button ResetIzvButton; - private System.Windows.Forms.Button fileLoadButton; private System.Windows.Forms.Button deleteIzvButton; - private System.Windows.Forms.LinkLabel linkFileLabel; private System.Windows.Forms.TextBox ukazVnedrBox; private System.Windows.Forms.TextBox ukazZadBox; private System.Windows.Forms.TextBox izmNumBox; private System.Windows.Forms.TextBox invNumBox; private System.Windows.Forms.TextBox izvNumBox; - private System.Windows.Forms.TextBox searchBox; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Button resetSearchButton; - private System.Windows.Forms.DataGridView izvGridView; - private System.Windows.Forms.OpenFileDialog selectFileDialog; - private System.Windows.Forms.SaveFileDialog saveFileDialog; - private System.Windows.Forms.Button resetFileButton; - private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/IzvForm.resx b/IzvForm.resx index 7ed934e..c6774a7 100644 --- a/IzvForm.resx +++ b/IzvForm.resx @@ -123,4 +123,7 @@ 154, 17 + + 283, 17 + \ No newline at end of file diff --git a/LoginForm.cs b/LoginForm.cs index 07aa882..b8e266f 100644 --- a/LoginForm.cs +++ b/LoginForm.cs @@ -34,6 +34,8 @@ namespace Diplom_B return; } + Program.user = usr; + this.Hide(); var izdForm = new IzdForm(); izdForm.Closed += (s, args) => this.Close(); diff --git a/MainForm.cs b/MainForm.cs index 4059bc3..0969030 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -20,7 +20,7 @@ namespace Diplom_B private void button2_Click(object sender, EventArgs e) { this.Hide(); - var form = new ZakazchikForm(); + var form = new ZakForm(); form.ShowDialog(); this.Show(); } diff --git a/Program.cs b/Program.cs index e11a2cc..a171f66 100644 --- a/Program.cs +++ b/Program.cs @@ -9,6 +9,7 @@ namespace Diplom_B { static class Program { + public static User user; /// /// Главная точка входа для приложения. /// diff --git a/SetForm.Designer.cs b/SetForm.Designer.cs new file mode 100644 index 0000000..7735793 --- /dev/null +++ b/SetForm.Designer.cs @@ -0,0 +1,40 @@ + +namespace Diplom_B +{ + partial class SetForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "SetForm"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SetForm.cs b/SetForm.cs new file mode 100644 index 0000000..04fc322 --- /dev/null +++ b/SetForm.cs @@ -0,0 +1,20 @@ +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 Diplom_B +{ + public partial class SetForm : Form + { + public SetForm() + { + InitializeComponent(); + } + } +} diff --git a/ZakazchikForm.Designer.cs b/ZakForm.Designer.cs similarity index 70% rename from ZakazchikForm.Designer.cs rename to ZakForm.Designer.cs index 68a1c07..9647125 100644 --- a/ZakazchikForm.Designer.cs +++ b/ZakForm.Designer.cs @@ -1,7 +1,7 @@  namespace Diplom_B { - partial class ZakazchikForm + partial class ZakForm { /// /// Required designer variable. @@ -50,8 +50,17 @@ namespace Diplom_B this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); + this.mainMenuStrip = new System.Windows.Forms.MenuStrip(); + this.договорToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.документыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.извещенияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.поставкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.заказчикиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.настройкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.zakGridView)).BeginInit(); this.groupBox1.SuspendLayout(); + this.mainMenuStrip.SuspendLayout(); this.SuspendLayout(); // // zakGridView @@ -63,43 +72,40 @@ namespace Diplom_B | System.Windows.Forms.AnchorStyles.Right))); this.zakGridView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; this.zakGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.zakGridView.Location = new System.Drawing.Point(324, 38); + this.zakGridView.Location = new System.Drawing.Point(324, 53); this.zakGridView.Name = "zakGridView"; this.zakGridView.RowHeadersVisible = false; this.zakGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.zakGridView.Size = new System.Drawing.Size(501, 292); - this.zakGridView.TabIndex = 9; - this.zakGridView.CurrentCellChanged += new System.EventHandler(this.zakGridView_CurrentCellChanged); + this.zakGridView.Size = new System.Drawing.Size(501, 291); + this.zakGridView.TabIndex = 14; // // resetSearchButton // this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.resetSearchButton.Location = new System.Drawing.Point(750, 10); + this.resetSearchButton.Location = new System.Drawing.Point(750, 25); this.resetSearchButton.Name = "resetSearchButton"; this.resetSearchButton.Size = new System.Drawing.Size(75, 23); - this.resetSearchButton.TabIndex = 8; + this.resetSearchButton.TabIndex = 13; this.resetSearchButton.Text = "Сбросить"; this.resetSearchButton.UseVisualStyleBackColor = true; - this.resetSearchButton.Click += new System.EventHandler(this.resetSearchButton_Click); // // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(321, 15); + this.label10.Location = new System.Drawing.Point(321, 30); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(39, 13); - this.label10.TabIndex = 7; + this.label10.TabIndex = 12; this.label10.Text = "Поиск"; // // searchBox // this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.searchBox.Location = new System.Drawing.Point(366, 12); + this.searchBox.Location = new System.Drawing.Point(366, 27); this.searchBox.Name = "searchBox"; this.searchBox.Size = new System.Drawing.Size(378, 20); - this.searchBox.TabIndex = 6; - this.searchBox.TextChanged += new System.EventHandler(this.searchBox_TextChanged); + this.searchBox.TabIndex = 11; // // groupBox1 // @@ -121,10 +127,10 @@ namespace Diplom_B this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Location = new System.Drawing.Point(12, 27); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(303, 318); - this.groupBox1.TabIndex = 5; + this.groupBox1.Size = new System.Drawing.Size(303, 317); + this.groupBox1.TabIndex = 10; this.groupBox1.TabStop = false; this.groupBox1.Text = "Информационное окно"; // @@ -166,7 +172,6 @@ namespace Diplom_B this.createZakButton.TabIndex = 26; this.createZakButton.Text = "Создать"; this.createZakButton.UseVisualStyleBackColor = true; - this.createZakButton.Click += new System.EventHandler(this.createZakButton_Click); // // changeZakButton // @@ -176,7 +181,6 @@ namespace Diplom_B this.changeZakButton.TabIndex = 27; this.changeZakButton.Text = "Изменить"; this.changeZakButton.UseVisualStyleBackColor = true; - this.changeZakButton.Click += new System.EventHandler(this.changeZakButton_Click); // // idLabel // @@ -195,7 +199,6 @@ namespace Diplom_B this.resetZakButton.TabIndex = 29; this.resetZakButton.Text = "Сбросить"; this.resetZakButton.UseVisualStyleBackColor = true; - this.resetZakButton.Click += new System.EventHandler(this.resetZakButton_Click); // // deleteZakButton // @@ -205,7 +208,6 @@ namespace Diplom_B this.deleteZakButton.TabIndex = 28; this.deleteZakButton.Text = "Удалить"; this.deleteZakButton.UseVisualStyleBackColor = true; - this.deleteZakButton.Click += new System.EventHandler(this.deleteZakButton_Click); // // emailBox // @@ -273,11 +275,70 @@ namespace Diplom_B this.label1.TabIndex = 9; this.label1.Text = "№"; // + // mainMenuStrip + // + this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.договорToolStripMenuItem, + this.документыToolStripMenuItem, + this.извещенияToolStripMenuItem, + this.поставкиToolStripMenuItem, + this.изделияToolStripMenuItem, + this.заказчикиToolStripMenuItem, + this.настройкиToolStripMenuItem}); + this.mainMenuStrip.Location = new System.Drawing.Point(0, 0); + this.mainMenuStrip.Name = "mainMenuStrip"; + this.mainMenuStrip.Size = new System.Drawing.Size(837, 24); + this.mainMenuStrip.TabIndex = 15; + this.mainMenuStrip.Text = "menuStrip1"; + // + // договорToolStripMenuItem + // + this.договорToolStripMenuItem.Name = "договорToolStripMenuItem"; + this.договорToolStripMenuItem.Size = new System.Drawing.Size(66, 20); + this.договорToolStripMenuItem.Text = "Договор"; + // + // документыToolStripMenuItem + // + this.документыToolStripMenuItem.Name = "документыToolStripMenuItem"; + this.документыToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.документыToolStripMenuItem.Text = "Документы"; + // + // извещенияToolStripMenuItem + // + this.извещенияToolStripMenuItem.Name = "извещенияToolStripMenuItem"; + this.извещенияToolStripMenuItem.Size = new System.Drawing.Size(82, 20); + this.извещенияToolStripMenuItem.Text = "Извещения"; + // + // поставкиToolStripMenuItem + // + this.поставкиToolStripMenuItem.Name = "поставкиToolStripMenuItem"; + this.поставкиToolStripMenuItem.Size = new System.Drawing.Size(71, 20); + this.поставкиToolStripMenuItem.Text = "Поставки"; + // + // изделияToolStripMenuItem + // + this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; + this.изделияToolStripMenuItem.Size = new System.Drawing.Size(65, 20); + this.изделияToolStripMenuItem.Text = "Изделия"; + // + // заказчикиToolStripMenuItem + // + this.заказчикиToolStripMenuItem.Name = "заказчикиToolStripMenuItem"; + this.заказчикиToolStripMenuItem.Size = new System.Drawing.Size(76, 20); + this.заказчикиToolStripMenuItem.Text = "Заказчики"; + // + // настройкиToolStripMenuItem + // + this.настройкиToolStripMenuItem.Name = "настройкиToolStripMenuItem"; + this.настройкиToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.настройкиToolStripMenuItem.Text = "Настройки"; + // // ZakazchikForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(837, 342); + this.ClientSize = new System.Drawing.Size(837, 356); + this.Controls.Add(this.mainMenuStrip); this.Controls.Add(this.zakGridView); this.Controls.Add(this.resetSearchButton); this.Controls.Add(this.label10); @@ -289,6 +350,8 @@ namespace Diplom_B ((System.ComponentModel.ISupportInitialize)(this.zakGridView)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.mainMenuStrip.ResumeLayout(false); + this.mainMenuStrip.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -301,6 +364,7 @@ namespace Diplom_B private System.Windows.Forms.Label label10; private System.Windows.Forms.TextBox searchBox; private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RichTextBox adressBox; private System.Windows.Forms.Label errorLabel; private System.Windows.Forms.Button SelectZakButton; private System.Windows.Forms.Button createZakButton; @@ -316,6 +380,13 @@ namespace Diplom_B private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; - private System.Windows.Forms.RichTextBox adressBox; + private System.Windows.Forms.MenuStrip mainMenuStrip; + private System.Windows.Forms.ToolStripMenuItem договорToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem документыToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem извещенияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem поставкиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem изделияToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem заказчикиToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem настройкиToolStripMenuItem; } } \ No newline at end of file diff --git a/ZakazchikForm.cs b/ZakForm.cs similarity index 98% rename from ZakazchikForm.cs rename to ZakForm.cs index 0f73d8e..cc83e03 100644 --- a/ZakazchikForm.cs +++ b/ZakForm.cs @@ -11,7 +11,7 @@ using Diplom_B.DB; namespace Diplom_B { - public partial class ZakazchikForm : Form + public partial class ZakForm : Form { private Task errDrop; private void ShowError(string msg = null) @@ -81,7 +81,7 @@ namespace Diplom_B zakGridView_CurrentCellChanged(this, new EventArgs()); } - public ZakazchikForm() + public ZakForm() { InitializeComponent(); try { UpdateZakTable(WorkDB.ListZakazchik(searchBox.Text)); } diff --git a/ZakForm.resx b/ZakForm.resx new file mode 100644 index 0000000..f80b0f3 --- /dev/null +++ b/ZakForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/bin/Release/Diplom B.application b/bin/Release/Diplom B.application index 6c7398d..7a9027b 100644 --- a/bin/Release/Diplom B.application +++ b/bin/Release/Diplom B.application @@ -14,7 +14,7 @@ - ++GWbjtF1CaF5ugYGC+UUJeSyl7Xy5g/EVE06sLJ8XA= + 2b1QubE+Ze47CBE1wu8wixIqu7deJcA0dNWnAr38KvA= diff --git a/bin/Release/Diplom B.exe b/bin/Release/Diplom B.exe index bbcf08f..8ee4c6f 100644 Binary files a/bin/Release/Diplom B.exe and b/bin/Release/Diplom B.exe differ diff --git a/bin/Release/Diplom B.exe.manifest b/bin/Release/Diplom B.exe.manifest index 1203958..476c8bb 100644 --- a/bin/Release/Diplom B.exe.manifest +++ b/bin/Release/Diplom B.exe.manifest @@ -42,14 +42,14 @@ - + - 8H4LiM6kw+2ElHuLdTLUDVU8g6mzjv6/9jjAisSl1LA= + nnyDiRvwfMP5VcD7jutgpMUrDVo1ENlsBCgfQp+ZtCI= diff --git a/bin/Release/Diplom B.pdb b/bin/Release/Diplom B.pdb index 108f349..5591ca3 100644 Binary files a/bin/Release/Diplom B.pdb and b/bin/Release/Diplom B.pdb differ diff --git a/bin/Release/Diplom_B.db b/bin/Release/Diplom_B.db new file mode 100644 index 0000000..4951304 Binary files /dev/null and b/bin/Release/Diplom_B.db differ diff --git a/bin/Release/app.publish/Diplom B.exe b/bin/Release/app.publish/Diplom B.exe index d880928..997ed05 100644 Binary files a/bin/Release/app.publish/Diplom B.exe and b/bin/Release/app.publish/Diplom B.exe differ diff --git a/obj/Release/DesignTimeResolveAssemblyReferences.cache b/obj/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..84caf55 Binary files /dev/null and b/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index f0b596f..80763a7 100644 Binary files a/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Release/Diplom B.application b/obj/Release/Diplom B.application index 6c7398d..7a9027b 100644 --- a/obj/Release/Diplom B.application +++ b/obj/Release/Diplom B.application @@ -14,7 +14,7 @@ - ++GWbjtF1CaF5ugYGC+UUJeSyl7Xy5g/EVE06sLJ8XA= + 2b1QubE+Ze47CBE1wu8wixIqu7deJcA0dNWnAr38KvA= diff --git a/obj/Release/Diplom B.csproj.AssemblyReference.cache b/obj/Release/Diplom B.csproj.AssemblyReference.cache index f5e894a..5f33263 100644 Binary files a/obj/Release/Diplom B.csproj.AssemblyReference.cache and b/obj/Release/Diplom B.csproj.AssemblyReference.cache differ diff --git a/obj/Release/Diplom B.csproj.CoreCompileInputs.cache b/obj/Release/Diplom B.csproj.CoreCompileInputs.cache index cdeaa85..25c6838 100644 --- a/obj/Release/Diplom B.csproj.CoreCompileInputs.cache +++ b/obj/Release/Diplom B.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -6c7778e3dd037a6b96cceb0ce48d3c56d9b0ab12 +65b149ef12bdbb64fe7f050140b32fb99bf7c528 diff --git a/obj/Release/Diplom B.csproj.FileListAbsolute.txt b/obj/Release/Diplom B.csproj.FileListAbsolute.txt index c1b6738..e68461b 100644 --- a/obj/Release/Diplom B.csproj.FileListAbsolute.txt +++ b/obj/Release/Diplom B.csproj.FileListAbsolute.txt @@ -114,3 +114,4 @@ D:\GIT\Diplom B\obj\Release\Diplom_B.LoginForm.resources D:\GIT\Diplom B\obj\Release\Diplom_B.PostForm.resources D:\GIT\Diplom B\obj\Release\Diplom_B.ZakazchikForm.resources D:\GIT\Diplom B\obj\Release\Diplom_B.MainForm.resources +D:\GIT\Diplom B\obj\Release\Diplom_B.DogForm.resources diff --git a/obj/Release/Diplom B.csproj.GenerateResource.cache b/obj/Release/Diplom B.csproj.GenerateResource.cache index eeb4071..fcd80c0 100644 Binary files a/obj/Release/Diplom B.csproj.GenerateResource.cache and b/obj/Release/Diplom B.csproj.GenerateResource.cache differ diff --git a/obj/Release/Diplom B.exe b/obj/Release/Diplom B.exe index bbcf08f..8ee4c6f 100644 Binary files a/obj/Release/Diplom B.exe and b/obj/Release/Diplom B.exe differ diff --git a/obj/Release/Diplom B.exe.manifest b/obj/Release/Diplom B.exe.manifest index 1203958..476c8bb 100644 --- a/obj/Release/Diplom B.exe.manifest +++ b/obj/Release/Diplom B.exe.manifest @@ -42,14 +42,14 @@ - + - 8H4LiM6kw+2ElHuLdTLUDVU8g6mzjv6/9jjAisSl1LA= + nnyDiRvwfMP5VcD7jutgpMUrDVo1ENlsBCgfQp+ZtCI= diff --git a/obj/Release/Diplom B.pdb b/obj/Release/Diplom B.pdb index 108f349..5591ca3 100644 Binary files a/obj/Release/Diplom B.pdb and b/obj/Release/Diplom B.pdb differ diff --git a/obj/Release/Diplom_B.DogForm.resources b/obj/Release/Diplom_B.DogForm.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Release/Diplom_B.DogForm.resources differ