public ApiResult AddOvertime(AddOvertimeVM info)
        {
            List <Claim> Claims = new JwtSecurityTokenHandler().ReadJwtToken(Request.Headers["Authorization"].ToString().Replace("Bearer ", "")).Claims.ToList();
            var          data   = this._overtimeService.AddOvertime(info, Convert.ToInt32(Claims[1].Value));

            return(new ApiResult(data));
        }
Beispiel #2
0
 public int AddOvertime(AddOvertimeVM data, int userID)
 {
     try
     {
         using (var connection = new OracleConnection(_connectionString))
         {
             var result = connection.Execute(_overtimeSqlTemplate.AddOvertime, new { STARTTTIME = data.StarttTime, ENDTIME = data.EndTime, INPUTVALUE = data.InputValue, USERID = userID, STATUS = "未审核" });
             return(result);
         }
     }
     catch (Exception ex)
     {
         ex.ToString();
         throw;
     }
 }
Beispiel #3
0
        public int AddOvertime(AddOvertimeVM info, int userID)
        {
            int data = this._overtimeRepository.AddOvertime(info, userID);

            return(data);
        }