diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index b80e5d6..7d48bc7 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("22.02.09.0950")] -[assembly: AssemblyFileVersion("22.02.09.0950")] +[assembly: AssemblyVersion("22.02.25.0150")] +[assembly: AssemblyFileVersion("22.02.25.0150")] diff --git a/SubProject/FBS0000/Holiday/WorkTable.cs b/SubProject/FBS0000/Holiday/WorkTable.cs index 9c7f357..4ca7570 100644 --- a/SubProject/FBS0000/Holiday/WorkTable.cs +++ b/SubProject/FBS0000/Holiday/WorkTable.cs @@ -19,7 +19,7 @@ namespace FBS0000 InitializeComponent(); var sd = DateTime.Now.ToString("yyyy-MM-01"); - var ed = DateTime.Parse(DateTime.Now.AddMonths(1).ToString("yyyy-MM-01")).AddDays(-1).ToShortDateString(); + var ed = DateTime.Parse(sd).AddMonths(1).AddDays(-1).ToShortDateString();// DateTime.Now.AddMonths(1).ToString("yyyy-MM-01")).AddDays(-1).ToShortDateString(); tbSD.Text = sd; tbED.Text = ed; @@ -78,7 +78,7 @@ namespace FBS0000 fpSpread1_Sheet1.Columns[c].Tag = coltag[c]; fpSpread1_Sheet1.Columns[c].Label = cols[c]; if (c < 4) fpSpread1_Sheet1.Columns[c].BackColor = Color.WhiteSmoke; - else if (c > cols.Count - 4) fpSpread1_Sheet1.Columns[c].BackColor = Color.WhiteSmoke; + else if (c > cols.Count - 5) fpSpread1_Sheet1.Columns[c].BackColor = Color.WhiteSmoke; else fpSpread1_Sheet1.Columns[c].BackColor = Color.White; } @@ -136,7 +136,7 @@ namespace FBS0000 //이월잔액 - var jand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, item.empno, sd.ToString("yyyy-01-01"), sd.ToShortDateString(), "999999"); + var jand = qta.WorkUserJan_Yesterday_Day(FCOMMON.info.Login.gcode, item.empno, sd.ToString("yyyy-01-01"), sd.AddDays(-1).ToShortDateString(), "999999"); var used = 0.0; fpSpread1_Sheet1.Rows[rowindex].ResetBorder(); @@ -150,10 +150,12 @@ namespace FBS0000 var bholy = false; //이날짜가 휴일인지 체크한다. var drHoly = HolyList.Where(t => t.pdate == curDate.ToShortDateString()).FirstOrDefault(); + if (drHoly != null && drHoly.free) { bholy = true; fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.LightPink; + fpSpread1_Sheet1.Cells[rowindex, c].Tag = drHoly.memo; if (drHoly.memo == "토요일" || drHoly.memo == "일요일") { fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty; @@ -165,13 +167,16 @@ namespace FBS0000 } else { - if (fpSpread1_Sheet1.Cells[rowindex, c].Tag == null) - { - fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty; - //fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.FromArgb(240, 240, 240); - } + //휴일은 아님 + + fpSpread1_Sheet1.Cells[rowindex, c].Tag = null; + fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty; } + //기본으로 데이터를 초기화해준다. + fpSpread1_Sheet1.Cells[rowindex, c].Value = string.Empty; + + //입사일이면 메세지 추가 if (item.indate == curDate.ToShortDateString()) fpSpread1_Sheet1.Cells[rowindex, c].Note += "입사"; @@ -179,103 +184,129 @@ namespace FBS0000 fpSpread1_Sheet1.Cells[rowindex, c].Note += "퇴사"; - - var dr = dtHoly.Where(t => t.uid == item.empno && t.sdate.ToShortDateString() == curDate.ToShortDateString()).FirstOrDefault(); - if (dr != null) + //근태기록에 자료가 있는지 확인한다. + var dr = dtHoly.Where(t => t.uid == item.empno && ( t.sdate.ToShortDateString().CompareTo(curDate.ToShortDateString()) <= 0 && t.edate.ToShortDateString().CompareTo(curDate.ToShortDateString()) >= 0)).FirstOrDefault(); + if (dr != null && fpSpread1_Sheet1.Cells[rowindex, c].Tag == null) //휴일이 아니여야 한다 { //휴가내역이 있다. if (dr.term > 0) - used += dr.term; + used += 1; //자료가있다. - if (string.IsNullOrEmpty(dr.tag) == false) fpSpread1_Sheet1.Cells[rowindex, c].Value = dr.tag; - else if (dr.term > 0) + if (string.IsNullOrEmpty(dr.tag) == false) { - - - var timedays = dr.term;// Math.Floor(dr.CrTime / 8f); - var curday = 0; - var accday = 1; - while (accday <= timedays) - { - //var remaintime = dr.CrTime - accday * 8f; - var columnindex = c + curday; - var columnDate = (DateTime)this.fpSpread1_Sheet1.Columns[columnindex].Tag; - - - var drHolyChk = HolyList.Where(t => t.pdate == columnDate.ToShortDateString()).FirstOrDefault(); - var drholyOK = false; - if (drHolyChk != null && drHolyChk.free) drholyOK = true; //이러면 휴일이었다 - - if (drholyOK == false) - { - fpSpread1_Sheet1.Cells[rowindex, c + curday].Value = dr.cate.Substring(0, 2); - - if (dr.cate == "이월") - fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Gold; - else if (dr.cate == "경조") - fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Pink; - else - fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Lime; - - fpSpread1_Sheet1.Cells[rowindex, c + curday].Tag = "1"; - accday += 1; - } - - curday += 1; - - } - - - - - //for (int ii = 0; ii < dr.term; ii++) - //{ - - // if (dr.cate == "이월") - // fpSpread1_Sheet1.Cells[rowindex, c + ii].BackColor = Color.Gold; - // else - // fpSpread1_Sheet1.Cells[rowindex, c + ii].BackColor = Color.Lime; - // fpSpread1_Sheet1.Cells[rowindex, c + ii].Value = dr.cate.Substring(0, 2); - // fpSpread1_Sheet1.Cells[rowindex, c + ii].Tag = "1"; - //} + fpSpread1_Sheet1.Cells[rowindex, c].Value = dr.tag; } - else if (dr.term != 0) + else { - fpSpread1_Sheet1.Cells[rowindex, c].Value = dr.term.ToString() + "Y"; - } + fpSpread1_Sheet1.Cells[rowindex, c].Value = dr.cate.Substring(0, 2); - if (dr.CrTime != 0) + if (dr.cate == "이월") + fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.Gold; + else if (dr.cate == "경조") + fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.Pink; + else + fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.Lime; + + fpSpread1_Sheet1.Cells[rowindex, c].Tag = "1"; + } + //else if (dr.term > 0) + //{ + + + // var timedays = dr.term;// Math.Floor(dr.CrTime / 8f); + // var curday = 0; + // var accday = 1; + // //while (accday <= timedays) + // { + // //var remaintime = dr.CrTime - accday * 8f; + // var columnindex = c + curday; + + // if (columnindex >= fpSpread1_Sheet1.ColumnCount) break; + + // var columnDate = (DateTime)this.fpSpread1_Sheet1.Columns[columnindex].Tag; + + + // var drHolyChk = HolyList.Where(t => t.pdate == columnDate.ToShortDateString()).FirstOrDefault(); + // var drholyOK = false; + // if (drHolyChk != null && drHolyChk.free) drholyOK = true; //이러면 휴일이었다 + + // if (drholyOK == false) + // { + // fpSpread1_Sheet1.Cells[rowindex, c + curday].Value = dr.cate.Substring(0, 2); + + // if (dr.cate == "이월") + // fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Gold; + // else if (dr.cate == "경조") + // fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Pink; + // else + // fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.Lime; + + // fpSpread1_Sheet1.Cells[rowindex, c + curday].Tag = "1"; + // accday += 1; + // } + + // curday += 1; + + // } + + + + + // //for (int ii = 0; ii < dr.term; ii++) + // //{ + + // // if (dr.cate == "이월") + // // fpSpread1_Sheet1.Cells[rowindex, c + ii].BackColor = Color.Gold; + // // else + // // fpSpread1_Sheet1.Cells[rowindex, c + ii].BackColor = Color.Lime; + // // fpSpread1_Sheet1.Cells[rowindex, c + ii].Value = dr.cate.Substring(0, 2); + // // fpSpread1_Sheet1.Cells[rowindex, c + ii].Tag = "1"; + // //} + //} + //else if (dr.term != 0) + //{ + // fpSpread1_Sheet1.Cells[rowindex, c].Value = dr.term.ToString() + "Y"; + //} + + //if (dr.CrTime != 0) + //{ + // var timedays = Math.Floor(dr.CrTime / 8f); + // var curday = 0; + // var accday = 1; + // while (accday <= timedays) + // { + // var remaintime = dr.CrTime - ((accday - 1) * 8f); + // var columnindex = c + curday; + // var columnDate = (DateTime)this.fpSpread1_Sheet1.Columns[columnindex].Tag; + + + // var drHolyChk = HolyList.Where(t => t.pdate == columnDate.ToShortDateString()).FirstOrDefault(); + // var drholyOK = false; + // if (drHolyChk != null && drHolyChk.free) drholyOK = true; //이러면 휴일이었다 + + // if (drholyOK == false) + // { + // if (remaintime > 8) remaintime = 8; + // fpSpread1_Sheet1.Cells[rowindex, c + curday].Value = remaintime.ToString(); + // fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.DeepSkyBlue; + // fpSpread1_Sheet1.Cells[rowindex, c + curday].Tag = "1"; + // accday += 1; + // } + + // curday += 1; + + // } + //} + + if (string.IsNullOrEmpty(dr.contents) == false) { - var timedays = Math.Floor(dr.CrTime / 8f); - var curday = 0; - var accday = 1; - while (accday <= timedays) - { - var remaintime = dr.CrTime - ((accday - 1) * 8f); - var columnindex = c + curday; - var columnDate = (DateTime)this.fpSpread1_Sheet1.Columns[columnindex].Tag; - - - var drHolyChk = HolyList.Where(t => t.pdate == columnDate.ToShortDateString()).FirstOrDefault(); - var drholyOK = false; - if (drHolyChk != null && drHolyChk.free) drholyOK = true; //이러면 휴일이었다 - - if (drholyOK == false) - { - if (remaintime > 8) remaintime = 8; - fpSpread1_Sheet1.Cells[rowindex, c + curday].Value = remaintime.ToString(); - fpSpread1_Sheet1.Cells[rowindex, c + curday].BackColor = Color.DeepSkyBlue; - fpSpread1_Sheet1.Cells[rowindex, c + curday].Tag = "1"; - accday += 1; - } - - curday += 1; - - } + fpSpread1_Sheet1.Cells[rowindex, c].Note += $"({dr.cate}){dr.contents} 기간:{dr.sdate.ToShortDateString()}~{dr.edate.ToShortDateString()}"; + } + else if (dr.sdate.ToShortDateString() != dr.edate.ToShortDateString()) + { + fpSpread1_Sheet1.Cells[rowindex, c].Note += $"({dr.cate}) 기간:{dr.sdate.ToShortDateString()}~{dr.edate.ToShortDateString()}"; } - - if (string.IsNullOrEmpty(dr.contents) == false) fpSpread1_Sheet1.Cells[rowindex, c].Note += $"({dr.cate}){dr.contents}"; //else fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty; } else @@ -335,13 +366,13 @@ namespace FBS0000 { fpSpread1_Sheet1.Cells[rowindex, c].Value = "--"; fpSpread1_Sheet1.Cells[rowindex, c].ForeColor = Color.Red; - } + } else { fpSpread1_Sheet1.Cells[rowindex, c].Value = string.Empty; fpSpread1_Sheet1.Cells[rowindex, c].ForeColor = Color.Black; } - + fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.White; //fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty; @@ -462,18 +493,18 @@ namespace FBS0000 private void toolStripButton4_Click(object sender, EventArgs e) { - var sd = DateTime.Parse(tbSD.Text); + var sd = DateTime.Parse(DateTime.Parse(tbSD.Text).ToString("yyyy-MM-01")); sd = sd.AddMonths(-1); - var ed = sd.AddMonths(1); + var ed = sd.AddMonths(1).AddDays(-1); tbSD.Text = sd.ToShortDateString(); tbED.Text = ed.ToShortDateString(); } private void toolStripButton5_Click(object sender, EventArgs e) { - var sd = DateTime.Parse(tbSD.Text); + var sd = DateTime.Parse(DateTime.Parse(tbSD.Text).ToString("yyyy-MM-01")); sd = sd.AddMonths(1); - var ed = sd.AddMonths(1); + var ed = sd.AddMonths(1).AddDays(-1); tbSD.Text = sd.ToShortDateString(); tbED.Text = ed.ToShortDateString(); } diff --git a/SubProject/FBS0000/Holiday/fImpKunTae.cs b/SubProject/FBS0000/Holiday/fImpKunTae.cs index 5353b09..fcd988b 100644 --- a/SubProject/FBS0000/Holiday/fImpKunTae.cs +++ b/SubProject/FBS0000/Holiday/fImpKunTae.cs @@ -98,7 +98,7 @@ namespace FBS0000.Holiday var ta = new dsMSSQLTableAdapters.HolydayTableAdapter(); foreach (ListViewItem item in items) { - ta.InsertShort(item.SubItems[2].Text, item.SubItems[0].Text, double.Parse(item.SubItems[4].Text), + ta.InsertShort(item.SubItems[2].Text, item.SubItems[0].Text, item.SubItems[0].Text, double.Parse(item.SubItems[4].Text), "PASTE", "PASTE", item.SubItems[1].Text, FCOMMON.info.Login.no, DateTime.Now, double.Parse(item.SubItems[3].Text), FCOMMON.info.Login.gcode, double.Parse(item.SubItems[5].Text), double.Parse(item.SubItems[6].Text), "CLIPBOARD"); diff --git a/SubProject/FBS0000/dsMSSQL.Designer.cs b/SubProject/FBS0000/dsMSSQL.Designer.cs index 4730ce2..cfb9bef 100644 --- a/SubProject/FBS0000/dsMSSQL.Designer.cs +++ b/SubProject/FBS0000/dsMSSQL.Designer.cs @@ -8276,7 +8276,12 @@ ORDER BY sdate, edate, uid"; this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "sdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = @"SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate, wuid FROM Holyday WHERE (gcode = @gcode) AND (sdate BETWEEN @sd AND @ed) ORDER BY sdate, edate, uid"; + this._commandCollection[1].CommandText = @"SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate, + wuid +FROM Holyday +WHERE (gcode = @gcode) AND (sdate BETWEEN @sd AND @ed) OR + (gcode = @gcode) AND (edate BETWEEN @sd AND @ed) +ORDER BY sdate, edate, uid"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "sdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -8298,12 +8303,13 @@ ORDER BY sdate, edate, uid"; this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; this._commandCollection[4].CommandText = @"INSERT INTO Holyday - (cate, sdate, term, title, contents, uid, wuid, wdate, termDr, gcode, DrTime, CrTime, tag) -VALUES (@cate,@sdate,@term,@title,@contents,@uid,@wuid,@wdate,@termDr,@gcode,@DrTime,@CrTime,@tag); + (cate, sdate, edate, term, title, contents, uid, wuid, wdate, termDr, gcode, DrTime, CrTime, tag) +VALUES (@cate,@sdate,@edate,@term,@title,@contents,@uid,@wuid,@wdate,@termDr,@gcode,@DrTime,@CrTime,@tag); SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail, mailsend, reason, wuid, wdate, termDr, gcode, DrTime, CrTime, dbo.getUserName(uid) AS UserName, tag FROM Holyday WHERE (idx = SCOPE_IDENTITY()) ORDER BY sdate, edate, uid"; this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sdate", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "sdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@edate", global::System.Data.SqlDbType.Date, 3, global::System.Data.ParameterDirection.Input, 0, 0, "edate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@term", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 0, 0, "term", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.NVarChar, 255, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@contents", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, "contents", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -9328,8 +9334,7 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, false)] - public virtual int InsertShort(string cate, string sdate, global::System.Nullable term, string title, string contents, string uid, string wuid, System.DateTime wdate, global::System.Nullable termDr, string gcode, global::System.Nullable DrTime, global::System.Nullable CrTime, string tag) { + public virtual int InsertShort(string cate, string sdate, string edate, global::System.Nullable term, string title, string contents, string uid, string wuid, System.DateTime wdate, global::System.Nullable termDr, string gcode, global::System.Nullable DrTime, global::System.Nullable CrTime, string tag) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((cate == null)) { command.Parameters[0].Value = global::System.DBNull.Value; @@ -9343,66 +9348,72 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail else { command.Parameters[1].Value = ((string)(sdate)); } - if ((term.HasValue == true)) { - command.Parameters[2].Value = ((double)(term.Value)); - } - else { + if ((edate == null)) { command.Parameters[2].Value = global::System.DBNull.Value; } - if ((title == null)) { - command.Parameters[3].Value = global::System.DBNull.Value; + else { + command.Parameters[2].Value = ((string)(edate)); + } + if ((term.HasValue == true)) { + command.Parameters[3].Value = ((double)(term.Value)); } else { - command.Parameters[3].Value = ((string)(title)); + command.Parameters[3].Value = global::System.DBNull.Value; } - if ((contents == null)) { + if ((title == null)) { command.Parameters[4].Value = global::System.DBNull.Value; } else { - command.Parameters[4].Value = ((string)(contents)); + command.Parameters[4].Value = ((string)(title)); } - if ((uid == null)) { + if ((contents == null)) { command.Parameters[5].Value = global::System.DBNull.Value; } else { - command.Parameters[5].Value = ((string)(uid)); + command.Parameters[5].Value = ((string)(contents)); + } + if ((uid == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(uid)); } if ((wuid == null)) { throw new global::System.ArgumentNullException("wuid"); } else { - command.Parameters[6].Value = ((string)(wuid)); + command.Parameters[7].Value = ((string)(wuid)); } - command.Parameters[7].Value = ((System.DateTime)(wdate)); + command.Parameters[8].Value = ((System.DateTime)(wdate)); if ((termDr.HasValue == true)) { - command.Parameters[8].Value = ((double)(termDr.Value)); + command.Parameters[9].Value = ((double)(termDr.Value)); } else { - command.Parameters[8].Value = global::System.DBNull.Value; + command.Parameters[9].Value = global::System.DBNull.Value; } if ((gcode == null)) { throw new global::System.ArgumentNullException("gcode"); } else { - command.Parameters[9].Value = ((string)(gcode)); + command.Parameters[10].Value = ((string)(gcode)); } if ((DrTime.HasValue == true)) { - command.Parameters[10].Value = ((double)(DrTime.Value)); - } - else { - command.Parameters[10].Value = global::System.DBNull.Value; - } - if ((CrTime.HasValue == true)) { - command.Parameters[11].Value = ((double)(CrTime.Value)); + command.Parameters[11].Value = ((double)(DrTime.Value)); } else { command.Parameters[11].Value = global::System.DBNull.Value; } - if ((tag == null)) { - command.Parameters[12].Value = global::System.DBNull.Value; + if ((CrTime.HasValue == true)) { + command.Parameters[12].Value = ((double)(CrTime.Value)); } else { - command.Parameters[12].Value = ((string)(tag)); + command.Parameters[12].Value = global::System.DBNull.Value; + } + if ((tag == null)) { + command.Parameters[13].Value = global::System.DBNull.Value; + } + else { + command.Parameters[13].Value = ((string)(tag)); } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/SubProject/FBS0000/dsMSSQL.xsd b/SubProject/FBS0000/dsMSSQL.xsd index 9e6a22b..b7c4031 100644 --- a/SubProject/FBS0000/dsMSSQL.xsd +++ b/SubProject/FBS0000/dsMSSQL.xsd @@ -417,7 +417,12 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail - SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate, wuid FROM Holyday WHERE (gcode = @gcode) AND (sdate BETWEEN @sd AND @ed) ORDER BY sdate, edate, uid + SELECT CrTime, DrTime, dbo.getUserName(uid) AS UserName, cate, contents, edate, extcate, extidx, gcode, idx, lock, mail, mailsend, reason, result, sdate, tag, term, termDr, title, tolist, uid, wdate, + wuid +FROM Holyday +WHERE (gcode = @gcode) AND (sdate BETWEEN @sd AND @ed) OR + (gcode = @gcode) AND (edate BETWEEN @sd AND @ed) +ORDER BY sdate, edate, uid @@ -474,6 +479,30 @@ SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail + + + INSERT INTO Holyday + (cate, sdate, edate, term, title, contents, uid, wuid, wdate, termDr, gcode, DrTime, CrTime, tag) +VALUES (@cate,@sdate,@edate,@term,@title,@contents,@uid,@wuid,@wdate,@termDr,@gcode,@DrTime,@CrTime,@tag); +SELECT idx, cate, result, sdate, edate, term, title, contents, uid, tolist, mail, mailsend, reason, wuid, wdate, termDr, gcode, DrTime, CrTime, dbo.getUserName(uid) AS UserName, tag FROM Holyday WHERE (idx = SCOPE_IDENTITY()) ORDER BY sdate, edate, uid + + + + + + + + + + + + + + + + + + @@ -846,7 +875,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -906,7 +935,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -958,7 +987,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -1048,19 +1077,19 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + - - + + - + @@ -1105,7 +1134,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -1118,7 +1147,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -1183,7 +1212,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + @@ -1321,7 +1350,7 @@ WHERE (gcode = @gcode) AND (uid = @uid) AND (CONVERT(CHAR(10), sdate, 23) >= - + diff --git a/SubProject/FBS0000/dsMSSQL.xss b/SubProject/FBS0000/dsMSSQL.xss index 1e295f3..2805dfc 100644 --- a/SubProject/FBS0000/dsMSSQL.xss +++ b/SubProject/FBS0000/dsMSSQL.xss @@ -8,10 +8,10 @@ - + - +