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