diff --git a/HKCardManager/Cancellation.Designer.cs b/HKCardManager/Cancellation.Designer.cs deleted file mode 100644 index dca0f52..0000000 --- a/HKCardManager/Cancellation.Designer.cs +++ /dev/null @@ -1,136 +0,0 @@ -namespace HKCardManager -{ - partial class Cancellation - { - /// - /// 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.button2 = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(231, 121); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(90, 32); - this.button2.TabIndex = 20; - this.button2.Text = "确认"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(108, 121); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(95, 32); - this.button1.TabIndex = 19; - this.button1.Text = "取消"; - this.button1.UseVisualStyleBackColor = true; - // - // textBox2 - // - this.textBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox2.Location = new System.Drawing.Point(108, 70); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(213, 28); - this.textBox2.TabIndex = 18; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label4.Location = new System.Drawing.Point(7, 70); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(106, 21); - this.label4.TabIndex = 17; - this.label4.Text = "输入手机号:"; - // - // textBox1 - // - this.textBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox1.Location = new System.Drawing.Point(108, 21); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(213, 28); - this.textBox1.TabIndex = 12; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label1.Location = new System.Drawing.Point(23, 21); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(90, 21); - this.label1.TabIndex = 11; - this.label1.Text = "输入姓名:"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label5.Location = new System.Drawing.Point(0, 163); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(43, 17); - this.label5.TabIndex = 21; - this.label5.Text = "label5"; - // - // Cancellation - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(338, 180); - this.Controls.Add(this.label5); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.label4); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "Cancellation"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "销户"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Button button2; - private Button button1; - private TextBox textBox2; - private Label label4; - private TextBox textBox1; - private Label label1; - private Label label5; - } -} \ No newline at end of file diff --git a/HKCardManager/Cancellation.cs b/HKCardManager/Cancellation.cs deleted file mode 100644 index c1baf73..0000000 --- a/HKCardManager/Cancellation.cs +++ /dev/null @@ -1,25 +0,0 @@ -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 HKCardManager -{ - public partial class Cancellation : Form - { - public Cancellation() - { - InitializeComponent(); - } - - private void button2_Click(object sender, EventArgs e) - { - - } - } -} diff --git a/HKCardManager/Cancellation.resx b/HKCardManager/Cancellation.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/Cancellation.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/DailyConsumptionTable.Designer.cs b/HKCardManager/DailyConsumptionTable.Designer.cs deleted file mode 100644 index 4d4f130..0000000 --- a/HKCardManager/DailyConsumptionTable.Designer.cs +++ /dev/null @@ -1,99 +0,0 @@ -namespace HKCardManager -{ - partial class DailyConsumptionTable - { - /// - /// 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.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.查询ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.导出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); - this.SuspendLayout(); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.查询ToolStripMenuItem, - this.导出ToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(800, 25); - this.menuStrip1.TabIndex = 0; - this.menuStrip1.Text = "menuStrip1"; - // - // 查询ToolStripMenuItem - // - this.查询ToolStripMenuItem.Name = "查询ToolStripMenuItem"; - this.查询ToolStripMenuItem.Size = new System.Drawing.Size(44, 21); - this.查询ToolStripMenuItem.Text = "查询"; - this.查询ToolStripMenuItem.Click += new System.EventHandler(this.查询ToolStripMenuItem_Click); - // - // 导出ToolStripMenuItem - // - this.导出ToolStripMenuItem.Name = "导出ToolStripMenuItem"; - this.导出ToolStripMenuItem.Size = new System.Drawing.Size(44, 21); - this.导出ToolStripMenuItem.Text = "导出"; - // - // dataGridView1 - // - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridView1.Location = new System.Drawing.Point(0, 25); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 25; - this.dataGridView1.Size = new System.Drawing.Size(800, 425); - this.dataGridView1.TabIndex = 1; - // - // DailyConsumptionTable - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.dataGridView1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "DailyConsumptionTable"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "记次就餐天消费表"; - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private MenuStrip menuStrip1; - private ToolStripMenuItem 查询ToolStripMenuItem; - private ToolStripMenuItem 导出ToolStripMenuItem; - private DataGridView dataGridView1; - } -} \ No newline at end of file diff --git a/HKCardManager/DailyConsumptionTable.cs b/HKCardManager/DailyConsumptionTable.cs deleted file mode 100644 index db687de..0000000 --- a/HKCardManager/DailyConsumptionTable.cs +++ /dev/null @@ -1,25 +0,0 @@ -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 HKCardManager -{ - public partial class DailyConsumptionTable : Form - { - public DailyConsumptionTable() - { - InitializeComponent(); - } - - private void 查询ToolStripMenuItem_Click(object sender, EventArgs e) - { - new Query().ShowDialog(); - } - } -} diff --git a/HKCardManager/DailyConsumptionTable.resx b/HKCardManager/DailyConsumptionTable.resx deleted file mode 100644 index 938108a..0000000 --- a/HKCardManager/DailyConsumptionTable.resx +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/HKCardManager/Hairpin.Designer.cs b/HKCardManager/Hairpin.Designer.cs deleted file mode 100644 index 7576dc3..0000000 --- a/HKCardManager/Hairpin.Designer.cs +++ /dev/null @@ -1,239 +0,0 @@ -namespace HKCardManager -{ - partial class Hairpin - { - /// - /// 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.radioButton1 = new System.Windows.Forms.RadioButton(); - this.radioButton2 = new System.Windows.Forms.RadioButton(); - this.label1 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.textBox3 = new System.Windows.Forms.TextBox(); - this.textBox4 = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.label6 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // radioButton1 - // - this.radioButton1.AutoSize = true; - this.radioButton1.Location = new System.Drawing.Point(35, 29); - this.radioButton1.Name = "radioButton1"; - this.radioButton1.Size = new System.Drawing.Size(146, 21); - this.radioButton1.TabIndex = 0; - this.radioButton1.TabStop = true; - this.radioButton1.Text = "直接录入人员进行发卡"; - this.radioButton1.UseVisualStyleBackColor = true; - // - // radioButton2 - // - this.radioButton2.AutoSize = true; - this.radioButton2.Location = new System.Drawing.Point(242, 29); - this.radioButton2.Name = "radioButton2"; - this.radioButton2.Size = new System.Drawing.Size(134, 21); - this.radioButton2.TabIndex = 1; - this.radioButton2.TabStop = true; - this.radioButton2.Text = "人员已录入进行发卡"; - this.radioButton2.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(35, 83); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(68, 17); - this.label1.TabIndex = 2; - this.label1.Text = "机构名称:"; - // - // comboBox1 - // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(99, 80); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(121, 25); - this.comboBox1.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(35, 136); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(44, 17); - this.label2.TabIndex = 4; - this.label2.Text = "姓名:"; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(306, 133); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(121, 23); - this.textBox1.TabIndex = 6; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(242, 139); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(44, 17); - this.label3.TabIndex = 7; - this.label3.Text = "性别:"; - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(99, 136); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(121, 23); - this.textBox2.TabIndex = 8; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(35, 190); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(44, 17); - this.label4.TabIndex = 9; - this.label4.Text = "备注:"; - // - // textBox3 - // - this.textBox3.Location = new System.Drawing.Point(99, 190); - this.textBox3.Multiline = true; - this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(328, 107); - this.textBox3.TabIndex = 10; - // - // textBox4 - // - this.textBox4.Location = new System.Drawing.Point(306, 80); - this.textBox4.Name = "textBox4"; - this.textBox4.Size = new System.Drawing.Size(121, 23); - this.textBox4.TabIndex = 12; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(242, 80); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(68, 17); - this.label5.TabIndex = 11; - this.label5.Text = "证件号码:"; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(47, 327); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(88, 34); - this.button1.TabIndex = 13; - this.button1.Text = "卡验证"; - this.button1.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.Location = new System.Drawing.Point(179, 327); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(88, 34); - this.button2.TabIndex = 14; - this.button2.Text = "写卡"; - this.button2.UseVisualStyleBackColor = true; - // - // button3 - // - this.button3.Location = new System.Drawing.Point(306, 327); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(88, 34); - this.button3.TabIndex = 15; - this.button3.Text = "退出"; - this.button3.UseVisualStyleBackColor = true; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label6.Location = new System.Drawing.Point(0, 369); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(32, 17); - this.label6.TabIndex = 16; - this.label6.Text = "信息"; - // - // Hairpin - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(448, 386); - this.Controls.Add(this.label6); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.textBox4); - this.Controls.Add(this.label5); - this.Controls.Add(this.textBox3); - this.Controls.Add(this.label4); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.label3); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.label2); - this.Controls.Add(this.comboBox1); - this.Controls.Add(this.label1); - this.Controls.Add(this.radioButton2); - this.Controls.Add(this.radioButton1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "Hairpin"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "发卡"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private RadioButton radioButton1; - private RadioButton radioButton2; - private Label label1; - private ComboBox comboBox1; - private Label label2; - private TextBox textBox1; - private Label label3; - private TextBox textBox2; - private Label label4; - private TextBox textBox3; - private TextBox textBox4; - private Label label5; - private Button button1; - private Button button2; - private Button button3; - private Label label6; - } -} \ No newline at end of file diff --git a/HKCardManager/Hairpin.cs b/HKCardManager/Hairpin.cs deleted file mode 100644 index c1dfd5a..0000000 --- a/HKCardManager/Hairpin.cs +++ /dev/null @@ -1,20 +0,0 @@ -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 HKCardManager -{ - public partial class Hairpin : Form - { - public Hairpin() - { - InitializeComponent(); - } - } -} diff --git a/HKCardManager/Hairpin.resx b/HKCardManager/Hairpin.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/Hairpin.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/InstitutionalEntry.Designer.cs b/HKCardManager/InstitutionalEntry.Designer.cs deleted file mode 100644 index 7ad315b..0000000 --- a/HKCardManager/InstitutionalEntry.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ -namespace HKCardManager -{ - partial class InstitutionalEntry - { - /// - /// 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.label1 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label1.Location = new System.Drawing.Point(23, 43); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(122, 21); - this.label1.TabIndex = 0; - this.label1.Text = "输入机构名称:"; - // - // textBox1 - // - this.textBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox1.Location = new System.Drawing.Point(133, 40); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(209, 28); - this.textBox1.TabIndex = 1; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(59, 102); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(92, 40); - this.button1.TabIndex = 2; - this.button1.Text = "取消"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(197, 102); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(92, 40); - this.button2.TabIndex = 3; - this.button2.Text = "确认"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label2.Location = new System.Drawing.Point(0, 152); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(32, 17); - this.label2.TabIndex = 4; - this.label2.Text = "信息"; - // - // InstitutionalEntry - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(354, 169); - this.Controls.Add(this.label2); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "InstitutionalEntry"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "机构录入"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Label label1; - private TextBox textBox1; - private Button button1; - private Button button2; - private Label label2; - } -} \ No newline at end of file diff --git a/HKCardManager/InstitutionalEntry.cs b/HKCardManager/InstitutionalEntry.cs deleted file mode 100644 index 61ba6c5..0000000 --- a/HKCardManager/InstitutionalEntry.cs +++ /dev/null @@ -1,54 +0,0 @@ -using BPA.Helper; -using HKLib.Logic; -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 HKCardManager -{ - public partial class InstitutionalEntry : Form - { - public InstitutionalEntry() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void button2_Click(object sender, EventArgs e) - { - string name = textBox1.Text.Trim(); - if (string.IsNullOrEmpty(name)) - { - label2.Text = "机构名不能为空"; - return; - } - Task.Factory.StartNew(() => - { - if (ServiceHandler.GetOrgList().FirstOrDefault(p => p.Name == name) != null) - { - this.Invoke(() => { label2.Text = "机构已存在"; }); - return; - } - if (ServiceHandler.AddOrg(textBox1.Text.Trim())) - { - this.Invoke(() => { this.Close(); }); - } - else - { - this.Invoke(() => { label2.Text = "添加失败,请重试"; }); - } - }); - - } - } -} diff --git a/HKCardManager/InstitutionalEntry.resx b/HKCardManager/InstitutionalEntry.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/InstitutionalEntry.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/MealSegmentSet.Designer.cs b/HKCardManager/MealSegmentSet.Designer.cs deleted file mode 100644 index 720b5fa..0000000 --- a/HKCardManager/MealSegmentSet.Designer.cs +++ /dev/null @@ -1,284 +0,0 @@ -namespace HKCardManager -{ - partial class MealSegmentSet - { - /// - /// 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.groupBox1 = new System.Windows.Forms.GroupBox(); - this.dateTimePicker4 = new System.Windows.Forms.DateTimePicker(); - this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.dateTimePicker5 = new System.Windows.Forms.DateTimePicker(); - this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.dateTimePicker6 = new System.Windows.Forms.DateTimePicker(); - this.dateTimePicker3 = new System.Windows.Forms.DateTimePicker(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.label7 = new System.Windows.Forms.Label(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.dateTimePicker4); - this.groupBox1.Controls.Add(this.dateTimePicker1); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.groupBox1.Location = new System.Drawing.Point(21, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(499, 61); - this.groupBox1.TabIndex = 1; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "早上"; - // - // dateTimePicker4 - // - this.dateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker4.Location = new System.Drawing.Point(366, 22); - this.dateTimePicker4.Name = "dateTimePicker4"; - this.dateTimePicker4.ShowUpDown = true; - this.dateTimePicker4.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker4.TabIndex = 6; - // - // dateTimePicker1 - // - this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker1.Location = new System.Drawing.Point(133, 24); - this.dateTimePicker1.Name = "dateTimePicker1"; - this.dateTimePicker1.ShowUpDown = true; - this.dateTimePicker1.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker1.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(286, 27); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(74, 21); - this.label2.TabIndex = 2; - this.label2.Text = "结束时间"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(58, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(74, 21); - this.label1.TabIndex = 0; - this.label1.Text = "开始时间"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.dateTimePicker5); - this.groupBox2.Controls.Add(this.dateTimePicker2); - this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.groupBox2.Location = new System.Drawing.Point(21, 89); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(499, 61); - this.groupBox2.TabIndex = 4; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "中午"; - // - // dateTimePicker5 - // - this.dateTimePicker5.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker5.Location = new System.Drawing.Point(366, 24); - this.dateTimePicker5.Name = "dateTimePicker5"; - this.dateTimePicker5.ShowUpDown = true; - this.dateTimePicker5.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker5.TabIndex = 7; - // - // dateTimePicker2 - // - this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker2.Location = new System.Drawing.Point(133, 27); - this.dateTimePicker2.Name = "dateTimePicker2"; - this.dateTimePicker2.ShowUpDown = true; - this.dateTimePicker2.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker2.TabIndex = 4; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(286, 27); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(74, 21); - this.label3.TabIndex = 2; - this.label3.Text = "结束时间"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(58, 27); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(74, 21); - this.label4.TabIndex = 0; - this.label4.Text = "开始时间"; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.dateTimePicker6); - this.groupBox3.Controls.Add(this.dateTimePicker3); - this.groupBox3.Controls.Add(this.label5); - this.groupBox3.Controls.Add(this.label6); - this.groupBox3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.groupBox3.Location = new System.Drawing.Point(21, 169); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(499, 61); - this.groupBox3.TabIndex = 5; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "晚上"; - // - // dateTimePicker6 - // - this.dateTimePicker6.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker6.Location = new System.Drawing.Point(366, 24); - this.dateTimePicker6.Name = "dateTimePicker6"; - this.dateTimePicker6.ShowUpDown = true; - this.dateTimePicker6.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker6.TabIndex = 8; - // - // dateTimePicker3 - // - this.dateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Time; - this.dateTimePicker3.Location = new System.Drawing.Point(133, 27); - this.dateTimePicker3.Name = "dateTimePicker3"; - this.dateTimePicker3.ShowUpDown = true; - this.dateTimePicker3.Size = new System.Drawing.Size(124, 28); - this.dateTimePicker3.TabIndex = 5; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(286, 27); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(74, 21); - this.label5.TabIndex = 2; - this.label5.Text = "结束时间"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(58, 27); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(74, 21); - this.label6.TabIndex = 0; - this.label6.Text = "开始时间"; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.button1.Location = new System.Drawing.Point(387, 245); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(113, 35); - this.button1.TabIndex = 6; - this.button1.Text = "确认"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.button2.Location = new System.Drawing.Point(159, 245); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(113, 35); - this.button2.TabIndex = 7; - this.button2.Text = "取消"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label7.Location = new System.Drawing.Point(0, 301); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(42, 21); - this.label7.TabIndex = 8; - this.label7.Text = "信息"; - // - // MealSegmentSet - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(532, 322); - this.Controls.Add(this.label7); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.groupBox3); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "MealSegmentSet"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "餐段设置"; - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private GroupBox groupBox1; - private Label label2; - private Label label1; - private GroupBox groupBox2; - private Label label3; - private Label label4; - private GroupBox groupBox3; - private Label label5; - private Label label6; - private Button button1; - private Button button2; - private Label label7; - private DateTimePicker dateTimePicker4; - private DateTimePicker dateTimePicker1; - private DateTimePicker dateTimePicker5; - private DateTimePicker dateTimePicker2; - private DateTimePicker dateTimePicker6; - private DateTimePicker dateTimePicker3; - } -} \ No newline at end of file diff --git a/HKCardManager/MealSegmentSet.cs b/HKCardManager/MealSegmentSet.cs deleted file mode 100644 index da370b4..0000000 --- a/HKCardManager/MealSegmentSet.cs +++ /dev/null @@ -1,51 +0,0 @@ -using HKLib.Dto; -using HKLib.Interfaces; -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 HKCardManager -{ - public partial class MealSegmentSet : Form - { - public MealSegmentSet() - { - InitializeComponent(); - } - - private void button2_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void button1_Click(object sender, EventArgs e) - { - var data = new TimeSpilte() - { - AMStartTime = dateTimePicker1.Value, - AMEndTime = dateTimePicker4.Value, - PMStartTime = dateTimePicker2.Value, - PMEndTime = dateTimePicker5.Value, - ATStartTime = dateTimePicker3.Value, - ATEndTime = dateTimePicker6.Value - }; - Task.Factory.StartNew(() => - { - if (HKLibHelper.SetTime(data)) - { - this.Invoke(() => { this.Close(); }); - } - else - { - this.label7.Text = "设置时间段失败,请重试!"; - } - }); - } - } -} diff --git a/HKCardManager/MealSegmentSet.resx b/HKCardManager/MealSegmentSet.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/MealSegmentSet.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/PersonnelEntry.Designer.cs b/HKCardManager/PersonnelEntry.Designer.cs deleted file mode 100644 index 6b6b46b..0000000 --- a/HKCardManager/PersonnelEntry.Designer.cs +++ /dev/null @@ -1,203 +0,0 @@ -namespace HKCardManager -{ - partial class PersonnelEntry - { - /// - /// 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.label1 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.comboBox2 = new System.Windows.Forms.ComboBox(); - this.label3 = new System.Windows.Forms.Label(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.label5 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label1.Location = new System.Drawing.Point(23, 35); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(90, 21); - this.label1.TabIndex = 0; - this.label1.Text = "输入姓名:"; - this.label1.Click += new System.EventHandler(this.label1_Click); - // - // textBox1 - // - this.textBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox1.Location = new System.Drawing.Point(108, 35); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(213, 28); - this.textBox1.TabIndex = 1; - this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label2.Location = new System.Drawing.Point(23, 133); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(90, 21); - this.label2.TabIndex = 2; - this.label2.Text = "选择姓别:"; - this.label2.Click += new System.EventHandler(this.label2_Click); - // - // comboBox1 - // - this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "男", - "女"}); - this.comboBox1.Location = new System.Drawing.Point(108, 133); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(213, 29); - this.comboBox1.TabIndex = 4; - this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); - // - // comboBox2 - // - this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.comboBox2.FormattingEnabled = true; - this.comboBox2.Items.AddRange(new object[] { - "男", - "女"}); - this.comboBox2.Location = new System.Drawing.Point(108, 183); - this.comboBox2.Name = "comboBox2"; - this.comboBox2.Size = new System.Drawing.Size(213, 29); - this.comboBox2.TabIndex = 6; - this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label3.Location = new System.Drawing.Point(23, 183); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(90, 21); - this.label3.TabIndex = 5; - this.label3.Text = "选择机构:"; - this.label3.Click += new System.EventHandler(this.label3_Click); - // - // textBox2 - // - this.textBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox2.Location = new System.Drawing.Point(108, 84); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(213, 28); - this.textBox2.TabIndex = 8; - this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label4.Location = new System.Drawing.Point(7, 84); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(106, 21); - this.label4.TabIndex = 7; - this.label4.Text = "输入手机号:"; - this.label4.Click += new System.EventHandler(this.label4_Click); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(108, 239); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(95, 32); - this.button1.TabIndex = 9; - this.button1.Text = "取消"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(231, 239); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(90, 32); - this.button2.TabIndex = 10; - this.button2.Text = "确认"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label5.Location = new System.Drawing.Point(0, 292); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(32, 17); - this.label5.TabIndex = 11; - this.label5.Text = "信息"; - // - // PersonnelEntry - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(344, 309); - this.Controls.Add(this.label5); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.label4); - this.Controls.Add(this.comboBox2); - this.Controls.Add(this.label3); - this.Controls.Add(this.comboBox1); - this.Controls.Add(this.label2); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "PersonnelEntry"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "人员录入"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Label label1; - private TextBox textBox1; - private Label label2; - private ComboBox comboBox1; - private ComboBox comboBox2; - private Label label3; - private TextBox textBox2; - private Label label4; - private Button button1; - private Button button2; - private Label label5; - } -} \ No newline at end of file diff --git a/HKCardManager/PersonnelEntry.cs b/HKCardManager/PersonnelEntry.cs deleted file mode 100644 index 62938f5..0000000 --- a/HKCardManager/PersonnelEntry.cs +++ /dev/null @@ -1,97 +0,0 @@ -using HKLib.Dto; -using HKLib.Interfaces; -using HKLib.Logic; -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 HKCardManager -{ - public partial class PersonnelEntry : Form - { - List OrgList = new List(); - public PersonnelEntry() - { - InitializeComponent(); - comboBox1.SelectedIndex = 0; - ServiceHandler.GetOrgList()?.ForEach(item => - { - OrgList.Add(item.Name); - }); - comboBox2.DataSource = OrgList; - } - - private void button1_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void button2_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(textBox1.Text.Trim())) - { - label5.Text = "请输入姓名"; - return; - } - if (!textBox2.Text.Trim().IsMobile()) - { - label5.Text = "手机号格式不正确"; - return; - } - UserDto userDto = new UserDto() - { - Name = textBox1.Text.Trim(), - //Org = comboBox2.SelectedText, - Phone = textBox2.Text.Trim(), - }; - Task.Factory.StartNew(() => { HKLibHelper.AddUser(userDto); }); - - } - - private void textBox2_TextChanged(object sender, EventArgs e) - { - - } - - private void label4_Click(object sender, EventArgs e) - { - - } - - private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void label3_Click(object sender, EventArgs e) - { - - } - - private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void label2_Click(object sender, EventArgs e) - { - - } - - private void textBox1_TextChanged(object sender, EventArgs e) - { - - } - - private void label1_Click(object sender, EventArgs e) - { - - } - } -} diff --git a/HKCardManager/PersonnelEntry.resx b/HKCardManager/PersonnelEntry.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/PersonnelEntry.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/Query.Designer.cs b/HKCardManager/Query.Designer.cs deleted file mode 100644 index a1ba2ab..0000000 --- a/HKCardManager/Query.Designer.cs +++ /dev/null @@ -1,226 +0,0 @@ -namespace HKCardManager -{ - partial class Query - { - /// - /// 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.label1 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); - this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker(); - this.label4 = new System.Windows.Forms.Label(); - this.comboBox2 = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.panel1 = new System.Windows.Forms.Panel(); - this.label6 = new System.Windows.Forms.Label(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label1.Location = new System.Drawing.Point(12, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(90, 21); - this.label1.TabIndex = 0; - this.label1.Text = "选择机构:"; - // - // comboBox1 - // - this.comboBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(12, 36); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(200, 29); - this.comboBox1.TabIndex = 1; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label2.Location = new System.Drawing.Point(245, 12); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(58, 21); - this.label2.TabIndex = 2; - this.label2.Text = "姓名:"; - // - // textBox1 - // - this.textBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.textBox1.Location = new System.Drawing.Point(245, 37); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(203, 28); - this.textBox1.TabIndex = 3; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label3.Location = new System.Drawing.Point(10, 94); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(90, 21); - this.label3.TabIndex = 4; - this.label3.Text = "开始时间:"; - // - // dateTimePicker1 - // - this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.dateTimePicker1.Location = new System.Drawing.Point(12, 121); - this.dateTimePicker1.Name = "dateTimePicker1"; - this.dateTimePicker1.Size = new System.Drawing.Size(200, 28); - this.dateTimePicker1.TabIndex = 5; - // - // dateTimePicker2 - // - this.dateTimePicker2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.dateTimePicker2.Location = new System.Drawing.Point(245, 121); - this.dateTimePicker2.Name = "dateTimePicker2"; - this.dateTimePicker2.Size = new System.Drawing.Size(200, 28); - this.dateTimePicker2.TabIndex = 7; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label4.Location = new System.Drawing.Point(243, 94); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(90, 21); - this.label4.TabIndex = 6; - this.label4.Text = "结束时间:"; - // - // comboBox2 - // - this.comboBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.comboBox2.FormattingEnabled = true; - this.comboBox2.Location = new System.Drawing.Point(12, 193); - this.comboBox2.Name = "comboBox2"; - this.comboBox2.Size = new System.Drawing.Size(200, 29); - this.comboBox2.TabIndex = 9; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label5.Location = new System.Drawing.Point(12, 169); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(90, 21); - this.label5.TabIndex = 8; - this.label5.Text = "选择窗口:"; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.button1.Location = new System.Drawing.Point(247, 249); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(88, 38); - this.button1.TabIndex = 10; - this.button1.Text = "查询"; - this.button1.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.button2.Location = new System.Drawing.Point(359, 248); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(88, 38); - this.button2.TabIndex = 11; - this.button2.Text = "退出"; - this.button2.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.dateTimePicker2); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.comboBox1); - this.panel1.Controls.Add(this.comboBox2); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.label5); - this.panel1.Controls.Add(this.textBox1); - this.panel1.Controls.Add(this.label3); - this.panel1.Controls.Add(this.label4); - this.panel1.Controls.Add(this.dateTimePicker1); - this.panel1.Location = new System.Drawing.Point(9, 9); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(454, 234); - this.panel1.TabIndex = 12; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label6.Location = new System.Drawing.Point(0, 307); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(55, 21); - this.label6.TabIndex = 13; - this.label6.Text = "label6"; - // - // Query - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(476, 328); - this.Controls.Add(this.label6); - this.Controls.Add(this.panel1); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "Query"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "查询条件输入"; - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Label label1; - private ComboBox comboBox1; - private Label label2; - private TextBox textBox1; - private Label label3; - private DateTimePicker dateTimePicker1; - private DateTimePicker dateTimePicker2; - private Label label4; - private ComboBox comboBox2; - private Label label5; - private Button button1; - private Button button2; - private Panel panel1; - private Label label6; - } -} \ No newline at end of file diff --git a/HKCardManager/Query.cs b/HKCardManager/Query.cs deleted file mode 100644 index c2b852e..0000000 --- a/HKCardManager/Query.cs +++ /dev/null @@ -1,20 +0,0 @@ -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 HKCardManager -{ - public partial class Query : Form - { - public Query() - { - InitializeComponent(); - } - } -} diff --git a/HKCardManager/Query.resx b/HKCardManager/Query.resx deleted file mode 100644 index f298a7b..0000000 --- a/HKCardManager/Query.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/HKCardManager/UserPages/AdvertisingSetPage.Designer.cs b/HKCardManager/UserPages/AdvertisingSetPage.Designer.cs index 903b226..9ad0506 100644 --- a/HKCardManager/UserPages/AdvertisingSetPage.Designer.cs +++ b/HKCardManager/UserPages/AdvertisingSetPage.Designer.cs @@ -41,7 +41,8 @@ this.webView21.Location = new System.Drawing.Point(0, 0); this.webView21.Name = "webView21"; this.webView21.Size = new System.Drawing.Size(490, 322); - this.webView21.Source = new System.Uri("http:\\\\www.baidu.com", System.UriKind.Absolute); + this.webView21.Source = new System.Uri(" https://witt.black-pa.com/gateAdmin?storeId=0c32b2e2-0dc9-4941-b73d-3dc91f7268ab" + + "", System.UriKind.Absolute); this.webView21.TabIndex = 0; this.webView21.ZoomFactor = 1D; // diff --git a/HKCardManager/UserPages/CancellationPage.cs b/HKCardManager/UserPages/CancellationPage.cs index 125fafe..a5a4b0e 100644 --- a/HKCardManager/UserPages/CancellationPage.cs +++ b/HKCardManager/UserPages/CancellationPage.cs @@ -29,6 +29,7 @@ namespace HKCardManager.UserPages private void button2_Click(object sender, EventArgs e) { + string name = textBox1.Text.Trim(); if (string.IsNullOrEmpty(name)) { @@ -48,6 +49,7 @@ namespace HKCardManager.UserPages else if (TagName == "解挂") status = 1; Task.Factory.StartNew(() => { + this.Invoke(() => { button2.Enabled = false; }); var res = HKLibHelper.CardStutasChange(new CardStutasDto() { keywrod = name, @@ -55,6 +57,7 @@ namespace HKCardManager.UserPages }); if (res) MessageLogNotify.GetInstance.Show($"用户 {TagName} 成功"); else MessageLogNotify.GetInstance.ShowError($"用户 {TagName} 失败,请重试"); + this.Invoke(() => { button2.Enabled = true; }); }); } } diff --git a/HKCardManager/UserPages/CarMangerPage.cs b/HKCardManager/UserPages/CarMangerPage.cs index 84ae3bf..8f18cb8 100644 --- a/HKCardManager/UserPages/CarMangerPage.cs +++ b/HKCardManager/UserPages/CarMangerPage.cs @@ -173,6 +173,7 @@ namespace HKCardManager.UserPages }; Task.Factory.StartNew(() => { + this.Invoke(() => { button2.Enabled = false; }); //写卡 var res = UHFCardHelper.GetInstance().WriteCard(userDto.CardNo); if (res != null && res.Res) @@ -190,6 +191,7 @@ namespace HKCardManager.UserPages } else MessageLogNotify.GetInstance.ShowError($"用户 【{userDto.Name}】 添加失败,请重试!"); + this.Invoke(() => { button2.Enabled = true; }); }); } else @@ -205,6 +207,7 @@ namespace HKCardManager.UserPages { Task.Factory.StartNew(() => { + this.Invoke(() => { button1.Enabled = false; }); var res = UHFCardHelper.GetInstance().ReadCard(); if (Regex.IsMatch(res, "\\d{19}")) { @@ -227,6 +230,7 @@ namespace HKCardManager.UserPages { MessageLogNotify.GetInstance.Show("读卡成功,该卡是新卡"); } + this.Invoke(() => { button1.Enabled = true; }); }); } else diff --git a/HKCardManager/UserPages/InstitutionalEntryPage.cs b/HKCardManager/UserPages/InstitutionalEntryPage.cs index 7b97cfd..51ed60e 100644 --- a/HKCardManager/UserPages/InstitutionalEntryPage.cs +++ b/HKCardManager/UserPages/InstitutionalEntryPage.cs @@ -34,6 +34,7 @@ namespace HKCardManager.UserPages } Task.Factory.StartNew(() => { + this.Invoke(() => { button2.Enabled = false; }); if (ServiceHandler.AddOrg(name)) { Global.OrgList.Add(name); @@ -41,7 +42,7 @@ namespace HKCardManager.UserPages } else MessageLogNotify.GetInstance.ShowError($"【{name}】 机构添加失败,请重试"); - + this.Invoke(() => { button2.Enabled = true; }); }); } } diff --git a/HKCardManager/UserPages/MealSegmentSetPage.Designer.cs b/HKCardManager/UserPages/MealSegmentSetPage.Designer.cs index acfd682..77449c0 100644 --- a/HKCardManager/UserPages/MealSegmentSetPage.Designer.cs +++ b/HKCardManager/UserPages/MealSegmentSetPage.Designer.cs @@ -218,7 +218,7 @@ this.panel1.Controls.Add(this.groupBox1); this.panel1.Controls.Add(this.groupBox2); this.panel1.Controls.Add(this.groupBox3); - this.panel1.Location = new System.Drawing.Point(307, 242); + this.panel1.Location = new System.Drawing.Point(23, 13); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(526, 293); this.panel1.TabIndex = 13; @@ -229,7 +229,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.panel1); this.Name = "MealSegmentSetPage"; - this.Size = new System.Drawing.Size(1187, 836); + this.Size = new System.Drawing.Size(565, 337); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); this.groupBox2.ResumeLayout(false); diff --git a/HKCardManager/UserPages/MealSegmentSetPage.cs b/HKCardManager/UserPages/MealSegmentSetPage.cs index bda5380..81aa9c2 100644 --- a/HKCardManager/UserPages/MealSegmentSetPage.cs +++ b/HKCardManager/UserPages/MealSegmentSetPage.cs @@ -18,6 +18,23 @@ namespace HKCardManager.UserPages { InitializeComponent(); this.SizeChanged += MealSegmentSetPage_SizeChanged; + Task.Factory.StartNew(() => + { + var res = HKLibHelper.GetTime(); + if (res != null) + { + this.Invoke(() => + { + dateTimePicker1.Value = res.AMStartTime; + dateTimePicker4.Value = res.AMEndTime; + dateTimePicker2.Value = res.PMStartTime; + dateTimePicker5.Value = res.PMEndTime; + dateTimePicker3.Value = res.ATStartTime; + dateTimePicker6.Value = res.ATEndTime; + }); + } + else MessageLogNotify.GetInstance.ShowError("获取餐段时间失败!"); + }); } private void MealSegmentSetPage_SizeChanged(object? sender, EventArgs e) @@ -39,14 +56,25 @@ namespace HKCardManager.UserPages }; Task.Factory.StartNew(() => { + this.Invoke(() => { button1.Enabled = false; }); if (HKLibHelper.SetTime(data)) { + this.Invoke(() => + { + dateTimePicker1.Value = data.AMStartTime; + dateTimePicker4.Value = data.AMEndTime; + dateTimePicker2.Value = data.PMStartTime; + dateTimePicker5.Value = data.PMEndTime; + dateTimePicker3.Value = data.ATStartTime; + dateTimePicker6.Value = data.ATEndTime; + }); MessageLogNotify.GetInstance.Show("设置餐段时间成功"); } else { MessageLogNotify.GetInstance.ShowError("设置时间段失败,请重试!"); } + this.Invoke(() => { button1.Enabled = true; }); }); } } diff --git a/HKCardManager/UserPages/PersonnelEntryPage.cs b/HKCardManager/UserPages/PersonnelEntryPage.cs index d7a1be3..3b4746b 100644 --- a/HKCardManager/UserPages/PersonnelEntryPage.cs +++ b/HKCardManager/UserPages/PersonnelEntryPage.cs @@ -39,6 +39,7 @@ namespace HKCardManager.UserPages dataGridView1.AutoGenerateColumns = false; comboBox1.SelectedIndex = 0; orgTables = ServiceHandler.GetOrgList(); + Global.OrgList.Clear(); orgTables?.ForEach(item => { Global.OrgList.Add(item.Name); @@ -47,26 +48,27 @@ namespace HKCardManager.UserPages Task.Factory.StartNew(() => { var res = HKLibHelper.GetUserList(""); + Global.UserListDtos.Clear(); res?.ToList()?.ForEach(item => - { - string status = ""; - string cardNum = ""; - if (item.Cards != null && item.Cards.Count > 0) - { - cardNum = item.Cards.ElementAt(0).CardNum; - status = ((CarStatus)item.Cards.ElementAt(0).State).ToString(); - } - Global.UserListDtos.Add(new UserInfoModel() - { - UserName = item.Name, - Phone = item.Phone, - OrgName = item.OrgInfo?.Count > 0 ? item.OrgInfo.ElementAt(0).Name : "", - CardNum = cardNum, - State = status - }); - }); + { + string status = ""; + string cardNum = ""; + if (item.Cards != null && item.Cards.Count > 0) + { + cardNum = item.Cards.ElementAt(0).CardNum; + status = ((CarStatus)item.Cards.ElementAt(0).State).ToString(); + } + Global.UserListDtos.Add(new UserInfoModel() + { + UserName = item.Name, + Phone = item.Phone, + OrgName = item.OrgInfo?.Count > 0 ? item.OrgInfo.ElementAt(0).Name : "", + CardNum = cardNum, + State = status + }); + }); //TestData(); - this.Invoke(() => { dataGridView1.DataSource = Global.UserListDtos; }); + this.Invoke(() => { dataGridView1.DataSource = null; dataGridView1.DataSource = Global.UserListDtos; }); }); } @@ -117,6 +119,7 @@ namespace HKCardManager.UserPages string OrgName = comboBox2.Text; Task.Factory.StartNew(() => { + this.Invoke(() => { button2.Enabled = false; }); if (HKLibHelper.AddUser(userDto)) { Global.UserListDtos.Add(new UserInfoModel() @@ -134,6 +137,7 @@ namespace HKCardManager.UserPages } else MessageLogNotify.GetInstance.ShowError($"用户 【{userDto.Name}】 添加失败,请重试!"); + this.Invoke(() => { button2.Enabled = true; }); }); } diff --git a/HKCardManager/UserPages/ReportFormPage.Designer.cs b/HKCardManager/UserPages/ReportFormPage.Designer.cs index 085e7a5..251f928 100644 --- a/HKCardManager/UserPages/ReportFormPage.Designer.cs +++ b/HKCardManager/UserPages/ReportFormPage.Designer.cs @@ -167,6 +167,7 @@ this.手机.HeaderText = "手机"; this.手机.Name = "手机"; this.手机.ReadOnly = true; + this.手机.Visible = false; // // 时间 // diff --git a/HKCardManager/UserPages/ReportFormPage.cs b/HKCardManager/UserPages/ReportFormPage.cs index 99535de..48c89d5 100644 --- a/HKCardManager/UserPages/ReportFormPage.cs +++ b/HKCardManager/UserPages/ReportFormPage.cs @@ -19,6 +19,7 @@ namespace HKCardManager.UserPages { InitializeComponent(); dataGridView1.AutoGenerateColumns = false; + button2.Enabled = false; #region 禁止更改宽高 // 禁止用户改变DataGridView的所有列的列宽 //dataGridView1.AllowUserToResizeColumns = false; @@ -78,7 +79,8 @@ namespace HKCardManager.UserPages for (int j = 0; j < TableName.Columns.Count; j++) { if (j > 0) strData += "\t"; - strData += TableName.Rows[i].Cells[j].Value.ToString(); + if (TableName.Columns[j].Visible) + strData += TableName.Rows[i].Cells[j].Value.ToString(); } sw.WriteLine(strData); } @@ -110,13 +112,14 @@ namespace HKCardManager.UserPages else if (TagName == "记次就餐消费明细表") type = 3; Task.Factory.StartNew(() => { + this.Invoke(() => { button1.Enabled = false; }); var res = HKLibHelper.Report(new ReportDto() { StartTime = dateTimePicker1.Value, EndTime = dateTimePicker2.Value }, type); if (res != null) { if (res.Count > 0) { reportCountDtos = res; - this.Invoke(() => { dataGridView1.DataSource = reportCountDtos; }); + this.Invoke(() => { dataGridView1.DataSource = reportCountDtos; button2.Enabled = true; }); MessageLogNotify.GetInstance.Show("获取表数据成功"); } else if (res.Count <= 0) @@ -128,12 +131,15 @@ namespace HKCardManager.UserPages { MessageLogNotify.GetInstance.ShowError("查询失败,请输入正确的时间段"); } + this.Invoke(() => { button1.Enabled = false; }); }); } private void button2_Click(object sender, EventArgs e) { + this.Invoke(() => { button2.Enabled = false; }); ExportDataToExcel(dataGridView1, this.Tag.ToString()); + this.Invoke(() => { button2.Enabled = true; }); } } }