This commit is contained in:
chi
2022-01-08 13:29:22 +09:00
parent fff64fa703
commit e2aa532654
47 changed files with 8448 additions and 2202 deletions

View File

@@ -544,9 +544,9 @@
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("맑은 고딕", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.HolyDays.DefaultCellStyle = dataGridViewCellStyle4;
this.HolyDays.HeaderText = "일";
this.HolyDays.HeaderText = "사용일";
this.HolyDays.Name = "HolyDays";
this.HolyDays.Width = 52;
this.HolyDays.Width = 76;
//
// HolyTimes
//

View File

@@ -32,7 +32,6 @@ namespace FPJ0000.OtConfirm
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.tbCate = new System.Windows.Forms.ComboBox();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.dSKuntae = new FPJ0000.DSKuntae();
@@ -57,6 +56,7 @@ 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.chkSendMail = new System.Windows.Forms.CheckBox();
this.cmbPreset = new System.Windows.Forms.ComboBox();
this.rad2 = new System.Windows.Forms.RadioButton();
this.rad1 = new System.Windows.Forms.RadioButton();
@@ -64,7 +64,8 @@ namespace FPJ0000.OtConfirm
this.tbResponse = new System.Windows.Forms.RichTextBox();
this.button1 = new System.Windows.Forms.Button();
this.ta = new FPJ0000.DSKuntaeTableAdapters.EETGW_HolydayRequestTableAdapter();
this.chkSendMail = new System.Windows.Forms.CheckBox();
this.radTime = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dSKuntae)).BeginInit();
this.grpUser.SuspendLayout();
@@ -89,26 +90,17 @@ namespace FPJ0000.OtConfirm
this.label2.TabIndex = 2;
this.label2.Text = "종료일";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(62, 136);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(66, 27);
this.label3.TabIndex = 4;
this.label3.Text = "구분";
//
// tbCate
//
this.tbCate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.tbCate.FormattingEnabled = true;
this.tbCate.Items.AddRange(new object[] {
"차",
"차",
"하기",
"대체"});
this.tbCate.Location = new System.Drawing.Point(140, 133);
this.tbCate.Name = "tbCate";
this.tbCate.Size = new System.Drawing.Size(358, 35);
this.tbCate.Size = new System.Drawing.Size(153, 35);
this.tbCate.TabIndex = 5;
//
// bs
@@ -141,6 +133,7 @@ namespace FPJ0000.OtConfirm
// tbRemark
//
this.tbRemark.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "Remark", true));
this.tbRemark.Font = new System.Drawing.Font("굴림", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.tbRemark.Location = new System.Drawing.Point(140, 297);
this.tbRemark.Name = "tbRemark";
this.tbRemark.Size = new System.Drawing.Size(358, 169);
@@ -149,6 +142,8 @@ namespace FPJ0000.OtConfirm
//
// grpUser
//
this.grpUser.Controls.Add(this.radioButton2);
this.grpUser.Controls.Add(this.radTime);
this.grpUser.Controls.Add(this.tbTimes);
this.grpUser.Controls.Add(this.tbDays);
this.grpUser.Controls.Add(this.label11);
@@ -170,7 +165,6 @@ namespace FPJ0000.OtConfirm
this.grpUser.Controls.Add(this.label2);
this.grpUser.Controls.Add(this.tbSD);
this.grpUser.Controls.Add(this.label4);
this.grpUser.Controls.Add(this.label3);
this.grpUser.Controls.Add(this.tbCate);
this.grpUser.Location = new System.Drawing.Point(12, 12);
this.grpUser.Name = "grpUser";
@@ -220,7 +214,7 @@ namespace FPJ0000.OtConfirm
this.tbBackup.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.tbBackup.FormattingEnabled = true;
this.tbBackup.Items.AddRange(new object[] {
"차",
"차",
"하기",
"대체"});
this.tbBackup.Location = new System.Drawing.Point(140, 256);
@@ -242,7 +236,7 @@ namespace FPJ0000.OtConfirm
this.tbLocation.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.tbLocation.FormattingEnabled = true;
this.tbLocation.Items.AddRange(new object[] {
"차",
"차",
"하기",
"대체"});
this.tbLocation.Location = new System.Drawing.Point(140, 215);
@@ -264,7 +258,7 @@ namespace FPJ0000.OtConfirm
this.tbReason.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true));
this.tbReason.FormattingEnabled = true;
this.tbReason.Items.AddRange(new object[] {
"차",
"차",
"하기",
"대체"});
this.tbReason.Location = new System.Drawing.Point(140, 174);
@@ -340,20 +334,30 @@ namespace FPJ0000.OtConfirm
this.grpAdmin.Controls.Add(this.rad1);
this.grpAdmin.Controls.Add(this.rad0);
this.grpAdmin.Controls.Add(this.tbResponse);
this.grpAdmin.Location = new System.Drawing.Point(12, 520);
this.grpAdmin.Location = new System.Drawing.Point(12, 503);
this.grpAdmin.Name = "grpAdmin";
this.grpAdmin.Size = new System.Drawing.Size(788, 242);
this.grpAdmin.Size = new System.Drawing.Size(788, 179);
this.grpAdmin.TabIndex = 1;
this.grpAdmin.TabStop = false;
this.grpAdmin.Text = "관리자";
//
// chkSendMail
//
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;
//
// 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);
@@ -401,15 +405,15 @@ namespace FPJ0000.OtConfirm
this.tbResponse.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "Response", true));
this.tbResponse.Location = new System.Drawing.Point(26, 115);
this.tbResponse.Name = "tbResponse";
this.tbResponse.Size = new System.Drawing.Size(744, 113);
this.tbResponse.Size = new System.Drawing.Size(744, 57);
this.tbResponse.TabIndex = 3;
this.tbResponse.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 768);
this.button1.Location = new System.Drawing.Point(12, 688);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(788, 72);
this.button1.Size = new System.Drawing.Size(788, 50);
this.button1.TabIndex = 2;
this.button1.Text = "확인";
this.button1.UseVisualStyleBackColor = true;
@@ -419,20 +423,35 @@ namespace FPJ0000.OtConfirm
//
this.ta.ClearBeforeFill = true;
//
// chkSendMail
// radTime
//
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;
this.radTime.AutoSize = true;
this.radTime.Location = new System.Drawing.Point(306, 134);
this.radTime.Name = "radTime";
this.radTime.Size = new System.Drawing.Size(192, 31);
this.radTime.TabIndex = 24;
this.radTime.TabStop = true;
this.radTime.Text = "대체시간사용";
this.radTime.UseVisualStyleBackColor = true;
this.radTime.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Checked = true;
this.radioButton2.Location = new System.Drawing.Point(50, 133);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(84, 31);
this.radioButton2.TabIndex = 25;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "일반";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// fHolyRequestAdd
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(812, 851);
this.ClientSize = new System.Drawing.Size(812, 746);
this.Controls.Add(this.button1);
this.Controls.Add(this.grpAdmin);
this.Controls.Add(this.grpUser);
@@ -457,7 +476,6 @@ namespace FPJ0000.OtConfirm
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox tbCate;
private System.Windows.Forms.DateTimePicker tbSD;
private System.Windows.Forms.DateTimePicker tbED;
@@ -490,5 +508,7 @@ namespace FPJ0000.OtConfirm
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbPreset;
private System.Windows.Forms.CheckBox chkSendMail;
private System.Windows.Forms.RadioButton radTime;
private System.Windows.Forms.RadioButton radioButton2;
}
}

