This commit is contained in:
chi
2022-01-04 22:49:17 +09:00
parent 76bbb2f298
commit 8530c104f2
5 changed files with 139 additions and 34 deletions

View File

@@ -57,13 +57,14 @@ namespace FPJ0000.OtConfirm
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.grpAdmin = new System.Windows.Forms.GroupBox();
this.cmbPreset = new System.Windows.Forms.ComboBox();
this.rad2 = new System.Windows.Forms.RadioButton();
this.rad1 = new System.Windows.Forms.RadioButton();
this.rad0 = new System.Windows.Forms.RadioButton();
this.tbResponse = new System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.ta = new FPJ0000.DSKuntaeTableAdapters.EETGW_HolydayRequestTableAdapter();
this.cmbPreset = new System.Windows.Forms.ComboBox();
this.chkSendMail = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dSKuntae)).BeginInit();
this.grpUser.SuspendLayout();
@@ -135,6 +136,7 @@ namespace FPJ0000.OtConfirm
this.tbED.Name = "tbED";
this.tbED.Size = new System.Drawing.Size(358, 38);
this.tbED.TabIndex = 3;
this.tbED.ValueChanged += new System.EventHandler(this.tbED_ValueChanged);
//
// tbRemark
//
@@ -332,6 +334,7 @@ namespace FPJ0000.OtConfirm
//
// grpAdmin
//
this.grpAdmin.Controls.Add(this.chkSendMail);
this.grpAdmin.Controls.Add(this.cmbPreset);
this.grpAdmin.Controls.Add(this.rad2);
this.grpAdmin.Controls.Add(this.rad1);
@@ -344,6 +347,21 @@ namespace FPJ0000.OtConfirm
this.grpAdmin.TabStop = false;
this.grpAdmin.Text = "관리자";
//
// cmbPreset
//
this.cmbPreset.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.cmbPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPreset.FormattingEnabled = true;
this.cmbPreset.Items.AddRange(new object[] {
"연차",
"하기",
"대체"});
this.cmbPreset.Location = new System.Drawing.Point(26, 74);
this.cmbPreset.Name = "cmbPreset";
this.cmbPreset.Size = new System.Drawing.Size(744, 35);
this.cmbPreset.TabIndex = 6;
this.cmbPreset.SelectedIndexChanged += new System.EventHandler(this.cmbPreset_SelectedIndexChanged);
//
// rad2
//
this.rad2.AutoSize = true;
@@ -401,20 +419,15 @@ namespace FPJ0000.OtConfirm
//
this.ta.ClearBeforeFill = true;
//
// cmbPreset
// chkSendMail
//
this.cmbPreset.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.cmbPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPreset.FormattingEnabled = true;
this.cmbPreset.Items.AddRange(new object[] {
"연차",
"하기",
"대체"});
this.cmbPreset.Location = new System.Drawing.Point(26, 74);
this.cmbPreset.Name = "cmbPreset";
this.cmbPreset.Size = new System.Drawing.Size(744, 35);
this.cmbPreset.TabIndex = 6;
this.cmbPreset.SelectedIndexChanged += new System.EventHandler(this.cmbPreset_SelectedIndexChanged);
this.chkSendMail.AutoSize = true;
this.chkSendMail.Location = new System.Drawing.Point(631, 37);
this.chkSendMail.Name = "chkSendMail";
this.chkSendMail.Size = new System.Drawing.Size(139, 31);
this.chkSendMail.TabIndex = 7;
this.chkSendMail.Text = "메일전송";
this.chkSendMail.UseVisualStyleBackColor = true;
//
// fHolyRequestAdd
//
@@ -476,5 +489,6 @@ namespace FPJ0000.OtConfirm
private System.Windows.Forms.TextBox tbDays;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbPreset;
private System.Windows.Forms.CheckBox chkSendMail;
}
}

View File

@@ -149,6 +149,7 @@ namespace FPJ0000.OtConfirm
dr.Response = tbResponse.Text.Trim();
dr.sdate = tbSD.Value.ToShortDateString();
dr.edate = tbED.Value.ToShortDateString();
dr.sendmail = chkSendMail.Checked; //220104
dr.HolyDays = vDay;
dr.HolyTimes = vTime;//
@@ -172,5 +173,16 @@ namespace FPJ0000.OtConfirm
if (cmbPreset.SelectedIndex > 0)
tbResponse.Text = cmbPreset.Text;
}
private void tbED_ValueChanged(object sender, EventArgs e)
{
//해당 값이 오늘보다 이전이라면 메일전송을 자동 해제하낟.
var v = tbED.Value.ToShortDateString();
var c = DateTime.Now.ToShortDateString();
if (v.CompareTo(c) < 0)
chkSendMail.Checked = false;
else
chkSendMail.Checked = true;
}
}
}