public long?AddAttendanceLog(long employeeRecordId, AttendanceLogCreateRequestContract reqContract) { var row = new Dictionary <string, Datum>(); row.Add("6", new Datum() { Value = reqContract.LocationName }); row.Add("7", new Datum() { Value = reqContract.Latitude }); row.Add("8", new Datum() { Value = reqContract.Longitude }); //row.Add("9", new Datum() { Value = DateTime.UtcNow.ToString() }); row.Add("10", new Datum() { Value = reqContract.LogType }); row.Add("11", new Datum() { Value = employeeRecordId }); var postRequest = new PostRequestModel(_dbId); postRequest.FieldsToReturn = new List <long>() { 3, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; postRequest.Data.Add(row); var result = PostRequest <PostRequestModel, PostResponseModel>("/v1/records", postRequest); if (result.Data.Any()) { return((long)result.Data.First()["3"].Value); } return(null); }
public Task <AttendanceLogContract> Create(AttendanceLogCreateRequestContract reqContract, string accessToken) => PostAsync <AttendanceLogContract>(ServerEndpoint.AttendanceLogCreate, reqContract, null, accessToken);