View File

@@ -64,6 +64,21 @@ namespace FPJ0000.OtConfirm
tbDays.Text = dr.HolyDays.ToString(); //211224
tbTimes.Text = dr.HolyTimes.ToString();
if(dr.cate == "대체")
{
tbTimes.Enabled = true;
tbDays.Enabled = false;
tbCate.Enabled = false;
radTime.Checked = true;
}
else
{
tbCate.Enabled = true;
tbTimes.Enabled = false;
tbDays.Enabled = true;
radioButton2.Checked = true;
}
}
int curLevel = 0;
private void fHolyRequestAdd_Load(object sender, EventArgs e)
@@ -75,6 +90,7 @@ namespace FPJ0000.OtConfirm
if (dr.RowState == DataRowState.Detached)
{
grpAdmin.Enabled = false;
UpdateStatus();
}
else
{
@@ -91,11 +107,13 @@ namespace FPJ0000.OtConfirm
private void button1_Click(object sender, EventArgs e)
{
var cate = tbCate.Text.Trim();
if (radTime.Checked) cate = "대체";
var remark = tbRemark.Text.Trim();
var response = tbResponse.Text.Trim();
if (string.IsNullOrEmpty(cate))
{
FCOMMON.Util.MsgE("구분을 입력하세요 (연차/하기휴가/연장근무)");
FCOMMON.Util.MsgE("구분을 입력하세요");
tbCate.Focus();
return;
}
@@ -108,6 +126,9 @@ namespace FPJ0000.OtConfirm
var vDay = 0;
var vTime = 0f;
if (tbDays.Enabled == false) tbDays.Text = string.Empty;
if (tbTimes.Enabled == false) tbTimes.Text = string.Empty;
if (tbDays.Text.IsNumeric()) vDay = int.Parse(tbDays.Text.Trim());
if (tbTimes.Text.IsNumeric()) vTime = float.Parse(tbTimes.Text.Trim());
@@ -123,6 +144,16 @@ namespace FPJ0000.OtConfirm
FCOMMON.Util.MsgE("사용 일/시간 값을 입력해주세요\n대체휴가에는 시간을 입력하세요");
return;
}
//하나도 입력안했다면 경고한다
if(tbReason.Text.isEmpty() && tbLocation.Text.isEmpty() && tbBackup.Text.isEmpty() && tbRemark.Text.isEmpty())
{
FCOMMON.Util.MsgE("비고를 입력해주세요");
tbRemark.Focus();
return;
}
if (dr.RowState == DataRowState.Detached)
{
var dlg = FCOMMON.Util.MsgQ("입력을 완료하시겠습니까?\r\n관리자에게 메일로 알림이 발생 합니다");
@@ -144,7 +175,7 @@ namespace FPJ0000.OtConfirm
dr.HolyReason = tbReason.Text.Trim();
dr.HolyLocation = tbLocation.Text.Trim();
dr.HolyBackup = tbBackup.Text.Trim();
dr.cate = tbCate.Text.Trim();
dr.cate = cate;// tbCate.Text.Trim();
dr.Remark = tbRemark.Text.Trim();
dr.Response = tbResponse.Text.Trim();
dr.sdate = tbSD.Value.ToShortDateString();
@@ -175,14 +206,64 @@ namespace FPJ0000.OtConfirm
}
private void tbED_ValueChanged(object sender, EventArgs e)
{
UpdateStatus();
}
void UpdateStatus()
{
//해당 값이 오늘보다 이전이라면 메일전송을 자동 해제하낟.
var v = tbED.Value.ToShortDateString();
var s = tbSD.Value.ToShortDateString();
var c = DateTime.Now.ToShortDateString();
if (v.CompareTo(c) < 0)
chkSendMail.Checked = false;
else
chkSendMail.Checked = true;
//일수계산
var term = tbED.Value - tbSD.Value;
var days = term.Days + 1;
if (radTime.Checked == false)
{
//if(tbDays.Text.isEmpty() || tbDays.Text=="0")
{
tbDays.Text = (days).ToString();
}
}
else
{
//여기는 시간
//if (tbTimes.Text.isEmpty() || tbTimes.Text == "0")
{
tbTimes.Text = (days * 8).ToString();
}
}
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radTime.Checked)
{
tbCate.Enabled = false;
tbDays.Enabled = false;
tbTimes.Enabled = true;
tbDays.BackColor = Color.DimGray;
tbTimes.BackColor = Color.Gold;
}
else
{
tbCate.Enabled = true;
tbDays.Enabled = true;
tbTimes.Enabled = false;
tbTimes.BackColor = Color.DimGray;
tbDays.BackColor = Color.Gold;
}
UpdateStatus();
}
}
}