Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TransferringLocationToAttribute
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Брызгалов Сергей Александрович
TransferringLocationToAttribute
Commits
860f860c
Commit
860f860c
authored
Apr 19, 2023
by
Брызгалов Сергей Александрович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
ef09e6d4
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
212 additions
and
0 deletions
+212
-0
24b9dd45-af60-4d01-9792-3a1b050c1706.vsidx
...leContentIndex/24b9dd45-af60-4d01-9792-3a1b050c1706.vsidx
+0
-0
47f9a3a1-4ed9-4c55-8cbe-e07753dfab9c.vsidx
...leContentIndex/47f9a3a1-4ed9-4c55-8cbe-e07753dfab9c.vsidx
+0
-0
c1f8bdb6-addc-4029-a2a9-1efac2f2229b.vsidx
...leContentIndex/c1f8bdb6-addc-4029-a2a9-1efac2f2229b.vsidx
+0
-0
read.lock
...ransferringLocationToAttribute/FileContentIndex/read.lock
+0
-0
.suo
.vs/TransferringLocationToAttribute/v17/.suo
+0
-0
TransferringLocationToAttribute.sln
TransferringLocationToAttribute.sln
+25
-0
AssemblyInfo.cs
TransferringLocationToAttribute/Properties/AssemblyInfo.cs
+36
-0
TransferringLocationToAttributeCustomAction.cs
...ibute/RDnL/TransferringLocationToAttributeCustomAction.cs
+65
-0
TransferringLocationToAttribute.csproj
...ocationToAttribute/TransferringLocationToAttribute.csproj
+86
-0
EntityFramework.dll
...sferringLocationToAttribute/bin/Debug/EntityFramework.dll
+0
-0
No file name available
+0
-0
No files found.
.vs/TransferringLocationToAttribute/FileContentIndex/24b9dd45-af60-4d01-9792-3a1b050c1706.vsidx
0 → 100644
View file @
860f860c
File added
.vs/TransferringLocationToAttribute/FileContentIndex/47f9a3a1-4ed9-4c55-8cbe-e07753dfab9c.vsidx
0 → 100644
View file @
860f860c
File added
.vs/TransferringLocationToAttribute/FileContentIndex/c1f8bdb6-addc-4029-a2a9-1efac2f2229b.vsidx
0 → 100644
View file @
860f860c
File added
.vs/TransferringLocationToAttribute/FileContentIndex/read.lock
0 → 100644
View file @
860f860c
.vs/TransferringLocationToAttribute/v17/.suo
0 → 100644
View file @
860f860c
File added
TransferringLocationToAttribute.sln
0 → 100644
View file @
860f860c
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33513.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferringLocationToAttribute", "TransferringLocationToAttribute\TransferringLocationToAttribute.csproj", "{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9D8C5641-96A1-48B0-93AF-4B8361B86A8A}
EndGlobalSection
EndGlobal
TransferringLocationToAttribute/Properties/AssemblyInfo.cs
0 → 100644
View file @
860f860c
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TransferringLocationToAttribute")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TransferringLocationToAttribute")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4e9005d6-0b4e-45ae-b391-2f6dfa1b0916")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
TransferringLocationToAttribute/RDnL/TransferringLocationToAttributeCustomAction.cs
0 → 100644
View file @
860f860c
using
RnD.API
;
using
RnD.Attributes
;
using
RnD.Model
;
using
System.Linq
;
namespace
TransferringLocationToAttribute
{
[
CustomFunction
(
"TransferringLocationToAttributeCustomAction"
,
RnD
.
Common
.
Enums
.
CustomFunctionType
.
CustomAction
)]
public
class
TransferringLocationToAttributeCustomAction
:
AdvancedCustomFunction
,
ICustomAction
<
ICustomContext
>
{
#
region
Constructors
public
TransferringLocationToAttributeCustomAction
(
IAPI
aAPI
)
:
base
(
aAPI
)
{
}
#
endregion
#
region
Methods
public
void
Execute
(
ICustomContext
aContext
)
{
var
entity
=
aContext
.
Entity
;
if
(
entity
is
null
)
{
Log
.
Error
(
"entity was null"
);
return
;
}
if
(!(
entity
is
ISample
sample
))
{
Log
.
Error
(
"Entity is not sample"
);
return
;
}
var
locationId
=
DatabaseContext
.
RndvScLo
.
FirstOrDefault
(
c
=>
c
.
SC
==
sample
.
ID
).
LO
;
var
locationName
=
DatabaseContext
.
RndvLoLang
.
FirstOrDefault
(
c
=>
c
.
LO
==
locationId
).
DESCRIPTION
;
var
locationAttribute
=
DatabaseContext
.
RndvAu
.
Where
(
c
=>
c
.
AU
==
53
).
OrderByDescending
(
c
=>
c
.
VERSION
).
FirstOrDefault
();
// 53 - Id required attribute
if
(
locationAttribute
==
null
)
{
Log
.
Error
(
"Location attribute not found"
);
return
;
}
var
foundedScAu
=
DatabaseContext
.
RndvScAu
.
FirstOrDefault
(
c
=>
c
.
AU
==
locationAttribute
.
AU
&&
c
.
SC
==
sample
.
ID
);
if
(
foundedScAu
==
null
)
{
DatabaseContext
.
RndvScAu
.
Add
(
new
RnD
.
Model
.
EF
.
RndvScAu
{
SC
=
(
decimal
)
sample
.
ID
,
AU
=
locationAttribute
.
AU
,
AU_VERSION
=
locationAttribute
.
VERSION
,
AUSEQ
=
locationAttribute
.
TR_SEQ
,
VALUE
=
locationName
});
}
else
{
foundedScAu
.
VALUE
=
locationName
;
}
DatabaseContext
.
SaveChanges
();
}
#
endregion
}
}
TransferringLocationToAttribute/TransferringLocationToAttribute.csproj
0 → 100644
View file @
860f860c
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"15.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{4E9005D6-0B4E-45AE-B391-2F6DFA1B0916}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
TransferringLocationToAttribute
</RootNamespace>
<AssemblyName>
TransferringLocationToAttribute
</AssemblyName>
<TargetFrameworkVersion>
v4.8
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<Deterministic>
true
</Deterministic>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"EntityFramework"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll
</HintPath>
</Reference>
<Reference
Include=
"NLog"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\NLog.dll
</HintPath>
</Reference>
<Reference
Include=
"RDnL.Logger"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RDnL.Logger.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.BusinessLayer.EF"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.BusinessLayer.EF.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.BusinessLayer.Interfaces"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.BusinessLayer.Interfaces.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.Common"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.Common.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.Customizations.API"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.Customizations.API.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.Customizations.Interfaces"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.Customizations.Interfaces.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.Model.EF"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.Model.EF.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.SubstitutionSyntax"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.SubstitutionSyntax.dll
</HintPath>
</Reference>
<Reference
Include=
"RnD.Uniconnect"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnD.Uniconnect.dll
</HintPath>
</Reference>
<Reference
Include=
"RnDSuiteBackend"
>
<HintPath>
..\..\..\..\..\..\Distr\OpcenterRDnL_9.1.0.0.3\Implementation\ABP\Opcenter_RDnL_V9.1.0.3_applied_best_practices\OpcenterRDnLLibrary_Builds\Siemens.OpcenterRDnLLibrary.Dependencies\RnDSuiteBackend.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"RDnL\TransferringLocationToAttributeCustomAction.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
\ No newline at end of file
TransferringLocationToAttribute/bin/Debug/EntityFramework.dll
0 → 100644
View file @
860f860c
File added
View file @
860f860c
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment