This commit is contained in:
chi
2021-12-25 21:34:14 +09:00
parent 9ef9971c99
commit 5aa0cf84a0
7 changed files with 110 additions and 74 deletions

View File

@@ -140,7 +140,9 @@ namespace FPJ0000
e.Row["name"] = FCOMMON.info.Login.nameK;
e.Row["dept"] = FCOMMON.info.Login.dept;
e.Row["conf"] = 0;
e.Row["remark"] = "사유:\r\n행선지:\r\n업무백업:";
e.Row["remark"] = string.Empty;
e.Row["holydays"] = 0;
e.Row["holytimes"] = 0f;
}
@@ -238,7 +240,7 @@ namespace FPJ0000
var newdr = this.dSKuntae.EETGW_HolydayRequest.NewEETGW_HolydayRequestRow();
newdr.sdate = DateTime.Now.ToShortDateString();
newdr.edate = DateTime.Now.ToShortDateString();
newdr.HolyDays = 1;
newdr.HolyDays = 0;
newdr.HolyTimes = 0f;
newdr.cate = "연차";
var f = new OtConfirm.fHolyRequestAdd(newdr);

View File

@@ -63,6 +63,7 @@ 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.cmbPreset = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dSKuntae)).BeginInit();
this.grpUser.SuspendLayout();
@@ -331,13 +332,14 @@ namespace FPJ0000.OtConfirm
//
// grpAdmin
//
this.grpAdmin.Controls.Add(this.cmbPreset);
this.grpAdmin.Controls.Add(this.rad2);
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.Name = "grpAdmin";
this.grpAdmin.Size = new System.Drawing.Size(788, 228);
this.grpAdmin.Size = new System.Drawing.Size(788, 242);
this.grpAdmin.TabIndex = 1;
this.grpAdmin.TabStop = false;
this.grpAdmin.Text = "관리자";
@@ -379,15 +381,15 @@ namespace FPJ0000.OtConfirm
// tbResponse
//
this.tbResponse.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "Response", true));
this.tbResponse.Location = new System.Drawing.Point(26, 80);
this.tbResponse.Location = new System.Drawing.Point(26, 115);
this.tbResponse.Name = "tbResponse";
this.tbResponse.Size = new System.Drawing.Size(744, 125);
this.tbResponse.Size = new System.Drawing.Size(744, 113);
this.tbResponse.TabIndex = 3;
this.tbResponse.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 760);
this.button1.Location = new System.Drawing.Point(12, 768);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(788, 72);
this.button1.TabIndex = 2;
@@ -399,6 +401,21 @@ namespace FPJ0000.OtConfirm
//
this.ta.ClearBeforeFill = 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);
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);
//
// fHolyRequestAdd
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -458,5 +475,6 @@ namespace FPJ0000.OtConfirm
private System.Windows.Forms.TextBox tbTimes;
private System.Windows.Forms.TextBox tbDays;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbPreset;
}
}

View File

@@ -69,7 +69,7 @@ namespace FPJ0000.OtConfirm
private void fHolyRequestAdd_Load(object sender, EventArgs e)
{
curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.holyreq));
//관리자라면 관리자패널을 활성해준다.
if (dr.RowState == DataRowState.Detached)
@@ -79,9 +79,13 @@ namespace FPJ0000.OtConfirm
else
{
grpAdmin.Enabled = curLevel >= 5;
var = FCOMMON.DBM.getCodeList("54");
cmbPreset.Items.Clear();
cmbPreset.Items.Add(" -- 저장된 문구를 선택하세요(공용:54) --");
cmbPreset.Items.AddRange(.Select(t => t.Value).ToArray());
cmbPreset.SelectedIndex = 0;
}
}
private void button1_Click(object sender, EventArgs e)
@@ -101,7 +105,17 @@ namespace FPJ0000.OtConfirm
FCOMMON.Util.MsgE("시작일~종료일 범위를 확인하세요");
return;
}
var vDay = 0;
var vTime = 0f;
if (tbDays.Text.IsNumeric()) vDay = int.Parse(tbDays.Text.Trim());
if (tbTimes.Text.IsNumeric()) vTime = float.Parse(tbTimes.Text.Trim());
if (vDay < 1 && vTime < 0.1)
{
FCOMMON.Util.MsgE("사용 일/시간 값을 입력해주세요\n대체휴가에는 시간을 입력하세요");
return;
}
if (dr.RowState == DataRowState.Detached)
{
var dlg = FCOMMON.Util.MsgQ("입력을 완료하시겠습니까?\r\n관리자에게 메일로 알림이 발생 합니다");
@@ -118,17 +132,7 @@ namespace FPJ0000.OtConfirm
}
}
var vDay = 0;
var vTime = 0f;
if (tbDays.Text.IsNumeric()) vDay = int.Parse(tbDays.Text.Trim());
if (tbTimes.Text.IsNumeric()) vTime = float.Parse(tbTimes.Text.Trim());
if (vDay < 1 && vTime < 0.1)
{
FCOMMON.Util.MsgE("사용 일/시간 값을 입력해주세요");
return;
}
dr.HolyReason = tbReason.Text.Trim();
dr.HolyLocation = tbLocation.Text.Trim();
@@ -151,6 +155,15 @@ namespace FPJ0000.OtConfirm
DialogResult = DialogResult.OK;
}
private void button2_Click(object sender, EventArgs e)
{
}
private void cmbPreset_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbPreset.SelectedIndex > 0)
tbResponse.Text = cmbPreset.Text;
}
}
}