attandance #53
|
|
@ -381,7 +381,7 @@ namespace HRM.DA
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tc = TransactionContext.Begin(true);
|
tc = TransactionContext.Begin(true);
|
||||||
int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID");
|
// int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID");
|
||||||
if (attnRawDatas != null && attnRawDatas.Count > 0)
|
if (attnRawDatas != null && attnRawDatas.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (AttnRawData item in attnRawDatas)
|
foreach (AttnRawData item in attnRawDatas)
|
||||||
|
|
@ -394,7 +394,7 @@ namespace HRM.DA
|
||||||
AttnRawDataDA.Delete(tc, dMinValue, empIDs);
|
AttnRawDataDA.Delete(tc, dMinValue, empIDs);
|
||||||
DataTable _dtRawData = null;
|
DataTable _dtRawData = null;
|
||||||
_dtRawData = new DataTable("AttnRawData");
|
_dtRawData = new DataTable("AttnRawData");
|
||||||
_dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int));
|
// _dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int));
|
||||||
_dtRawData.Columns.Add("CARDID", typeof(int));
|
_dtRawData.Columns.Add("CARDID", typeof(int));
|
||||||
_dtRawData.Columns.Add("EMPLOYEEID", typeof(int));
|
_dtRawData.Columns.Add("EMPLOYEEID", typeof(int));
|
||||||
_dtRawData.Columns.Add("CARDNO", typeof(string));
|
_dtRawData.Columns.Add("CARDNO", typeof(string));
|
||||||
|
|
@ -406,15 +406,24 @@ namespace HRM.DA
|
||||||
|
|
||||||
foreach (AttnRawData item in attnRawDatas)
|
foreach (AttnRawData item in attnRawDatas)
|
||||||
{
|
{
|
||||||
_dtRawData.Rows.Add(nAttnRawDataID++,
|
//_dtRawData.Rows.Add(nAttnRawDataID++,
|
||||||
null,
|
// null,
|
||||||
item.EmployeeID,
|
// item.EmployeeID,
|
||||||
item.CardNo.Trim(),
|
// item.CardNo.Trim(),
|
||||||
item.PunchTime,
|
// item.PunchTime,
|
||||||
(int)item.EntryMode,
|
// (int)item.EntryMode,
|
||||||
item.DeviceIPAddress,
|
// item.DeviceIPAddress,
|
||||||
item.DeviceNo,
|
// item.DeviceNo,
|
||||||
item.PunchTime);
|
// item.PunchTime);
|
||||||
|
_dtRawData.Rows.Add(
|
||||||
|
null,
|
||||||
|
item.EmployeeID,
|
||||||
|
item.CardNo.Trim(),
|
||||||
|
item.PunchTime,
|
||||||
|
(int)item.EntryMode,
|
||||||
|
item.DeviceIPAddress,
|
||||||
|
item.DeviceNo,
|
||||||
|
item.PunchTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection)tc.Connection,
|
using (SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection)tc.Connection,
|
||||||
|
|
@ -423,7 +432,7 @@ namespace HRM.DA
|
||||||
bulkCopy.BulkCopyTimeout = 600; // in seconds
|
bulkCopy.BulkCopyTimeout = 600; // in seconds
|
||||||
bulkCopy.BatchSize = 5000;
|
bulkCopy.BatchSize = 5000;
|
||||||
|
|
||||||
bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID");
|
// bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID");
|
||||||
bulkCopy.ColumnMappings.Add("CARDID", "CARDID");
|
bulkCopy.ColumnMappings.Add("CARDID", "CARDID");
|
||||||
bulkCopy.ColumnMappings.Add("EMPLOYEEID", "EMPLOYEEID");
|
bulkCopy.ColumnMappings.Add("EMPLOYEEID", "EMPLOYEEID");
|
||||||
bulkCopy.ColumnMappings.Add("CARDNO", "CARDNO");
|
bulkCopy.ColumnMappings.Add("CARDNO", "CARDNO");
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ export class ReadAttendanceRawdataComponent {
|
||||||
public _attendanceServices: AttendanceServices,
|
public _attendanceServices: AttendanceServices,
|
||||||
public loadingService: loadingPanelService
|
public loadingService: loadingPanelService
|
||||||
) {
|
) {
|
||||||
|
debugger;
|
||||||
this._apiService.selectedMenuName = "Read Raw Data";
|
this._apiService.selectedMenuName = "Read Raw Data";
|
||||||
this.loadingService.ShowLoadingPanel = true;
|
this.loadingService.ShowLoadingPanel = true;
|
||||||
this._empService.getAllEmployees().subscribe(
|
this._empService.getAllEmployees().subscribe(
|
||||||
|
|
@ -114,6 +115,7 @@ export class ReadAttendanceRawdataComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
fileUpload(event) {
|
fileUpload(event) {
|
||||||
|
debugger;
|
||||||
this.loadingService.ShowLoadingPanel = true;
|
this.loadingService.ShowLoadingPanel = true;
|
||||||
this.file = undefined;
|
this.file = undefined;
|
||||||
this.attnRawDatas = [];
|
this.attnRawDatas = [];
|
||||||
|
|
@ -130,7 +132,7 @@ export class ReadAttendanceRawdataComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
performReading(reader: any) {
|
performReading(reader: any) {
|
||||||
|
debugger;
|
||||||
var text = undefined;
|
var text = undefined;
|
||||||
//this.attnRawDatas = [];
|
//this.attnRawDatas = [];
|
||||||
//this.mandatoryItems = [];
|
//this.mandatoryItems = [];
|
||||||
|
|
@ -188,6 +190,8 @@ export class ReadAttendanceRawdataComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
fileUploadChange(event) {
|
fileUploadChange(event) {
|
||||||
|
debugger;
|
||||||
|
|
||||||
this.loadingService.ShowLoadingPanel = true;
|
this.loadingService.ShowLoadingPanel = true;
|
||||||
this.file = undefined;
|
this.file = undefined;
|
||||||
this.attnRawDatas = [];
|
this.attnRawDatas = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user