휴가신청화면에서 메세지가 날짜에 맞게 자동 변경되게함.
시작일자가 종료일자보다 클때에는 종료일자는 시작일자에 맞추게 함
This commit is contained in:
@@ -112,6 +112,7 @@ namespace FPJ0000.OtConfirm
|
||||
this.tbSD.Name = "tbSD";
|
||||
this.tbSD.Size = new System.Drawing.Size(381, 38);
|
||||
this.tbSD.TabIndex = 3;
|
||||
this.tbSD.ValueChanged += new System.EventHandler(this.tbSD_ValueChanged);
|
||||
//
|
||||
// tbED
|
||||
//
|
||||
@@ -434,7 +435,6 @@ namespace FPJ0000.OtConfirm
|
||||
// dSKuntae
|
||||
//
|
||||
this.dSKuntae.DataSetName = "DSKuntae";
|
||||
this.dSKuntae.Namespace = "http://tempuri.org/DSKuntae.xsd";
|
||||
this.dSKuntae.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
|
||||
//
|
||||
// rad2
|
||||
|
||||
@@ -541,6 +541,7 @@ namespace FPJ0000.OtConfirm
|
||||
Dictionary<string, string> holydata = new Dictionary<string, string>();
|
||||
|
||||
string updateuserinfo = string.Empty;
|
||||
string updateuserdate = string.Empty;
|
||||
private void cmbUser_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var uiddt = this.cmbUser.SelectedValue;
|
||||
@@ -550,11 +551,27 @@ namespace FPJ0000.OtConfirm
|
||||
if (uid == "System.Data.DataRowView") return;
|
||||
if (updateuserinfo.Equals(uid)) return;
|
||||
|
||||
var basedate = DateTime.Now.AddDays(-1).ToShortDateString();
|
||||
UpdateMessage();
|
||||
}
|
||||
void UpdateMessage()
|
||||
{
|
||||
var uiddt = this.cmbUser.SelectedValue;
|
||||
if (uiddt == null) return;
|
||||
var uid = uiddt.ToString();
|
||||
if (uid.isEmpty()) return;
|
||||
if (uid == "System.Data.DataRowView") return;
|
||||
|
||||
|
||||
var basedate = tbSD.Value.AddDays(-1).ToString("yyyy-MM-dd");
|
||||
|
||||
if (updateuserinfo.Equals(uid) && updateuserdate.Equals(basedate)) return;
|
||||
|
||||
|
||||
holydata = FCOMMON.DBM.GetUserHolidayJan(FCOMMON.info.Login.gcode, uid, basedate);
|
||||
|
||||
this.richTextBox1.Clear();
|
||||
if (holydata.Any()) richTextBox1.AppendText($"[기준:{basedate}] => ");
|
||||
richTextBox1.AppendText($"[기준:{basedate}] => ");
|
||||
if(holydata.Any()==false) richTextBox1.Text += "등록된 근태자료가 없습니다";
|
||||
foreach (var item in holydata)
|
||||
{
|
||||
var val = item.Value.Split('|');
|
||||
@@ -575,7 +592,12 @@ namespace FPJ0000.OtConfirm
|
||||
|
||||
}
|
||||
if (holydata.Any())
|
||||
{
|
||||
updateuserinfo = uid; //업데이트한 사용자 id 기록
|
||||
updateuserdate = basedate;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void radioButton1_CheckedChanged_1(object sender, EventArgs e)
|
||||
@@ -587,5 +609,15 @@ namespace FPJ0000.OtConfirm
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void tbSD_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateMessage();
|
||||
if(tbED.Value < tbSD.Value)
|
||||
{
|
||||
FCOMMON.Util.MsgE("종료일자를 시작일자로 변경합니다");
|
||||
tbED.Value = tbSD.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user