diff --git a/HRM.Report/Class/rptDigitalServiceBook.cs b/HRM.Report/Class/rptDigitalServiceBook.cs index 83bd4d2..019a5b3 100644 --- a/HRM.Report/Class/rptDigitalServiceBook.cs +++ b/HRM.Report/Class/rptDigitalServiceBook.cs @@ -1,11 +1,13 @@ -using System; +using HRM.BO; +using HRM.DA; +using System; using System.Collections.Generic; +using System.Data; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Data; -using HRM.BO; -using HRM.DA; +using static HRM.Report.PayrollDataSet.PayrollDataSet; namespace HRM.Report { @@ -19,6 +21,10 @@ namespace HRM.Report if (sEmpIDs != null) empID = Convert.ToInt32(sEmpIDs); + //string TargetFolder = @"Documents\EMPPHOTO\"; + //string currentDirectory = Directory.GetCurrentDirectory(); + string TargetFolder = System.IO.Path.Combine(System.Environment.CurrentDirectory + @"\Documents\EMPPHOTO\"); + #region Employee general info DataSet oEmp = new EmployeeService().GetEmpDigitalServiceBook(empID); @@ -75,6 +81,9 @@ namespace HRM.Report oDR["ROADNOTA"] = oDRow["ROADNOTA"]; oDR["WARDNOTA"] = oDRow["WARDNOTA"]; + oDR["PHOTO"] = System.IO.Path.Combine(TargetFolder + string.Format("Image-{0}.jpg", oDRow["EMPLOYEENO"])); + oDR["SIGNATURE"] = System.IO.Path.Combine(TargetFolder + string.Format("Signature-{0}.jpg", oDRow["EMPLOYEENO"])); + dTable.Rows.Add(oDR); //count++; diff --git a/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.Designer.cs b/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.Designer.cs index 542fac9..6fa7d05 100644 --- a/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.Designer.cs +++ b/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.Designer.cs @@ -479,6 +479,8 @@ namespace HRM.Report.PayrollDataSet { private global::System.Data.DataColumn columnWARDNOTA; + private global::System.Data.DataColumn columnSIGNATURE; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public EMPDigitalServiceBookDataTable() { @@ -746,6 +748,14 @@ namespace HRM.Report.PayrollDataSet { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn SIGNATUREColumn { + get { + return this.columnSIGNATURE; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -812,7 +822,8 @@ namespace HRM.Report.PayrollDataSet { string THANATA, string VILLAGETA, string ROADNOTA, - string WARDNOTA) { + string WARDNOTA, + string SIGNATURE) { EMPDigitalServiceBookRow rowEMPDigitalServiceBookRow = ((EMPDigitalServiceBookRow)(this.NewRow())); object[] columnValuesArray = new object[] { EMPLOYEEID, @@ -843,7 +854,8 @@ namespace HRM.Report.PayrollDataSet { THANATA, VILLAGETA, ROADNOTA, - WARDNOTA}; + WARDNOTA, + SIGNATURE}; rowEMPDigitalServiceBookRow.ItemArray = columnValuesArray; this.Rows.Add(rowEMPDigitalServiceBookRow); return rowEMPDigitalServiceBookRow; @@ -895,6 +907,7 @@ namespace HRM.Report.PayrollDataSet { this.columnVILLAGETA = base.Columns["VILLAGETA"]; this.columnROADNOTA = base.Columns["ROADNOTA"]; this.columnWARDNOTA = base.Columns["WARDNOTA"]; + this.columnSIGNATURE = base.Columns["SIGNATURE"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -958,6 +971,8 @@ namespace HRM.Report.PayrollDataSet { base.Columns.Add(this.columnROADNOTA); this.columnWARDNOTA = new global::System.Data.DataColumn("WARDNOTA", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnWARDNOTA); + this.columnSIGNATURE = new global::System.Data.DataColumn("SIGNATURE", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSIGNATURE); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -2687,6 +2702,22 @@ namespace HRM.Report.PayrollDataSet { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string SIGNATURE { + get { + try { + return ((string)(this[this.tableEMPDigitalServiceBook.SIGNATUREColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SIGNATURE\' in table \'EMPDigitalServiceBook\' is DBNull.", e); + } + } + set { + this[this.tableEMPDigitalServiceBook.SIGNATUREColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsEMPLOYEEIDNull() { @@ -3034,6 +3065,18 @@ namespace HRM.Report.PayrollDataSet { public void SetWARDNOTANull() { this[this.tableEMPDigitalServiceBook.WARDNOTAColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsSIGNATURENull() { + return this.IsNull(this.tableEMPDigitalServiceBook.SIGNATUREColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetSIGNATURENull() { + this[this.tableEMPDigitalServiceBook.SIGNATUREColumn] = global::System.Convert.DBNull; + } } /// diff --git a/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.xsd b/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.xsd index 2ba45f5..e40fd38 100644 --- a/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.xsd +++ b/HRM.Report/PayrollDataSet/DigitalServiceBookDataSet.xsd @@ -44,6 +44,7 @@ + diff --git a/HRM.Report/RDLC/DigitalServiceBook.rdlc b/HRM.Report/RDLC/DigitalServiceBook.rdlc index bcbbe7b..237ff0e 100644 --- a/HRM.Report/RDLC/DigitalServiceBook.rdlc +++ b/HRM.Report/RDLC/DigitalServiceBook.rdlc @@ -133,6 +133,10 @@ WARDNOTA System.String + + SIGNATURE + System.String + DigitalServiceBookDataSet @@ -905,7 +909,7 @@ Textbox21 - 8.88506in + 9.38506in 0.71685in 0.25in 0.8125in @@ -938,7 +942,7 @@ Textbox21 - 8.88506in + 9.38506in 4.7911in 0.25in 1.88541in @@ -4545,8 +4549,8 @@ - Database - =First(Fields!PHOTO.Value, "EMPDigitalServiceBook") + External + ="file:///" & First(Fields!PHOTO.Value, "EMPDigitalServiceBook") image/jpeg Fit 1.93056in @@ -4554,7 +4558,6 @@ 1.20833in 0.99361in 38 - =First(Fields!PHOTO.Value, "EMPDigitalServiceBook") @@ -5339,6 +5342,22 @@ 2pt + + External + ="file:///" & First(Fields!SIGNATURE.Value, "EMPDigitalServiceBook") + image/bmp + Fit + 8.78145in + 0.70849in + 0.49153in + 1.1646in + 62 + + + + 20.35496in