휴가신청화면에서 메세지가 날짜에 맞게 자동 변경되게함.

시작일자가 종료일자보다 클때에는 종료일자는 시작일자에 맞추게 함
This commit is contained in:
backuppc
2025-12-18 15:22:54 +09:00
parent 890e6edab4
commit ab46ccb924
3 changed files with 60 additions and 28 deletions

View File

@@ -112,6 +112,7 @@ namespace FPJ0000.OtConfirm
this.tbSD.Name = "tbSD"; this.tbSD.Name = "tbSD";
this.tbSD.Size = new System.Drawing.Size(381, 38); this.tbSD.Size = new System.Drawing.Size(381, 38);
this.tbSD.TabIndex = 3; this.tbSD.TabIndex = 3;
this.tbSD.ValueChanged += new System.EventHandler(this.tbSD_ValueChanged);
// //
// tbED // tbED
// //
@@ -434,7 +435,6 @@ namespace FPJ0000.OtConfirm
// dSKuntae // dSKuntae
// //
this.dSKuntae.DataSetName = "DSKuntae"; this.dSKuntae.DataSetName = "DSKuntae";
this.dSKuntae.Namespace = "http://tempuri.org/DSKuntae.xsd";
this.dSKuntae.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; this.dSKuntae.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
// //
// rad2 // rad2

View File

@@ -541,6 +541,7 @@ namespace FPJ0000.OtConfirm
Dictionary<string, string> holydata = new Dictionary<string, string>(); Dictionary<string, string> holydata = new Dictionary<string, string>();
string updateuserinfo = string.Empty; string updateuserinfo = string.Empty;
string updateuserdate = string.Empty;
private void cmbUser_SelectedIndexChanged(object sender, EventArgs e) private void cmbUser_SelectedIndexChanged(object sender, EventArgs e)
{ {
var uiddt = this.cmbUser.SelectedValue; var uiddt = this.cmbUser.SelectedValue;
@@ -550,11 +551,27 @@ namespace FPJ0000.OtConfirm
if (uid == "System.Data.DataRowView") return; if (uid == "System.Data.DataRowView") return;
if (updateuserinfo.Equals(uid)) 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); holydata = FCOMMON.DBM.GetUserHolidayJan(FCOMMON.info.Login.gcode, uid, basedate);
this.richTextBox1.Clear(); this.richTextBox1.Clear();
if (holydata.Any()) richTextBox1.AppendText($"[기준:{basedate}] => "); richTextBox1.AppendText($"[기준:{basedate}] => ");
if(holydata.Any()==false) richTextBox1.Text += "등록된 근태자료가 없습니다";
foreach (var item in holydata) foreach (var item in holydata)
{ {
var val = item.Value.Split('|'); var val = item.Value.Split('|');
@@ -575,7 +592,12 @@ namespace FPJ0000.OtConfirm
} }
if (holydata.Any()) if (holydata.Any())
{
updateuserinfo = uid; //업데이트한 사용자 id 기록 updateuserinfo = uid; //업데이트한 사용자 id 기록
updateuserdate = basedate;
}
} }
private void radioButton1_CheckedChanged_1(object sender, EventArgs e) 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;
}
}
} }
} }

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->