Browse Source

增加行事曆清除功能

master
nelson.kai 1 year ago
parent
commit
2cf380f413
  1. 26
      ManagementSystem/CleanHistory.Designer.cs
  2. 14
      ManagementSystem/CleanHistory.cs
  3. 24
      ManagementSystem/CleanHistory.resx

26
ManagementSystem/CleanHistory.Designer.cs

@ -50,6 +50,8 @@
this.lbAttendance = new System.Windows.Forms.Label();
this.lbAskLeave = new System.Windows.Forms.Label();
this.lbMeeting = new System.Windows.Forms.Label();
this.cbCalendar = new System.Windows.Forms.CheckBox();
this.lbCalendar = new System.Windows.Forms.Label();
this.tsButtons.SuspendLayout();
this.SuspendLayout();
//
@ -71,6 +73,7 @@
this.dpCleanBefor.Name = "dpCleanBefor";
this.dpCleanBefor.Size = new System.Drawing.Size(135, 29);
this.dpCleanBefor.TabIndex = 9;
this.dpCleanBefor.ValueChanged += new System.EventHandler(this.dpCleanBefor_ValueChanged);
//
// tsbSearch
//
@ -273,11 +276,32 @@
this.lbMeeting.TabIndex = 18;
this.lbMeeting.Text = "(0)";
//
// cbCalendar
//
this.cbCalendar.AutoSize = true;
this.cbCalendar.Location = new System.Drawing.Point(494, 349);
this.cbCalendar.Name = "cbCalendar";
this.cbCalendar.Size = new System.Drawing.Size(140, 24);
this.cbCalendar.TabIndex = 19;
this.cbCalendar.Text = "清除行事曆記錄";
this.cbCalendar.UseVisualStyleBackColor = true;
//
// lbCalendar
//
this.lbCalendar.AutoSize = true;
this.lbCalendar.Location = new System.Drawing.Point(654, 349);
this.lbCalendar.Name = "lbCalendar";
this.lbCalendar.Size = new System.Drawing.Size(28, 20);
this.lbCalendar.TabIndex = 20;
this.lbCalendar.Text = "(0)";
//
// CleanHistory
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1907, 762);
this.Controls.Add(this.lbCalendar);
this.Controls.Add(this.cbCalendar);
this.Controls.Add(this.lbMeeting);
this.Controls.Add(this.lbAskLeave);
this.Controls.Add(this.lbAttendance);
@ -324,5 +348,7 @@
private System.Windows.Forms.Label lbAttendance;
private System.Windows.Forms.Label lbAskLeave;
private System.Windows.Forms.Label lbMeeting;
private System.Windows.Forms.CheckBox cbCalendar;
private System.Windows.Forms.Label lbCalendar;
}
}

14
ManagementSystem/CleanHistory.cs

@ -201,6 +201,11 @@ namespace ManagementSystem
sbSQL.AppendLine("Delete OTB_PRJ_MeetingRecordDetail Where CreateDate < '" + dpCleanBefor.Text.ToString() + " 00:00:00';");
}
//行事曆記錄
if (cbCalendar.Checked)
{
sbSQL.AppendLine("Delete OTB_MNG_Calendar Where CreateDate < '" + dpCleanBefor.Text.ToString() + " 00:00:00';");
}
using (SqlDataAdapter sqlAdapter = new SqlDataAdapter())
{
@ -265,6 +270,9 @@ namespace ManagementSystem
//歷史會議記錄
lbMeeting.Text = "(" + UtilityClass.GetSQLCount("Select * From OTB_PRJ_MeetingRecord Where CreateDate < '" + dpCleanBefor.Text + " 00:00:00'") + ") 筆";
//行事曆
lbCalendar.Text = "(" + UtilityClass.GetSQLCount("Select * From OTB_MNG_Calendar Where CreateDate < '" + dpCleanBefor.Text + " 00:00:00'") + ") 筆";
}
#endregion
@ -407,8 +415,12 @@ namespace ManagementSystem
{
CleanForm();
}
#endregion
#endregion
private void dpCleanBefor_ValueChanged(object sender, EventArgs e)
{
GetCurrentData();
}
}
}

24
ManagementSystem/CleanHistory.resx

