diff --git a/SubProject/FCOMMON/DataBaseManager.cs b/SubProject/FCOMMON/DataBaseManager.cs index 25c8153..a766fab 100644 --- a/SubProject/FCOMMON/DataBaseManager.cs +++ b/SubProject/FCOMMON/DataBaseManager.cs @@ -1108,10 +1108,11 @@ namespace FCOMMON retval.Columns.Add("Code"); retval.Columns.Add("Value"); retval.Columns.Add("SValue"); + retval.Columns.Add("FValue"); var cn = getCn(); cn.Open(); - var sql = "select isnull(code,''),isnull(memo ,''),isnull(svalue,'')" + + var sql = "select isnull(code,''),isnull(memo ,''),isnull(svalue,''),isnull(fvalue,'')" + " from common" + " where gcode='" + FCOMMON.info.Login.gcode + "' and grp = '" + GroupCode + "'" + " and isnull(code,'') <> ''" + @@ -1131,7 +1132,7 @@ namespace FCOMMON var rdr = cmd.ExecuteReader(); while (rdr.Read()) { - retval.Rows.Add(new string[] { rdr[0].ToString(), rdr[1].ToString(), rdr[2].ToString() }); + retval.Rows.Add(new string[] { rdr[0].ToString(), rdr[1].ToString(), rdr[2].ToString(), rdr[3].ToString() }); } rdr.Close(); cmd.Dispose(); diff --git a/SubProject/FPJ0000/JobReport_/fJobReport_Add.Designer.cs b/SubProject/FPJ0000/JobReport_/fJobReport_Add.Designer.cs index 8c322a4..609e01c 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReport_Add.Designer.cs +++ b/SubProject/FPJ0000/JobReport_/fJobReport_Add.Designer.cs @@ -44,6 +44,7 @@ System.Windows.Forms.Label label9; System.Windows.Forms.Label label10; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fJobReport_Add)); + System.Windows.Forms.Label label11; this.lbSummary = new System.Windows.Forms.Label(); this.tbHrs = new System.Windows.Forms.TextBox(); this.bs = new System.Windows.Forms.BindingSource(this.components); @@ -95,6 +96,7 @@ label8 = new System.Windows.Forms.Label(); label9 = new System.Windows.Forms.Label(); label10 = new System.Windows.Forms.Label(); + label11 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).BeginInit(); this.statusStrip1.SuspendLayout(); @@ -213,7 +215,7 @@ label8.Name = "label8"; label8.Size = new System.Drawing.Size(53, 12); label8.TabIndex = 9; - label8.Text = "기술레벨"; + label8.Text = "기술단가"; // // label9 // @@ -450,6 +452,7 @@ this.richTextBoxEx1.Dock = System.Windows.Forms.DockStyle.Fill; this.richTextBoxEx1.FilePath = ""; this.richTextBoxEx1.Location = new System.Drawing.Point(0, 205); + this.richTextBoxEx1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.richTextBoxEx1.Name = "richTextBoxEx1"; this.richTextBoxEx1.Rtf = resources.GetString("richTextBoxEx1.Rtf"); this.richTextBoxEx1.SetColorWithFont = true; @@ -520,6 +523,7 @@ // // grpkisul // + this.grpkisul.Controls.Add(label11); this.grpkisul.Controls.Add(label10); this.grpkisul.Controls.Add(this.cmb_kisuldiv); this.grpkisul.Controls.Add(this.textBox1); @@ -528,7 +532,7 @@ this.grpkisul.Controls.Add(label8); this.grpkisul.Location = new System.Drawing.Point(615, 87); this.grpkisul.Name = "grpkisul"; - this.grpkisul.Size = new System.Drawing.Size(207, 82); + this.grpkisul.Size = new System.Drawing.Size(207, 110); this.grpkisul.TabIndex = 29; this.grpkisul.TabStop = false; this.grpkisul.Text = "기술료"; @@ -544,6 +548,7 @@ // // textBox1 // + this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "kisulamt", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "N3")); this.textBox1.Font = new System.Drawing.Font("굴림", 9F); this.textBox1.Location = new System.Drawing.Point(77, 55); @@ -628,6 +633,16 @@ this.tam.SPMasterTableAdapter = null; this.tam.UpdateOrder = FPJ0000.dsPRJTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; // + // label11 + // + label11.AutoSize = true; + label11.ForeColor = System.Drawing.Color.DimGray; + label11.Location = new System.Drawing.Point(19, 82); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(147, 12); + label11.TabIndex = 25; + label11.Text = "* 비용은 자동 계산 됩니다"; + // // fJobReport_Add // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/SubProject/FPJ0000/JobReport_/fJobReport_Add.cs b/SubProject/FPJ0000/JobReport_/fJobReport_Add.cs index 858dd72..6dd00f4 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReport_Add.cs +++ b/SubProject/FPJ0000/JobReport_/fJobReport_Add.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.ComponentModel.DataAnnotations; using System.Data; using System.Drawing; using System.Linq; @@ -124,9 +125,18 @@ namespace FPJ0000.JobReport_ //기술레벨 var dt_kisullv = FCOMMON.DBM.getCodeTable("51"); - this.cmb_kisullv.DisplayMember = "Value"; - this.cmb_kisullv.ValueMember = "Value"; - this.cmb_kisullv.DataSource = dt_kisullv; + this.cmb_kisullv.Items.Clear(); + this.cmb_kisullv.Items.Add("0"); + foreach (DataRow dr in dt_kisullv.Rows) + { + var v = dr["fvalue"]; + if (v == null || string.IsNullOrWhiteSpace(v.ToString())) continue; + if (this.cmb_kisullv.Items.Contains(v.ToString()) == false) + this.cmb_kisullv.Items.Add(v.ToString()); + } + //this.cmb_kisullv.DisplayMember = "Value"; + //this.cmb_kisullv.ValueMember = "Value"; + //this.cmb_kisullv.DataSource = dt_kisullv; } //담당자목록 @@ -609,12 +619,19 @@ namespace FPJ0000.JobReport_ if (getKisulInput) { //기술금액을 계산해야함 - var price = FCOMMON.DBM.getCodeFvalue("51", cmb_kisullv.Text); - var amt = (dr.hrs + dr.ot) * price; - - this.dr.kisuldiv = cmb_kisuldiv.Text; - this.dr.kisullv = cmb_kisullv.Text; - this.dr.kisulamt =(Decimal)amt; // Decimal.Parse(textBox1.Text); + double amt = 0; + if (float.TryParse(cmb_kisullv.Text, out float price)) + { + //var price = FCOMMON.DBM.getCodeFvalue("51", cmb_kisullv.Text); + amt = (dr.hrs + dr.ot) * price; + this.dr.kisuldiv = cmb_kisuldiv.Text; + this.dr.kisullv = cmb_kisullv.Text; + this.dr.kisulamt = (Decimal)amt; // Decimal.Parse(textBox1.Text); + } + else + { + dr.kisulamt = 0; + } textBox1.Text = amt.ToString(); } diff --git a/SubProject/FPJ0000/JobReport_/fJobReport_Add.resx b/SubProject/FPJ0000/JobReport_/fJobReport_Add.resx index edf45f6..2c44efa 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReport_Add.resx +++ b/SubProject/FPJ0000/JobReport_/fJobReport_Add.resx @@ -162,6 +162,12 @@ 100, 17 + + 100, 17 + + + 17, 17 + 17, 17 @@ -178,10 +184,16 @@ 416, 17 + + False + 164, 17 226, 17 + + 416, 17 + \ No newline at end of file