Пример #1
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileTeam subcontractProfileTeam)
        {
            _logger.LogInformation($"Start TeamController::Update", subcontractProfileTeam);

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

            var result = _service.Update(subcontractProfileTeam);

            if (result == null)
            {
                _logger.LogWarning($"TeamController::", "Update NOT FOUND", subcontractProfileTeam);
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Update
        /// </summary>
        public async Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileTeam subcontractProfileTeam)
        {
            var p = new DynamicParameters();

            p.Add("@team_id", subcontractProfileTeam.TeamId);
            p.Add("@team_code", subcontractProfileTeam.TeamCode);
            p.Add("@team_name", subcontractProfileTeam.TeamName);
            p.Add("@team_name_th", subcontractProfileTeam.TeamNameTh);
            p.Add("@team_name_en", subcontractProfileTeam.TeamNameEn);
            p.Add("@ship_to", subcontractProfileTeam.ShipTo);
            p.Add("@stage_local", subcontractProfileTeam.StageLocal);
            p.Add("@oos_storage_location", subcontractProfileTeam.OosStorageLocation);
            p.Add("@location_code", subcontractProfileTeam.LocationCode);
            p.Add("@vendor_code", subcontractProfileTeam.VendorCode);
            p.Add("@job_type", subcontractProfileTeam.JobType);
            p.Add("@subcontract_type", subcontractProfileTeam.SubcontractType);
            p.Add("@subcontract_sub_type", subcontractProfileTeam.SubcontractSubType);
            p.Add("@warranty_ma", subcontractProfileTeam.WarrantyMa);
            p.Add("@warranty_install", subcontractProfileTeam.WarrantyInstall);
            p.Add("@service_skill", subcontractProfileTeam.ServiceSkill);
            p.Add("@installations_contract_phone", subcontractProfileTeam.InstallationsContractPhone);
            p.Add("@maintenance_contract_phone", subcontractProfileTeam.MaintenanceContractPhone);
            p.Add("@etc_contract_phone", subcontractProfileTeam.EtcContractPhone);
            p.Add("@installations_contract_email", subcontractProfileTeam.InstallationsContractEmail);
            p.Add("@maintenance_contract_email", subcontractProfileTeam.MaintenanceContractEmail);
            p.Add("@etc_contract_email", subcontractProfileTeam.EtcContractEmail);
            p.Add("@status", subcontractProfileTeam.Status);
            p.Add("@create_date", subcontractProfileTeam.CreateDate);
            p.Add("@create_by", subcontractProfileTeam.CreateBy);
            p.Add("@update_by", subcontractProfileTeam.UpdateBy);
            p.Add("@update_date", subcontractProfileTeam.UpdateDate);

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

            return(true);
        }