Esempio n. 1
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileUser subcontractProfileUser)
        {
            _logger.LogInformation($"Start UserController::Update", subcontractProfileUser);

            if (subcontractProfileUser == null)
            {
                _logger.LogWarning($"Start UserController::Update", subcontractProfileUser);
            }

            var result = _service.Update(subcontractProfileUser);

            if (result == null)
            {
                _logger.LogWarning($"UserController::", "Update NOT FOUND", subcontractProfileUser);
            }
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// Update
        /// </summary>
        public async Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileUser subcontractProfileUser)
        {
            var p = new DynamicParameters();

            p.Add("@user_id", subcontractProfileUser.UserId);
            p.Add("@username", subcontractProfileUser.Username);
            p.Add("@sub_module_name", subcontractProfileUser.SubModuleName);
            p.Add("@sso_first_name", subcontractProfileUser.SsoFirstName);
            p.Add("@sso_last_name", subcontractProfileUser.SsoLastName);
            p.Add("@staff_name", subcontractProfileUser.StaffName);
            p.Add("@staff_role", subcontractProfileUser.StaffRole);
            p.Add("@create_date", subcontractProfileUser.CreateDate);
            p.Add("@create_by", subcontractProfileUser.CreateBy);

            var ok = await _dbContext.Connection.ExecuteAsync
                         ("uspSubcontractProfileUser_Update", p, commandType : CommandType.StoredProcedure, transaction : _dbContext.Transaction);

            return(true);
        }