업무일지 프로젝트에 추가 팁을 표기 함, 문서 양식 J2 에 연결 됨

This commit is contained in:
chi
2021-08-03 09:40:43 +09:00
parent 956252e100
commit 62492b67b1
3 changed files with 112 additions and 88 deletions

View File

@@ -40,6 +40,7 @@
System.Windows.Forms.Label label6;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label7;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fJobReport_Add));
this.lbSummary = new System.Windows.Forms.Label();
this.tbHrs = new System.Windows.Forms.TextBox();
this.bs = new System.Windows.Forms.BindingSource(this.components);
@@ -64,9 +65,10 @@
this.tbProject = new System.Windows.Forms.ComboBox();
this.richTextBoxEx1 = new RichTextBoxEx.RichTextBoxEx();
this.panel1 = new System.Windows.Forms.Panel();
this.tbTag = new System.Windows.Forms.TextBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.tbTag = new System.Windows.Forms.TextBox();
this.lbTitleTip = new System.Windows.Forms.Label();
hrsLabel = new System.Windows.Forms.Label();
typeLabel = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
@@ -87,7 +89,7 @@
// hrsLabel
//
hrsLabel.AutoSize = true;
hrsLabel.Location = new System.Drawing.Point(15, 99);
hrsLabel.Location = new System.Drawing.Point(15, 125);
hrsLabel.Name = "hrsLabel";
hrsLabel.Size = new System.Drawing.Size(53, 12);
hrsLabel.TabIndex = 16;
@@ -96,7 +98,7 @@
// typeLabel
//
typeLabel.AutoSize = true;
typeLabel.Location = new System.Drawing.Point(374, 65);
typeLabel.Location = new System.Drawing.Point(374, 91);
typeLabel.Name = "typeLabel";
typeLabel.Size = new System.Drawing.Size(53, 12);
typeLabel.TabIndex = 13;
@@ -105,7 +107,7 @@
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(15, 65);
label1.Location = new System.Drawing.Point(15, 91);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(53, 12);
label1.TabIndex = 10;
@@ -154,7 +156,7 @@
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(188, 65);
label3.Location = new System.Drawing.Point(188, 91);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(41, 12);
label3.TabIndex = 10;
@@ -163,7 +165,7 @@
// label6
//
label6.AutoSize = true;
label6.Location = new System.Drawing.Point(582, 65);
label6.Location = new System.Drawing.Point(582, 91);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(53, 12);
label6.TabIndex = 13;
@@ -172,17 +174,27 @@
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(155, 99);
label2.Location = new System.Drawing.Point(155, 125);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(53, 12);
label2.TabIndex = 16;
label2.Text = "초과시간";
//
// label7
//
label7.AutoSize = true;
label7.Font = new System.Drawing.Font("맑은 고딕", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
label7.Location = new System.Drawing.Point(297, 117);
label7.Name = "label7";
label7.Size = new System.Drawing.Size(73, 13);
label7.TabIndex = 56;
label7.Text = "초과시간정보";
//
// lbSummary
//
this.lbSummary.AutoSize = true;
this.lbSummary.ForeColor = System.Drawing.Color.SlateGray;
this.lbSummary.Location = new System.Drawing.Point(70, 136);
this.lbSummary.Location = new System.Drawing.Point(70, 162);
this.lbSummary.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbSummary.Name = "lbSummary";
this.lbSummary.Size = new System.Drawing.Size(339, 12);
@@ -193,7 +205,7 @@
//
this.tbHrs.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "hrs", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "N2"));
this.tbHrs.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.tbHrs.Location = new System.Drawing.Point(72, 89);
this.tbHrs.Location = new System.Drawing.Point(72, 115);
this.tbHrs.Name = "tbHrs";
this.tbHrs.Size = new System.Drawing.Size(77, 39);
this.tbHrs.TabIndex = 17;
@@ -237,7 +249,7 @@
//
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.Location = new System.Drawing.Point(431, 61);
this.cmbType.Location = new System.Drawing.Point(431, 87);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(142, 20);
this.cmbType.TabIndex = 14;
@@ -293,7 +305,7 @@
this.tbOt.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "ot", true));
this.tbOt.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.tbOt.ForeColor = System.Drawing.Color.Red;
this.tbOt.Location = new System.Drawing.Point(213, 89);
this.tbOt.Location = new System.Drawing.Point(213, 115);
this.tbOt.Name = "tbOt";
this.tbOt.Size = new System.Drawing.Size(77, 39);
this.tbOt.TabIndex = 17;
@@ -316,7 +328,7 @@
//
this.cmbProcess.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbProcess.FormattingEnabled = true;
this.cmbProcess.Location = new System.Drawing.Point(641, 61);
this.cmbProcess.Location = new System.Drawing.Point(641, 87);
this.cmbProcess.Name = "cmbProcess";
this.cmbProcess.Size = new System.Drawing.Size(181, 20);
this.cmbProcess.TabIndex = 15;
@@ -336,7 +348,7 @@
//
this.cmbPackage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPackage.FormattingEnabled = true;
this.cmbPackage.Location = new System.Drawing.Point(235, 61);
this.cmbPackage.Location = new System.Drawing.Point(235, 87);
this.cmbPackage.Name = "cmbPackage";
this.cmbPackage.Size = new System.Drawing.Size(131, 20);
this.cmbPackage.TabIndex = 12;
@@ -345,7 +357,7 @@
//
this.cmbRequest.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbRequest.FormattingEnabled = true;
this.cmbRequest.Location = new System.Drawing.Point(73, 61);
this.cmbRequest.Location = new System.Drawing.Point(73, 87);
this.cmbRequest.Name = "cmbRequest";
this.cmbRequest.Size = new System.Drawing.Size(108, 20);
this.cmbRequest.TabIndex = 11;
@@ -378,7 +390,7 @@
// chkAutoAdd
//
this.chkAutoAdd.AutoSize = true;
this.chkAutoAdd.Location = new System.Drawing.Point(646, 94);
this.chkAutoAdd.Location = new System.Drawing.Point(646, 120);
this.chkAutoAdd.Name = "chkAutoAdd";
this.chkAutoAdd.Size = new System.Drawing.Size(176, 16);
this.chkAutoAdd.TabIndex = 54;
@@ -407,14 +419,12 @@
this.richTextBoxEx1.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
this.richTextBoxEx1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBoxEx1.FilePath = "";
this.richTextBoxEx1.Location = new System.Drawing.Point(0, 156);
this.richTextBoxEx1.Location = new System.Drawing.Point(0, 185);
this.richTextBoxEx1.Name = "richTextBoxEx1";
this.richTextBoxEx1.Rtf = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\r\n{\\" +
"*\\generator Riched20 10.0.19041}\\viewkind4\\uc1 \r\n\\pard\\fs20\\lang1042 richTextBox" +
"Ex1\\par\r\n}\r\n";
this.richTextBoxEx1.Rtf = resources.GetString("richTextBoxEx1.Rtf");
this.richTextBoxEx1.SetColorWithFont = true;
this.richTextBoxEx1.ShowToolStrip = true;
this.richTextBoxEx1.Size = new System.Drawing.Size(969, 498);
this.richTextBoxEx1.Size = new System.Drawing.Size(969, 469);
this.richTextBoxEx1.TabIndex = 58;
//
// panel1
@@ -432,6 +442,7 @@
this.panel1.Controls.Add(this.cmbType);
this.panel1.Controls.Add(label5);
this.panel1.Controls.Add(typeLabel);
this.panel1.Controls.Add(this.lbTitleTip);
this.panel1.Controls.Add(this.lbSummary);
this.panel1.Controls.Add(label6);
this.panel1.Controls.Add(this.cmbPackage);
@@ -451,9 +462,29 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(969, 156);
this.panel1.Size = new System.Drawing.Size(969, 185);
this.panel1.TabIndex = 59;
//
// dateTimePicker2
//
this.dateTimePicker2.CustomFormat = "yyyy-MM-dd hh:mm:ss";
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker2.Location = new System.Drawing.Point(455, 131);
this.dateTimePicker2.Margin = new System.Windows.Forms.Padding(4);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(153, 21);
this.dateTimePicker2.TabIndex = 57;
//
// dateTimePicker1
//
this.dateTimePicker1.CustomFormat = "yyyy-MM-dd hh:mm:ss";
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker1.Location = new System.Drawing.Point(297, 131);
this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(4);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(153, 21);
this.dateTimePicker1.TabIndex = 57;
//
// tbTag
//
this.tbTag.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -463,35 +494,16 @@
this.tbTag.TabIndex = 60;
this.tbTag.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label7
// lbTitleTip
//
label7.AutoSize = true;
label7.Font = new System.Drawing.Font("맑은 고딕", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
label7.Location = new System.Drawing.Point(297, 91);
label7.Name = "label7";
label7.Size = new System.Drawing.Size(73, 13);
label7.TabIndex = 56;
label7.Text = "초과시간정보";
//
// dateTimePicker1
//
this.dateTimePicker1.CustomFormat = "yyyy-MM-dd hh:mm:ss";
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker1.Location = new System.Drawing.Point(297, 105);
this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(4);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(153, 21);
this.dateTimePicker1.TabIndex = 57;
//
// dateTimePicker2
//
this.dateTimePicker2.CustomFormat = "yyyy-MM-dd hh:mm:ss";
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker2.Location = new System.Drawing.Point(455, 105);
this.dateTimePicker2.Margin = new System.Windows.Forms.Padding(4);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(153, 21);
this.dateTimePicker2.TabIndex = 57;
this.lbTitleTip.AutoSize = true;
this.lbTitleTip.ForeColor = System.Drawing.Color.SlateGray;
this.lbTitleTip.Location = new System.Drawing.Point(71, 62);
this.lbTitleTip.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTitleTip.Name = "lbTitleTip";
this.lbTitleTip.Size = new System.Drawing.Size(339, 12);
this.lbTitleTip.TabIndex = 53;
this.lbTitleTip.Text = "금월 근무시간 : {0:N1}h / {1:N0}h , 금월 초과시간 : {2:N1}h";
//
// fJobReport_Add
//
@@ -548,5 +560,6 @@
private System.Windows.Forms.TextBox tbTag;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.Label lbTitleTip;
}
}