@ -142,12 +142,12 @@
<data name="tsbEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEzSURBVDhPrZI/TsMwFMaNmEAVQ2NXSHARYAEu0IkZxA2K
KgSldlj4L4Q4CQN3YIoYuAATI0sgQvETDs/muQrY7tRPenJif78vz47ZTLR8bARX+kRIOG1XlsNmd2RW
yJaWgxU0QdkgBc8ibzpkdermZokef0XGVACO9SPbaeYZa+aE1If4wRzHIeHpAC7hXKiqpPd7rDuu4Mox
Cs5WB2ZhaoA4+npH4MKuc6kfelKviXG9h2u32MXAwVbJgElVpYWtFw9223bmQK/pAbiFXK9bXyZhC+FL
B7WVDkBY6g3rIfjaAf8VC1gcfn5MYLwPnYOycuaYgoB+8e1b9bCdd+aYIh0UfFzv4x+48bAtsocKAkb6
LVPwIlRh2vNkD5U+xL9F9lA9CX2x+woxyBdu54nssxRjPw7uWlMD+w0FAAAAAElFTkSuQmCC
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE1SURBVDhPrZI/TsMwFMaNmEAVQ2NXSHARYAEOABMziBsU
VaiU2mbhvxDiJAzcgaWIgQswMbIEIhQ/4fBsXqqA7U79pCcn9vf78uyYTUWLR1ZwZY6FhJNmZRrW2wO7
RLa0PKygCsoFKXgWumqR1aut7QI9/oqMqQAcywe2U80yVs0IaQ7xgxrHHuHpAC7hTKgip/c7rFuu4NIz
Ck6Xu3ZuYoDof70jcO7WuTT3HWlWxLDcw7Ub7KLrYadkwLiK3MHOiwe76TrzYK3JAbgFbVadL5OwgfCF
h5pKByAszZrzEHzlgf+KBcz3Pj/GMN6H1kFeeHNMQcDW6LtutYbdvDfHFOngiQ/LffwD1zXsiuyhgoCB
ecsUvAg1ss15sodKH+LfInuojoRtsfsKMagu3M4j2acpxn4ACypaUNrt4XsAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -167,11 +167,11 @@
<data name="tsbSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD6SURBVDhPYxg8wGTGrYUm9cv+5Sw/8//MpSv/D588A8Zv
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD6SURBVDhPYxg8wGTGrYUm9Uv/5Sw/8//MpSv/D588A8Zv
PnyE48ylp/8bT7/dANWCCkCaTWbc/g8yYNPeff+nLl0GxugGgNRgNQQkAcKB04/8P3vt+v/N+/f/33Ps
OFzzq/cf/vtOPQxWA8JQbQgAk9DtPPbfD6gQZBsyBmnW7TpG2ABiMVQbAmBThA9DtSEATMJ94b3/xdse
/S/ejoqLgGJuQDmCBlx5+g4l5JHxpcfvCBsAUnj9zr3/5y5dRcHX794HyxFtACgxIWOQGF4DjKdcgxuA
D4PUGE25immATsveFbr1ff8W7T71Hx8GqdFo2rMEqm3AAQMDAGivrreL3iNFAAAAAElFTkSuQmCC
D4PUGE25immATsveFbr1vf8W7T71Hx8GqdFo2rMEqm3AAQMDAGCqrrOp8lCiAAAAAElFTkSuQmCC
</value>
</data>
<data name="tsbOK.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -206,15 +206,15 @@
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIwSURBVDhPYwCBbbkM7Msy2OYvz+AoBwuQChalsyccnBH2
f1G97b81hRLBUGHiwfQYVv3d9RqvDjdJ/N9ULb+rPpSBDSpFPFhbLF24L0X27/p8/u/T41msT63mN/z/
f2G97b81hRLBUGHiwfQYVv3d9RqvDjdJ/N9ULb+rPpSBDSpFPFhbLF24L1n27/p8/u/T41msT63mN/z/
n4ERKk0cWJotuGFDrcj/S5sd7j+9GHb+/HwGAagUYXB+PYPApU0i015etf/5+lz2/x0RZj8nCDKdh0oT
BsdWMggdXym4aXqM+L+j5tr/z+pq/VmTqPTuxgG1+VdWMfBAleEHjUwMWf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