a
This commit is contained in:
56
GZ.LJY00001.HuiWei/GAT_zpjjlr/BillEventPlugInEx.cs
Normal file
56
GZ.LJY00001.HuiWei/GAT_zpjjlr/BillEventPlugInEx.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.ServiceHelper;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace GZ.LJY00001.HuiWei.GAT_zpjjlr
|
||||
{
|
||||
[HotUpdate, Description("装配计件录入表单插件")]
|
||||
public class BillEventPlugInEx : AbstractDynamicFormPlugIn
|
||||
{
|
||||
public override void DataChanged(DataChangedEventArgs e)
|
||||
{
|
||||
base.DataChanged(e);
|
||||
if (e.Field.Key.ToUpperInvariant().Equals("F_YGNO3"))
|
||||
{
|
||||
var ygNo = e.NewValue.Long2Int();
|
||||
var isSyq = 0;
|
||||
var hw_xygzjj_id = 0;
|
||||
|
||||
if (ygNo > 0)
|
||||
{
|
||||
var date = this.View.Model.GetValue("F_DATE").ToString();
|
||||
var sql = $@"/*dialect*/
|
||||
|
||||
SELECT t0e.F_YGNM,CASE t0e.F_ISSYQ WHEN '是' THEN 1 ELSE 0 END 'ISSYQ',ISNULL(t1.FID,0) hw_xygzjj_id
|
||||
FROM GAT_YGCQ t0
|
||||
INNER JOIN GAT_YGCQs t0e on t0.FID = t0e.FID
|
||||
LEFT JOIN hw_xygzjj t1 on t1.F_YGID = t0e.F_YGNM
|
||||
WHERE t0.F_Date = '{date}'
|
||||
AND t0e.F_YGNM = {ygNo}
|
||||
|
||||
";
|
||||
|
||||
var result = DBServiceHelper.ExecuteDynamicObject(this.Context, sql);
|
||||
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
var data = result[0];
|
||||
isSyq = data["ISSYQ"].Long2Int();
|
||||
hw_xygzjj_id = data["hw_xygzjj_id"].Long2Int();
|
||||
}
|
||||
}
|
||||
|
||||
this.View.Model.SetValue("FIsSYQ", isSyq, e.Row);
|
||||
this.View.Model.SetItemValueByID("FxygjjdjbId", hw_xygzjj_id, e.Row);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
60
GZ.LJY00001.HuiWei/GZ.LJY00001.HuiWei.csproj
Normal file
60
GZ.LJY00001.HuiWei/GZ.LJY00001.HuiWei.csproj
Normal file
@@ -0,0 +1,60 @@
|
||||
<?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>{BB639BC5-BACC-48D1-B9A6-96F3C7DDD605}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GZ.LJY00001.HuiWei</RootNamespace>
|
||||
<AssemblyName>GZ.LJY00001.HuiWei</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</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="Kingdee.BOS">
|
||||
<HintPath>..\00.未分类\AllOperation\bin\Debug\Kingdee.BOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.Core">
|
||||
<HintPath>..\00.未分类\AllOperation\bin\Debug\Kingdee.BOS.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.DataEntity">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.DataEntity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.ServiceHelper">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.ServiceHelper.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.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GAT_zpjjlr\BillEventPlugInEx.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
33
GZ.LJY00001.HuiWei/Properties/AssemblyInfo.cs
Normal file
33
GZ.LJY00001.HuiWei/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("GZ.LJY00001.HuiWei")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GZ.LJY00001.HuiWei")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("bb639bc5-bacc-48d1-b9a6-96f3c7ddd605")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Reference in New Issue
Block a user