View File

@@ -402,7 +402,7 @@ namespace FPJ0000.JobReport_
return;
}
if(ot == 0)
if (ot == 0)
{
dr.SetotNull();
dr.SetotStartNull();
@@ -487,42 +487,52 @@ namespace FPJ0000.JobReport_
//해당 데이터의 메일 양식을 검사해서 데이터를 적용해준다.
var formname = cmbType.Text.Trim() + "|" + cmbState.Text.Trim();
var db = new EEEntities();
var dr = db.EETGW_DocuForm.Where(t => t.cate == "J1" && t.title == formname).FirstOrDefault();
//프로젝트 제목 서포트
var dr0 = db.EETGW_DocuForm.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.cate == "J2" && t.title == formname).FirstOrDefault();
if(dr0 != null)
{
var rtx = new RichTextBox();
rtx.Rtf = dr0.body;
lbTitleTip.Text = rtx.Text;
rtx.Dispose();
}
else
{
lbTitleTip.Text = "프로젝트가 있다면 해당 프로젝트 명을 입력한 후 Enter 키를 눌러서 연결 해주세요";
}
var dr = db.EETGW_DocuForm.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.cate == "J1" && t.title == formname).FirstOrDefault();
if (dr != null)
{
//신규상태이다
//if (this.dr.RowState == DataRowState.Added || this.dr.RowState == DataRowState.Detached)
if (this.richTextBoxEx1.Text.isEmpty())
{
if (this.richTextBoxEx1.Text.isEmpty())
this.richTextBoxEx1.Rtf = dr.body;
}
else
{
//뭔가 자료가 있는가?
var header = string.Empty;
var rt = new RichTextBoxEx.RichTextBoxEx();
rt.Rtf = dr.body;
if (rt.Text.Length > 10) header = rt.Text.Substring(0, 10).Trim();
else header = rt.Text.Trim();
rt.Dispose();
if (this.richTextBoxEx1.Text.StartsWith(header) == false)
{
this.richTextBoxEx1.Rtf = dr.body;
}
else
{
//뭔가 자료가 있는가?
var header = string.Empty;
var rt = new RichTextBoxEx.RichTextBoxEx();
rt.Rtf = dr.body;
if (rt.Text.Length > 10) header = rt.Text.Substring(0, 10).Trim();
else header = rt.Text.Trim();
rt.Dispose();
if (this.richTextBoxEx1.Text.StartsWith(header) == false)
//if (FCOMMON.Util.MsgQ("등록된 작성 양식이 있습니다. 적용할까요?") == DialogResult.Yes)
{
//if (FCOMMON.Util.MsgQ("등록된 작성 양식이 있습니다. 적용할까요?") == DialogResult.Yes)
{
var oldtext = this.richTextBoxEx1.Text;
this.richTextBoxEx1.Rtf = dr.body;
if (this.richTextBoxEx1.Text.isEmpty() == false)
this.richTextBoxEx1.Text += "\r\n\r\n" + oldtext;
var oldtext = this.richTextBoxEx1.Text;
this.richTextBoxEx1.Rtf = dr.body;
if (this.richTextBoxEx1.Text.isEmpty() == false)
this.richTextBoxEx1.Text += "\r\n\r\n" + oldtext;
//this.richTextBoxEx1.Text += oldtext;
//this.richTextBoxEx1.Text += oldtext;
}
}
}
}

View File

@@ -147,8 +147,8 @@
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>100, 17</value>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>100, 17</value>
@@ -156,9 +156,6 @@
<metadata name="dsPRJ.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="dsPRJ.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>299, 17</value>
</metadata>
@@ -168,7 +165,11 @@
<metadata name="tam.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>226, 17</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="richTextBoxEx1.Rtf" xml:space="preserve">
<value>{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\froman\fcharset129 \'b8\'bc\'c0\'ba \'b0\'ed\'b5\'f1;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1
\pard\fs20\lang1042 3. \f1\'c7\'c1\'b7\'ce\'c1\'a7\'c6\'ae\f0\lang1033 \f1\'c1\'a6\'b8\'f1\'c0\'ba\f0 (\f1\'b0\'f8\'c0\'e5\'b6\'f3\'c0\'ce\f0 ,PKG\f1\'b0\'f8\'c1\'a4\f0 /\f1\'c0\'e5\'ba\'f1\'b8\'ed\f0 \f1\'c1\'a6\'c1\'b6\'bb\'e7\f0 /\f1\'b8\'f0\'b5\'a8\'b8\'ed\f0 \f1\'c0\'e5\'ba\'f1\'b9\'f8\'c8\'a3\f0 \f1\'c1\'f6\'bf\'f8\'b3\'bb\'bf\'eb\f0 ) \f1\'c7\'fc\'bd\'c4\'c0\'b8\'b7\'ce\f0 \f1\'c0\'db\'bc\'ba\'c7\'d8\f0 \f1\'c1\'d6\'bc\'bc\'bf\'e4\f0 .\lang1042\par
}
</value>
</data>
</root>