30个文件已添加
76个文件已修改
8个文件已删除
1 文件已重命名
| | |
| | | </site> |
| | | <site name="web" id="2"> |
| | | <application path="/" applicationPool="Clr4IntegratedAppPool"> |
| | | <virtualDirectory path="/" physicalPath="C:\Users\mac\Desktop\Work-Archives\SMGW\SMGW_NewWeb\web\web" /> |
| | | <virtualDirectory path="/" physicalPath="C:\Users\mac\Desktop\RDream\SMGW_NewWeb\web\web" /> |
| | | </application> |
| | | <bindings> |
| | | <binding protocol="http" bindingInformation="*:60960:localhost" /> |
| | |
| | | <FileAlignment>512</FileAlignment> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <OutputPath>..\Lib\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | |
| | | <Compile Include="Const.cs" /> |
| | | <Compile Include="WebTool.cs" /> |
| | | <Compile Include="ZipUtils.cs" /> |
| | | <Compile Include="com\softwee\smgw\common\RegexHelper.cs" /> |
| | | <Compile Include="com\softwee\smgw\common\SegmentHelper.cs" /> |
| | | <Compile Include="RegexHelper.cs" /> |
| | | <Compile Include="AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
File was renamed from web/App_Code/com/softwee/smgw/common/RegexHelper.cs |
| | |
| | | namespace com.softwee.smgw.common |
| | | { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Runtime.InteropServices; |
| | | using System.Text.RegularExpressions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Runtime.InteropServices; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | |
| | | namespace App_Code |
| | | { |
| | | public abstract class RegexHelper |
| | | { |
| | | protected RegexHelper() |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </configSections> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" /> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <publisherPolicy apply="no" /> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | </configuration> |
| | |
| | | <OldToolsVersion>3.5</OldToolsVersion> |
| | | <UpgradeBackupLocation> |
| | | </UpgradeBackupLocation> |
| | | <NuGetPackageImportStamp> |
| | | </NuGetPackageImportStamp> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\web\Bin\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>lib\Oracle.DataAccess.dll</HintPath> |
| | | <Reference Include="Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\Oracle.ManagedDataAccess.19.18.0\lib\net40\Oracle.ManagedDataAccess.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System" /> |
| | |
| | | <Compile Include="OracleHelper.cs" /> |
| | | <Compile Include="DESEncrypt.cs" /> |
| | | <Compile Include="DataValidate.cs" /> |
| | | <Compile Include="SegmentHelper.cs" /> |
| | | <Compile Include="XmlHelper.cs" /> |
| | | <Compile Include="Utils.cs" /> |
| | | <Compile Include="DataHelper.cs" /> |
| | |
| | | <Compile Include="MyPage.cs" /> |
| | | <Compile Include="AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="App.config" /> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| | |
| | | |
| | | using Oracle.DataAccess.Client; |
| | | //using Oracle.ManagedDataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | |
| | | //老的 |
| | | //using Oracle.DataAccess.Client; |
| | | //using Oracle.ManagedDataAccess.Client; |
| | | //using System; |
| | | //using System.Collections; |
| | | //using System.Collections.Generic; |
| | |
| | | |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Data.Common; |
| | | |
New file |
| | |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace Common |
| | | { |
| | | public class SegmentHelper |
| | | { |
| | | public static string Filrate(string srcText) |
| | | { |
| | | if (string.IsNullOrEmpty(srcText)) |
| | | return string.Empty; |
| | | List<string> srcList = new List<string>(Enumerable.Distinct<string>((IEnumerable<string>)srcText.Split(Enumerable.ToArray<char>((IEnumerable<char>)"\r\n;,|"), StringSplitOptions.RemoveEmptyEntries))); |
| | | List<string> destList; |
| | | for (destList = new List<string>(); SegmentHelper.Merge(srcList, destList); destList = new List<string>()) |
| | | srcList = destList; |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | foreach (string str in destList) |
| | | stringBuilder.AppendLine(str); |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | private static bool Merge(List<string> srcList, List<string> destList) |
| | | { |
| | | foreach (string str in srcList.ToArray()) |
| | | { |
| | | if (str.Length > 5) |
| | | { |
| | | string s = str.Substring(0, str.Length - 1); |
| | | if (SegmentHelper.Remove(srcList, s)) |
| | | destList.Add(s); |
| | | } |
| | | } |
| | | destList.AddRange((IEnumerable<string>)srcList); |
| | | return srcList.Count != destList.Count; |
| | | } |
| | | |
| | | private static bool Remove(List<string> srcList, string s) |
| | | { |
| | | for (int index = 0; index < 10; ++index) |
| | | { |
| | | if (!srcList.Contains(s + (object)index)) |
| | | return false; |
| | | } |
| | | for (int index = 0; index < 10; ++index) |
| | | srcList.Remove(s + (object)index); |
| | | return true; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="Oracle.ManagedDataAccess" version="19.18.0" targetFramework="net40" /> |
| | | </packages> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </configSections> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" /> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <publisherPolicy apply="no" /> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | </configuration> |
| | |
| | | <Reference Include="Common"> |
| | | <HintPath>..\Lib\Common.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\Common\lib\Oracle.DataAccess.dll</HintPath> |
| | | <Reference Include="Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\Oracle.ManagedDataAccess.19.18.0\lib\net40\Oracle.ManagedDataAccess.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.configuration" /> |
| | | <Reference Include="System.Core"> |
| | |
| | | <Name>Model</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="App.config" /> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| | |
| | | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Data; |
| | | using System.Data.Common; |
| | |
| | | { |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Runtime.InteropServices; |
| | |
| | | /* |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | { |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | |
| | | namespace Dao |
| | | { |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | using System.Text; |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | |
| | | namespace Dao |
| | | { |
| | |
| | | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | { |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Data.Common; |
| | | |
| | |
| | | //区域暂时没有写入数据库 |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | //add新加2017-10-23 利润统计 |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data.Common; |
| | |
| | | |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | using Model; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | using System.Text; |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data; |
| | | using System.Data.Common; |
| | | |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | //登陆日志程序 |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Data; |
| | | using System.Data.Common; |
| | |
| | | using System.Text; |
| | | using Model; |
| | | using Common; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System.Data.Common; |
| | | |
| | | namespace Dao |
| | |
| | | using Common; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using Oracle.DataAccess.Client; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="Oracle.ManagedDataAccess" version="19.18.0" targetFramework="net40" /> |
| | | </packages> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </configSections> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" /> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <publisherPolicy apply="no" /> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </configSections> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" /> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <publisherPolicy apply="no" /> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | </configuration> |
| | |
| | | </UpgradeBackupLocation> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <OutputPath>..\Lib\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | |
| | | |
| | | Microsoft Visual Studio Solution File, Format Version 12.00 |
| | | # Visual Studio Version 16 |
| | | VisualStudioVersion = 16.0.30503.244 |
| | | # Visual Studio Version 17 |
| | | VisualStudioVersion = 17.4.33122.133 |
| | | MinimumVisualStudioVersion = 10.0.40219.1 |
| | | Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "web", "web\", "{793502B1-551F-4952-9C70-F20BAF89A3EA}" |
| | | ProjectSection(ProjectDependencies) = postProject |
| | | {6199DC29-D043-41B0-BDFD-AFA19ADC7848} = {6199DC29-D043-41B0-BDFD-AFA19ADC7848} |
| | | {C291753C-6A49-4705-B565-A830C43B4189} = {C291753C-6A49-4705-B565-A830C43B4189} |
| | | {337CD576-BA09-4182-9FDD-8F1AB1B30624} = {337CD576-BA09-4182-9FDD-8F1AB1B30624} |
| | | {D0CDBF9C-D79A-434F-ADB0-0A58B7B5E1D6} = {D0CDBF9C-D79A-434F-ADB0-0A58B7B5E1D6} |
| | | {AA804FAB-0293-4EB3-BF43-8103F1CC93F5} = {AA804FAB-0293-4EB3-BF43-8103F1CC93F5} |
| | | EndProjectSection |
| | | ProjectSection(WebsiteProperties) = preProject |
| | | TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" |
| | | ProjectReferences = "{AA804FAB-0293-4EB3-BF43-8103F1CC93F5}|UMCLib.dll;{D0CDBF9C-D79A-434F-ADB0-0A58B7B5E1D6}|Dao.dll;{6199DC29-D043-41B0-BDFD-AFA19ADC7848}|App_Code.dll;{337CD576-BA09-4182-9FDD-8F1AB1B30624}|Model.dll;" |
| | | ProjectReferences = "" |
| | | Debug.AspNetCompiler.VirtualPath = "/Web" |
| | | Debug.AspNetCompiler.PhysicalPath = "Web\" |
| | | Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Web\" |
| | |
| | | VWDPort = "60960" |
| | | SlnRelativePath = "web\" |
| | | DefaultWebSiteLanguage = "Visual C#" |
| | | EndProjectSection |
| | | ProjectSection(ProjectDependencies) = postProject |
| | | {6199DC29-D043-41B0-BDFD-AFA19ADC7848} = {6199DC29-D043-41B0-BDFD-AFA19ADC7848} |
| | | {C291753C-6A49-4705-B565-A830C43B4189} = {C291753C-6A49-4705-B565-A830C43B4189} |
| | | {337CD576-BA09-4182-9FDD-8F1AB1B30624} = {337CD576-BA09-4182-9FDD-8F1AB1B30624} |
| | | {D0CDBF9C-D79A-434F-ADB0-0A58B7B5E1D6} = {D0CDBF9C-D79A-434F-ADB0-0A58B7B5E1D6} |
| | | {AA804FAB-0293-4EB3-BF43-8103F1CC93F5} = {AA804FAB-0293-4EB3-BF43-8103F1CC93F5} |
| | | EndProjectSection |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{C291753C-6A49-4705-B565-A830C43B4189}" |
New file |
| | |
| | | Your use of this Program is governed by the Oracle Free Distribution, Hosting, and Use Terms and Conditions set forth below, unless you have received this Program (alone or as part of another Oracle product) under an Oracle license agreement (including but not limited to the Oracle Master Agreement), in which case your use of this Program is governed solely by such license agreement with Oracle. |
| | | |
| | | Oracle Free Distribution, Hosting, and Use Terms and Conditions |
| | | Definitions |
| | | "Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company or organization (each an "Entity") accessing the Programs, if use of the Programs will be on behalf of such Entity; or (b) an individual accessing the Programs, if use of the Programs will not be on behalf of an Entity. "Program(s)" refers to Oracle software provided by Oracle pursuant to the following terms and any updates, error corrections, and/or Program Documentation provided by Oracle. "Program Documentation" refers to Program user manuals and Program installation manuals, if any. If available, Program Documentation may be delivered with the Programs and/or may be accessed from www.oracle.com/documentation. "Separate Terms" refers to separate license terms that are specified in the Program Documentation, readmes or notice files and that apply to Separately Licensed Technology. "Separately Licensed Technology" refers to Oracle or third party technology that is licensed under Separate Terms and not under the terms of this license. |
| | | |
| | | Separately Licensed Technology |
| | | Oracle may provide certain notices to You in Program Documentation, readmes or notice files in connection with Oracle or third party technology provided as or with the Programs. If specified in the Program Documentation, readmes or notice files, such technology will be licensed to You under Separate Terms. Your rights to use Separately Licensed Technology under Separate Terms are not restricted in any way by the terms herein. For clarity, notwithstanding the existence of a notice, third party technology that is not Separately Licensed Technology shall be deemed part of the Programs licensed to You under the terms of this license. |
| | | |
| | | Source Code for Open Source Software |
| | | For software that You receive from Oracle in binary form that is licensed under an open source license that gives You the right to receive the source code for that binary, You can obtain a copy of the applicable source code from https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If the source code for such software was not provided to You with the binary, You can also receive a copy of the source code on physical media by submitting a written request pursuant to the instructions in the "Written Offer for Source Code" section of the latter website. |
| | | |
| | | ------------------------------------------------------------------------------- |
| | | The following license terms apply to those Programs that are not provided to You under Separate Terms. |
| | | License Rights and Restrictions |
| | | Oracle grants to You, as a recipient of this Program, a nonexclusive, nontransferable, limited license to, subject to the conditions stated herein, use the unmodified Programs, including, without limitation, for the purposes of: |
| | | • developing, testing, prototyping and demonstrating applications; |
| | | • running the unmodified Programs for training, personal use, your business operations, and the business operations of third parties; |
| | | • making the unmodified Programs available for use by third parties in your hosted environment and in cloud services; |
| | | • redistributing unmodified Programs and Programs Documentation under the terms of this License; and |
| | | • copying the unmodified Programs and Program Documentation to the extent reasonably necessary to exercise the license rights granted herein and for backup purposes. |
| | | For the purposes of this license, compiling, interpreting or configuring an otherwise unmodified Program as necessary to run the Program shall not be considered modification. |
| | | |
| | | Your license is contingent on Your compliance with the following conditions: |
| | | - You include a copy of this license with any distribution by You of the Programs; |
| | | - You do not charge your customers, end users, distributees or other third parties any additional fees for the distribution or use of the Programs; however, for clarity, if you comply with the foregoing condition, distribution or use of the Program as part of your for-fee product or service that adds substantial additional value is permitted; |
| | | - You do not remove markings or notices of either Oracle's or a licensor's proprietary rights from the Programs or Program Documentation; |
| | | - You comply with all U.S. and applicable export control and economic sanctions laws and regulations that govern Your use of the Programs (including technical data); and |
| | | - You do not cause or permit reverse engineering, disassembly or decompilation of the Programs (except as allowed by law) by You nor allow an associated party to do so. |
| | | Any source code that may be included in the distribution with the Programs may not be modified, unless such source code is under Separate Terms permitting modification. |
| | | Ownership |
| | | Oracle or its licensors retain all ownership and intellectual property rights to the Programs. |
| | | |
| | | Information Collection |
| | | The Programs' installation and/or auto-update processes, if any, may transmit a limited amount of data to Oracle or its service provider about those processes to help Oracle understand and optimize them. Oracle does not associate the data with personally identifiable information. Refer to Oracle's Privacy Policy at www.oracle.com/privacy. |
| | | |
| | | Disclaimer of Warranties; Limitation of Liability |
| | | THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. |
| | | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| | | |
| | | Version 1.0 |
| | | Last updated: 28 June 2022 |
New file |
| | |
| | | $categoryName = "ODP.NET, Managed Driver" |
| | | try{ |
| | | $categoryHelp = "$categoryName Performance Counter" |
| | | $categoryType = [System.Diagnostics.PerformanceCounterCategoryType]::MultiInstance |
| | | $categoryExists_reg = [System.Diagnostics.PerformanceCounterCategory]::Exists($categoryName) |
| | | if($categoryExists_reg) |
| | | { |
| | | [System.Diagnostics.PerformanceCounterCategory]::Delete($categoryName) |
| | | } |
| | | $counterCreationDataList = New-Object -TypeName System.Diagnostics.CounterCreationDataCollection |
| | | $counterCreationDataList.Clear() |
| | | $RateOfCountsPerSecond64 = [System.Diagnostics.PerformanceCounterType]::RateOfCountsPerSecond64 |
| | | $NumberOfItems64 = [System.Diagnostics.PerformanceCounterType]::NumberOfItems64 |
| | | $counterCreationData1 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'HardConnectsPerSecond', [string]::Empty, $RateOfCountsPerSecond64 |
| | | $counterCreationData2 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'HardDisconnectsPerSecond', [string]::Empty, $RateOfCountsPerSecond64 |
| | | $counterCreationData3 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'SoftConnectsPerSecond', [string]::Empty, $RateOfCountsPerSecond64 |
| | | $counterCreationData4 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'SoftDisconnectsPerSecond', [string]::Empty, $RateOfCountsPerSecond64 |
| | | $counterCreationData5 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfActiveConnectionPools', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationData6 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfInactiveConnectionPools',[string]::Empty, $NumberOfItems64 |
| | | $counterCreationData7 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfActiveConnections', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationData8 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfFreeConnections', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationData9 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfPooledConnections', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationData10 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfNonPooledConnections', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationData11 = New-Object -TypeName System.Diagnostics.CounterCreationData -ArgumentList 'NumberOfReclaimedConnections', [string]::Empty, $NumberOfItems64 |
| | | $counterCreationDataList.Add($counterCreationData1) | out-null |
| | | $counterCreationDataList.Add($counterCreationData2) | out-null |
| | | $counterCreationDataList.Add($counterCreationData3) | out-null |
| | | $counterCreationDataList.Add($counterCreationData4) | out-null |
| | | $counterCreationDataList.Add($counterCreationData5) | out-null |
| | | $counterCreationDataList.Add($counterCreationData6) | out-null |
| | | $counterCreationDataList.Add($counterCreationData7) | out-null |
| | | $counterCreationDataList.Add($counterCreationData8) | out-null |
| | | $counterCreationDataList.Add($counterCreationData9) | out-null |
| | | $counterCreationDataList.Add($counterCreationData10) | out-null |
| | | $counterCreationDataList.Add($counterCreationData11) | out-null |
| | | [System.Diagnostics.PerformanceCounterCategory]::Create($categoryName, $categoryHelp, $categoryType, $counterCreationDataList) | out-null |
| | | write-host("$categoryHelp was registered successfullly.") |
| | | } |
| | | catch{ |
| | | write-host("ERROR: $categoryHelp registration failed.") |
| | | } |
New file |
| | |
| | | $categoryName = "ODP.NET, Managed Driver" |
| | | try{ |
| | | $categoryExists_unreg = [System.Diagnostics.PerformanceCounterCategory]::Exists($categoryName) |
| | | if($categoryExists_unreg) |
| | | { |
| | | [System.Diagnostics.PerformanceCounterCategory]::Delete($categoryName) | out-null |
| | | } |
| | | write-host("$categoryName Performance Counter was un-registered successfullly.") |
| | | } |
| | | catch{ |
| | | write-host("ERROR: $categoryName Performance Counter un-registration failed.") |
| | | } |
New file |
| | |
| | | <?xml version="1.0"?> |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | |
| | | <configSections xdt:Transform="InsertIfMissing"> |
| | | </configSections> |
| | | |
| | | <configSections xdt:Transform="InsertBefore(/configuration/*[1])"> |
| | | </configSections> |
| | | |
| | | <!-- remove existing entry --> |
| | | <configSections xdt:Locator="XPath(/configuration/configSections[last()])"> |
| | | <section name="oracle.manageddataaccess.client" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </configSections> |
| | | |
| | | <!-- insert new entry --> |
| | | <configSections xdt:Locator="XPath(/configuration/configSections[last()])"> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Insert" /> |
| | | </configSections> |
| | | |
| | | <configSections xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- If system.data tag is absent --> |
| | | <system.data xdt:Transform="InsertIfMissing"> |
| | | <DbProviderFactories> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- If system.data tag is present, but DbProviderFactories tag is absent --> |
| | | <system.data> |
| | | <DbProviderFactories xdt:Transform="InsertIfMissing"> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- remove existing ODPM entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Remove" xdt:Locator="Match(invariant)" /> |
| | | <add name="ODP.NET, Managed Driver" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- add new ODPM entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Insert"/> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Insert" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- If runtime tag is absent --> |
| | | <runtime xdt:Transform="InsertIfMissing"> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- If runtime tag is present, but assembly binding tag is absent --> |
| | | <runtime> |
| | | <assemblyBinding xdt:Transform="InsertIfMissing" xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- remove existing entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Remove" |
| | | xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Oracle.ManagedDataAccess')" > |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- insert new entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Insert"> |
| | | <publisherPolicy apply="no"/> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- If oracle.manageddataaccess.client tag is absent --> |
| | | <oracle.manageddataaccess.client xdt:Transform="InsertIfMissing"> |
| | | <version number="*"> |
| | | <dataSources> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- If version tag is absent --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*" xdt:Transform="InsertIfMissing"> |
| | | <dataSources> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- If dataSources tag is absent --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources xdt:Transform="InsertIfMissing"> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- add entry if missing --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " xdt:Transform="InsertIfMissing" xdt:Locator="Match(alias)"/> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | </configuration> |
New file |
| | |
| | | <configuration> |
| | | <configSections> |
| | | </configSections> |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0"?> |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | |
| | | <!-- remove existing entry --> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </configSections> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <configSections xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Remove" xdt:Locator="Match(invariant)" /> |
| | | <add name="ODP.NET, Managed Driver" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <system.data> |
| | | <DbProviderFactories xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </system.data> |
| | | <system.data xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Remove" |
| | | xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Oracle.ManagedDataAccess')" > |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </runtime> |
| | | <runtime xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " xdt:Transform="Remove" xdt:Locator="Match(alias)"/> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- remove existing entry --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*" xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <oracle.manageddataaccess.client xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0"?> |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | |
| | | <configSections xdt:Transform="InsertIfMissing"> |
| | | </configSections> |
| | | |
| | | <configSections xdt:Transform="InsertBefore(/configuration/*[1])"> |
| | | </configSections> |
| | | |
| | | <!-- remove existing entry --> |
| | | <configSections xdt:Locator="XPath(/configuration/configSections[last()])"> |
| | | <section name="oracle.manageddataaccess.client" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </configSections> |
| | | |
| | | <!-- insert new entry --> |
| | | <configSections xdt:Locator="XPath(/configuration/configSections[last()])"> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Insert" /> |
| | | </configSections> |
| | | |
| | | <configSections xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- If system.data tag is absent --> |
| | | <system.data xdt:Transform="InsertIfMissing"> |
| | | <DbProviderFactories> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- If system.data tag is present, but DbProviderFactories tag is absent --> |
| | | <system.data> |
| | | <DbProviderFactories xdt:Transform="InsertIfMissing"> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- remove existing ODPM entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Remove" xdt:Locator="Match(invariant)" /> |
| | | <add name="ODP.NET, Managed Driver" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- add new ODPM entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Insert"/> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" xdt:Transform="Insert" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- If runtime tag is absent --> |
| | | <runtime xdt:Transform="InsertIfMissing"> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- If runtime tag is present, but assembly binding tag is absent --> |
| | | <runtime> |
| | | <assemblyBinding xdt:Transform="InsertIfMissing" xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- remove existing entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Remove" |
| | | xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Oracle.ManagedDataAccess')" > |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- insert new entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Insert"> |
| | | <publisherPolicy apply="no"/> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- If oracle.manageddataaccess.client tag is absent --> |
| | | <oracle.manageddataaccess.client xdt:Transform="InsertIfMissing"> |
| | | <version number="*"> |
| | | <dataSources> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- If version tag is absent --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*" xdt:Transform="InsertIfMissing"> |
| | | <dataSources> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- If dataSources tag is absent --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources xdt:Transform="InsertIfMissing"> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- add entry if missing --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " xdt:Transform="InsertIfMissing" xdt:Locator="Match(alias)"/> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | </configuration> |
New file |
| | |
| | | <configuration> |
| | | <configSections> |
| | | </configSections> |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0"?> |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | |
| | | <!-- remove existing entry --> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </configSections> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <configSections xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" xdt:Transform="Remove" xdt:Locator="Match(invariant)" /> |
| | | <add name="ODP.NET, Managed Driver" xdt:Transform="Remove" xdt:Locator="Match(name)" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <system.data> |
| | | <DbProviderFactories xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </system.data> |
| | | <system.data xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly xdt:Transform="Remove" |
| | | xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Oracle.ManagedDataAccess')" > |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </runtime> |
| | | <runtime xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | <!-- remove existing entry --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " xdt:Transform="Remove" xdt:Locator="Match(alias)"/> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- remove if section is empty --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <!-- remove existing entry --> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*" xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | <oracle.manageddataaccess.client xdt:Transform="RemoveAll" xdt:Locator="Condition(count(*)=0)" /> |
| | | |
| | | </configuration> |
New file |
| | |
| | | The following software may be included in Oracle Data Provider for .NET: |
| | | |
| | | Kerberos |
| | | |
| | | Copyright (C) 1985-2010 by the Massachusetts Institute of Technology. |
| | | |
| | | All rights reserved. |
| | | |
| | | Export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting. |
| | | |
| | | WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Furthermore if you modify this software you must label your software as modified software and not distribute it in such a fashion that it might be confused with the original MIT software. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. |
| | | |
| | | THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| | | |
| | | Individual source code files are copyright MIT, Cygnus Support, Novell, OpenVision Technologies, Oracle, Red Hat, Sun Microsystems, FundsXpress, and others. |
| | | |
| | | Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, and Zephyr are trademarks of the Massachusetts Institute of Technology (MIT). No commercial use of these trademarks may be made without prior written permission of MIT. |
| | | |
| | | "Commercial use" means use of a name in a product or other for-profit manner. It does NOT prevent a commercial firm from referring to the MIT trademarks in order to convey information (although in doing so, recognition of their trademark status should be given). |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions of src/lib/crypto have the following copyright: |
| | | |
| | | Copyright (C) 1998 by the FundsXpress, INC. |
| | | |
| | | All rights reserved. |
| | | |
| | | Export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting. |
| | | |
| | | WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of FundsXpress. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. FundsXpress makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. |
| | | |
| | | THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The following copyright and permission notice applies to the OpenVision Kerberos Administration system located in kadmin/create, kadmin/dbutil, kadmin/passwd, kadmin/server, lib/kadm5, and portions of lib/rpc: |
| | | |
| | | Copyright, OpenVision Technologies, Inc., 1996, All Rights Reserved |
| | | |
| | | WARNING: Retrieving the OpenVision Kerberos Administration system source code, as described below, indicates your acceptance of the following terms. If you do not agree to the following terms, do not retrieve the OpenVision Kerberos administration system. |
| | | |
| | | You may freely use and distribute the Source Code and Object Code compiled from it, with or without modification, but this Source Code is provided to you "AS IS" EXCLUSIVE OF ANY WARRANTY, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER WARRANTY, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL OPENVISION HAVE ANY LIABILITY FOR ANY LOST PROFITS, LOSS OF DATA OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, INCLUDING, WITHOUT LIMITATION, THOSE RESULTING FROM THE USE OF THE SOURCE CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR ANY OTHER REASON. |
| | | |
| | | OpenVision retains all copyrights in the donated Source Code. OpenVision also retains copyright to derivative works of the Source Code, whether created by OpenVision or by a third party. The OpenVision copyright notice must be preserved if derivative works are made based on the donated Source Code. |
| | | |
| | | OpenVision Technologies, Inc. has donated this Kerberos Administration system to MIT for inclusion in the standard Kerberos 5 distribution. This donation underscores our commitment to continuing Kerberos technology development and our gratitude for the valuable work which has been performed by MIT and the Kerberos community. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions contributed by Matt Crawford <crawdad@fnal.gov> were work performed at Fermi National Accelerator Laboratory, which is operated by Universities Research Association, Inc., under contract DE-AC02-76CHO3000 with the U.S. Department of Energy. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The implementation of the Yarrow pseudo-random number generator in src/lib/crypto/yarrow has the following copyright: |
| | | |
| | | Copyright 2000 by Zero-Knowledge Systems, Inc. |
| | | |
| | | Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Zero-Knowledge Systems, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Zero-Knowledge Systems, Inc. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. |
| | | |
| | | ZERO-KNOWLEDGE SYSTEMS, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ZERO-KNOWLEDGE SYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The implementation of the AES encryption algorithm in src/lib/crypto/aes has the following copyright: |
| | | |
| | | Copyright (c) 2001, Dr Brian Gladman <brg@gladman.uk.net>, Worcester, UK. All rights reserved. |
| | | |
| | | LICENSE TERMS |
| | | |
| | | The free distribution and use of this software in both source and binary form is allowed (with or without changes) provided that: |
| | | |
| | | 1. distributions of this source code include the above copyright notice, this list of conditions and the following disclaimer; |
| | | |
| | | 2. distributions in binary form include the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other associated materials; |
| | | |
| | | 3. the copyright holder's name is not used to endorse products built using this software without specific written permission. |
| | | |
| | | DISCLAIMER |
| | | |
| | | This software is provided 'as is' with no explicit or implied warranties in respect of any properties, including, but not limited to, correctness and fitness for purpose. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions contributed by Red Hat, including the pre-authentication plug-ins framework, contain the following copyright: |
| | | |
| | | Copyright (c) 2006 Red Hat, Inc. |
| | | |
| | | Portions copyright (c) 2006 Massachusetts Institute of Technology |
| | | |
| | | All Rights Reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| | | |
| | | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
| | | |
| | | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
| | | |
| | | Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The implementations of GSSAPI mechglue in GSSAPI-SPNEGO in src/lib/gssapi, including the following files: |
| | | |
| | | lib/gssapi/generic/gssapi_err_generic.et |
| | | lib/gssapi/mechglue/g_accept_sec_context.c |
| | | lib/gssapi/mechglue/g_acquire_cred.c |
| | | lib/gssapi/mechglue/g_canon_name.c |
| | | lib/gssapi/mechglue/g_compare_name.c |
| | | lib/gssapi/mechglue/g_context_time.c |
| | | lib/gssapi/mechglue/g_delete_sec_context.c |
| | | lib/gssapi/mechglue/g_dsp_name.c |
| | | lib/gssapi/mechglue/g_dsp_status.c |
| | | lib/gssapi/mechglue/g_dup_name.c |
| | | lib/gssapi/mechglue/g_exp_sec_context.c |
| | | lib/gssapi/mechglue/g_export_name.c |
| | | lib/gssapi/mechglue/g_glue.c |
| | | lib/gssapi/mechglue/g_imp_name.c |
| | | lib/gssapi/mechglue/g_imp_sec_context.c |
| | | lib/gssapi/mechglue/g_init_sec_context.c |
| | | lib/gssapi/mechglue/g_initialize.c |
| | | lib/gssapi/mechglue/g_inquire_context.c |
| | | lib/gssapi/mechglue/g_inquire_cred.c |
| | | lib/gssapi/mechglue/g_inquire_names.c |
| | | lib/gssapi/mechglue/g_process_context.c |
| | | lib/gssapi/mechglue/g_rel_buffer.c |
| | | lib/gssapi/mechglue/g_rel_cred.c |
| | | lib/gssapi/mechglue/g_rel_name.c |
| | | lib/gssapi/mechglue/g_rel_oid_set.c |
| | | lib/gssapi/mechglue/g_seal.c |
| | | lib/gssapi/mechglue/g_sign.c |
| | | lib/gssapi/mechglue/g_store_cred.c |
| | | lib/gssapi/mechglue/g_unseal.c |
| | | lib/gssapi/mechglue/g_userok.c |
| | | lib/gssapi/mechglue/g_utils.c |
| | | lib/gssapi/mechglue/g_verify.c |
| | | lib/gssapi/mechglue/gssd_pname_to_uid.c |
| | | lib/gssapi/mechglue/mglueP.h |
| | | lib/gssapi/mechglue/oid_ops.c |
| | | lib/gssapi/spnego/gssapiP_spnego.h |
| | | lib/gssapi/spnego/spnego_mech.c |
| | | |
| | | and the initial implementation of incremental propagation, including the following new or changed files: |
| | | |
| | | include/iprop_hdr.h |
| | | kadmin/server/ipropd_svc.c |
| | | lib/kdb/iprop.x |
| | | lib/kdb/kdb_convert.c |
| | | lib/kdb/kdb_log.clib/kdb/kdb_log.h |
| | | lib/krb5/error_tables/kdb5_err.et |
| | | slave/kpropd_rpc.c |
| | | slave/kproplog.c |
| | | |
| | | and marked portions of the following files: |
| | | |
| | | lib/krb5/os/hst_realm.c |
| | | |
| | | are subject to the following license: |
| | | |
| | | Copyright (c) 2004 Sun Microsystems, Inc. |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | MIT Kerberos includes documentation and software developed at the University of California at Berkeley, which includes this copyright notice: |
| | | |
| | | Copyright (C) 1983 Regents of the University of California. |
| | | |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| | | |
| | | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
| | | |
| | | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
| | | |
| | | 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions contributed by Novell, Inc., including the LDAP database backend, are subject to the following license: |
| | | |
| | | Copyright (c) 2004-2005, Novell, Inc. All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| | | |
| | | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
| | | |
| | | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
| | | |
| | | The copyright holder's name is not used to endorse or promote products derived from this software without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions funded by Sandia National Laboratory and developed by the University of Michigan's Center for Information Technology Integration, including the PKINIT implementation, are subject to the following license: |
| | | |
| | | COPYRIGHT (C) 2006-2007 |
| | | |
| | | THE REGENTS OF THE UNIVERSITY OF MICHIGAN |
| | | |
| | | ALL RIGHTS RESERVED |
| | | |
| | | Permission is granted to use, copy, create derivative works and redistribute this software and such derivative works for any purpose, so long as the name of The University of Michigan is not used in any advertising or publicity pertaining to the use of distribution of this software without specific, written prior authorization. If the above copyright notice or any other identification of the University of Michigan is included in any copy of any portion of this software, then the disclaimer below must also be included. |
| | | |
| | | THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The pkcs11.h file included in the PKINIT code has the following license: |
| | | |
| | | Copyright 2006 g10 Code GmbH |
| | | |
| | | Copyright 2006 Andreas Jellinghaus |
| | | |
| | | This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. |
| | | |
| | | This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Portions contributed by Apple Inc. are subject to the following license: |
| | | |
| | | Copyright 2004-2008 Apple Inc. All Rights Reserved. |
| | | |
| | | Export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting. |
| | | |
| | | WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Apple Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Apple Inc. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. |
| | | |
| | | THIS SOFTWARE IS PROVIDED "AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The implementations of strlcpy and strlcat in src/util/support/strlcat.c have the following copyright and permission notice: |
| | | |
| | | Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> |
| | | |
| | | Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | The implementations of UTF-8 string handling in src/util/support and src/lib/krb5/unicode are subject to the following copyright and permission notice: |
| | | |
| | | The OpenLDAP Public License |
| | | |
| | | Version 2.8, 17 August 2003 |
| | | |
| | | Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: |
| | | |
| | | Redistributions in source form must retain copyright statements and notices, |
| | | |
| | | Redistributions in binary form must reproduce applicable copyright statements and notices, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution, and |
| | | |
| | | Redistributions must contain a verbatim copy of this document. |
| | | |
| | | The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use this Software under terms of this license revision or under the terms of any subsequent revision of the license. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS CONTRIBUTORS "AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | |
| | | The names of the authors and copyright holders must not be used in advertising or otherwise to promote the sale, use or other dealing in this Software without specific, written prior permission. Title to copyright in this Software shall at all times remain with copyright holders. |
| | | |
| | | OpenLDAP is a registered trademark of the OpenLDAP Foundation. |
| | | |
| | | Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distribute verbatim copies of this document is granted. |
| | | |
| | | ----------------------------------------- |
| | | |
| | | Marked test programs in src/lib/krb5/krb have the following copyright: |
| | | |
| | | Copyright (c) 2006 Kungliga Tekniska H鰃skolan |
| | | |
| | | (Royal Institute of Technology, Stockholm, Sweden). |
| | | |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| | | |
| | | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
| | | |
| | | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
| | | |
| | | Neither the name of KTH nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS "AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
New file |
| | |
| | | Oracle.ManagedDataAccess NuGet Package 19.18.0 README |
| | | ===================================================== |
| | | Release Notes: Oracle Data Provider for .NET, Managed Driver |
| | | |
| | | January 2023 |
| | | |
| | | This document provides information that supplements the Oracle Data Provider for .NET (ODP.NET) documentation. |
| | | |
| | | You have downloaded Oracle Data Provider for .NET. The license agreement is available here: |
| | | https://www.oracle.com/downloads/licenses/distribution-license.html |
| | | |
| | | TABLE OF CONTENTS |
| | | *New Features |
| | | *Bug Fixes |
| | | *Installation and Configuration Steps |
| | | *Installation Changes |
| | | *Documentation Corrections and Additions |
| | | *ODP.NET, Managed Driver Tips, Limitations, and Known Issues |
| | | |
| | | Note: The 32-bit "Oracle Developer Tools for Visual Studio" download from https://otn.oracle.com/dotnet is |
| | | required for Entity Framework design-time features and for other Visual Studio designers such as the |
| | | TableAdapter Wizard. This NuGet download does not enable design-time tools; it only provides run-time support. |
| | | This version of ODP.NET supports Oracle Database version 11.2.0.4 and higher. |
| | | |
| | | |
| | | Bug Fixes since Oracle.ManagedDataAccess.Core NuGet Package 19.17.0 |
| | | =================================================================== |
| | | Bug 31456063 ORA-03111 IS ENCOUNTERED WHILE CANCELLING THE CURRENT COMMAND EXECUTION |
| | | Bug 31793997 INCORRECT UDTS ARE RETURNED BY DATAREADER AFTER A NULL UDT IS FETCHED |
| | | Bug 34431232 CURRENT DATABASE EDITION NAME IS NOT RETURNED BY ORACLECONNECTION |
| | | Bug 34617083 RESOLVE CVE-2023-21893 |
| | | |
| | | |
| | | Installation and Configuration Steps |
| | | ==================================== |
| | | The downloads are NuGet packages that can be installed with the NuGet Package Manager. These instructions apply |
| | | to install ODP.NET, Managed Driver. |
| | | |
| | | 1. Un-GAC and un-configure any existing assembly (i.e. Oracle.ManagedDataAccess.dll) and policy DLL |
| | | (i.e. Policy.4.122.Oracle.ManagedDataAccess.dll) for the ODP.NET, Managed Driver, version 4.122.19.1 |
| | | that exist in the GAC. Remove all references of Oracle.ManagedDataAccess from machine.config file, if any exists. |
| | | |
| | | 2. In Visual Studio, open NuGet Package Manager from an existing Visual Studio project. |
| | | |
| | | 3. Install the NuGet package from NuGet Gallery (nuget.org). |
| | | |
| | | |
| | | From Local Package Source |
| | | ------------------------- |
| | | A. Click on the Settings button in the lower left of the dialog box. |
| | | |
| | | B. Click the "+" button to add a package source. In the Source field, enter in the directory location where the |
| | | NuGet package(s) were downloaded to. Click the Update button, then the Ok button. |
| | | |
| | | C. On the left side, under the Online root node, select the package source you just created. The ODP.NET NuGet |
| | | packages will appear. |
| | | |
| | | |
| | | From Nuget.org |
| | | -------------- |
| | | A. In the Search box in the upper right, search for the package with id, "Oracle.ManagedDataAccess". Verify |
| | | that the package uses this unique ID to ensure it is the official Oracle Data Provider for .NET, Managed Driver |
| | | download. |
| | | |
| | | B. Select the package you wish to install. |
| | | |
| | | |
| | | 4. Click on the Install button to select the desired NuGet package(s) to include with the project. Accept the |
| | | license agreement and Visual Studio will continue the setup. |
| | | |
| | | 5. Open the app/web.config file to configure the ODP.NET connection string and connect descriptors. |
| | | Below is an example of configuring the net service aliases and connect descriptors parameters: |
| | | |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <!-- Customize these connection alias settings to connect to Oracle DB --> |
| | | <dataSource alias="MyDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | |
| | | After following these instructions, ODP.NET is now configured and ready to use. |
| | | |
| | | IMPORTANT: Oracle recommends configuring net service aliases and connect descriptors in a .NET config file to |
| | | have the application configuration be self-contained rather than using tnsnames.ora or TNS_ADMIN. |
| | | |
| | | NOTE: ODP.NET, Managed Driver comes with one set of platform specific assemblies for Kerberos support: Oracle.ManagedDataAccessIOP.dll. |
| | | |
| | | The Oracle.ManagedDataAccessIOP.dll assembly is ONLY needed if you are using Kerberos5 based external |
| | | authentication. Kerberos5 users will need to download MIT Kerberos for Windows version 4.0.1 from |
| | | https://web.mit.edu/kerberos/dist/ |
| | | to utilize ODP.NET, Managed Driver's support of Kerberos5. |
| | | |
| | | The asssemblies are located under |
| | | packages\Oracle.ManagedDataAccess.<version>\bin\x64 |
| | | and |
| | | packages\Oracle.ManagedDataAccess.<version>\bin\x86 |
| | | depending on the platform. |
| | | |
| | | If these assemblies are required by your application, your Visual Studio project requires additional changes. |
| | | |
| | | Use the following steps for your application to use the 64-bit version of Oracle.ManagedDataAccessIOP.dll: |
| | | |
| | | 1. Right click on the Visual Studio project. |
| | | 2. Select Add -> New Folder. |
| | | 3. Name the folder x64. |
| | | 4. Right click on the newly created x64 folder. |
| | | 5. Select Add -> Existing Item. |
| | | 6. Browse to packages\Oracle.ManagedDataAccess.<version>\bin\x64 under your project solution directory. |
| | | 7. Choose Oracle.ManagedDataAccessIOP.dll. |
| | | 8. Click the 'Add' button. |
| | | 9. Left click the newly added Oracle.ManagedDataAccessIOP.dll in the x64 folder. |
| | | 10. In the properties window, set 'Copy To Output Directory' to 'Copy Always'. |
| | | |
| | | For x86 targeted applications, name the folder x86 and add assemblies from the |
| | | packages\Oracle.ManagedDataAccess.<version>\bin\x86 folder. |
| | | |
| | | To make your application platform independent even if it depends on Oracle.ManagedDataAccessIOP.dll, create both x64 and x86 folders with the necessary assemblies added to them. |
| | | |
| | | |
| | | Installation Changes |
| | | ==================== |
| | | The following app/web.config entries are added by including the ODP.NET, Managed Driver NuGet package to your application: |
| | | |
| | | 1) Configuration Section Handler |
| | | |
| | | The following entry is added to the app/web.config to enable applications to add an <oracle.manageddataaccess.client> |
| | | section for ODP.NET, Managed Driver-specific configuration: |
| | | |
| | | <configuration> |
| | | <configSections> |
| | | <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </configSections> |
| | | </configuration> |
| | | |
| | | Note: If your application is a web application and the above entry was added to a web.config and the same config |
| | | section handler for "oracle.manageddataaccess.client" also exists in machine.config but the "Version" attribute values |
| | | are different, an error message of "There is a duplicate 'oracle.manageddataaccess.client' section defined." may be |
| | | observed at runtime. If so, the config section handler entry in the machine.config for |
| | | "oracle.manageddataaccess.client" has to be removed from the machine.config for the web application to not encounter |
| | | this error. But given that there may be other applications on the machine that depended on this entry in the |
| | | machine.config, this config section handler entry may need to be moved to all of the application's .NET config file on |
| | | that machine that depend on it. |
| | | |
| | | 2) DbProviderFactories |
| | | |
| | | The following entry is added for applications that use DbProviderFactories and DbProviderFactory classes. Also, any |
| | | DbProviderFactories entry for "Oracle.ManagedDataAccess.Client" in the machine.config will be ignored with the following |
| | | entry: |
| | | |
| | | <configuration> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | | <remove invariant="Oracle.ManagedDataAccess.Client" /> |
| | | <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> |
| | | </DbProviderFactories> |
| | | </system.data> |
| | | </configuration> |
| | | |
| | | 3) Dependent Assembly |
| | | |
| | | The following entry is created to ignore policy DLLs for Oracle.ManagedDataAccess.dll and always use the |
| | | Oracle.ManagedDataAccess.dll version that is specified by the newVersion attribute in the <bindingRedirect> element. |
| | | The newVersion attribute corresponds to the Oracle.ManagedDataAccess.dll version which came with the NuGet package |
| | | associated with the application. |
| | | |
| | | <configuration> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <publisherPolicy apply="no" /> |
| | | <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> |
| | | <bindingRedirect oldVersion="4.122.0.0 - 4.65535.65535.65535" newVersion="4.122.19.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | </configuration> |
| | | |
| | | 4) Data Sources |
| | | |
| | | The following entry is added to provide a template on how a data source can be configured in the app/web.config. |
| | | Simply rename "MyDataSource" to an alias of your liking and modify the PROTOCOL, HOST, PORT, SERVICE_NAME as required |
| | | and un-comment the <dataSource> element. Once that is done, the alias can be used as the "data source" attribute in |
| | | your connection string when connecting to an Oracle Database through ODP.NET, Managed Driver. |
| | | |
| | | <configuration> |
| | | <oracle.manageddataaccess.client> |
| | | <version number="*"> |
| | | <dataSources> |
| | | <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> |
| | | </dataSources> |
| | | </version> |
| | | </oracle.manageddataaccess.client> |
| | | </configuration> |
| | | |
| | | |
| | | Documentation Corrections and Additions |
| | | ======================================= |
| | | None |
| | | |
| | | |
| | | ODP.NET, Managed Driver Tips, Limitations, and Known Issues |
| | | =========================================================== |
| | | None |
| | | |
| | | |
| | | Copyright (c) 2021, 2023, Oracle and/or its affiliates. |
| | |
| | | <%@ WebHandler Language="C#" Class="GwBlackMobileHandler" %> |
| | | |
| | | using com.softwee.smgw.common; |
| | | |
| | | //using App_Code; |
| | | using Common; |
| | | using Dao; |
| | | using Model; |
| | | using System; |
| | |
| | | |
| | | public class GwBlackMobileHandler : PageHandler<SysUser> |
| | | { |
| | | private HashSet<long> Map = new HashSet<long>(); |
| | | private GwBlackPoolDao _GwBlackPoolDao = new GwBlackPoolDao(); |
| | | private HashSet<long> Map = new HashSet<long>(); |
| | | private GwBlackPoolDao _GwBlackPoolDao = new GwBlackPoolDao(); |
| | | |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | case "saveMobileSegMent": |
| | | return this.SaveMobileSegMent(context); |
| | | case "getMobileSegment": |
| | | return this.GetMobileSegment(context); |
| | | case "loadGwBlackPool": |
| | | return this.LoadGwBlackPool(context); |
| | | case "getGwBlackPool": |
| | | return this.GetGwBlackPool(context); |
| | | case "save": |
| | | return this.Save(context); |
| | | |
| | | //清除黑名单数据 |
| | | |
| | | case "truntateBlackMobile": |
| | | return this.truntateBlackMobile(context); |
| | | //清除黑名单数据END |
| | | |
| | | case "update": |
| | | return this.Update(context); |
| | | case "deletePool": |
| | | return this.DeletePool(context); |
| | | case "loadGwBlackMobile": |
| | | return this.LoadGwBlackMobile(context); |
| | | case "addGwBlackMobile": |
| | | return this.AddGwBlackMobile(context); |
| | | case "deleteMobile": |
| | | return this.DeleteMobile(context); |
| | | case "txtimportBlackMobile": |
| | | return this.ZipImportBlackMobile(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | { |
| | | case "saveMobileSegMent": |
| | | return this.SaveMobileSegMent(context); |
| | | case "getMobileSegment": |
| | | return this.GetMobileSegment(context); |
| | | case "loadGwBlackPool": |
| | | return this.LoadGwBlackPool(context); |
| | | case "getGwBlackPool": |
| | | return this.GetGwBlackPool(context); |
| | | case "save": |
| | | return this.Save(context); |
| | | |
| | | //清除黑名单数据 |
| | | |
| | | case "truntateBlackMobile": |
| | | return this.truntateBlackMobile(context); |
| | | //清除黑名单数据END |
| | | |
| | | case "update": |
| | | return this.Update(context); |
| | | case "deletePool": |
| | | return this.DeletePool(context); |
| | | case "loadGwBlackMobile": |
| | | return this.LoadGwBlackMobile(context); |
| | | case "addGwBlackMobile": |
| | | return this.AddGwBlackMobile(context); |
| | | case "deleteMobile": |
| | | return this.DeleteMobile(context); |
| | | case "txtimportBlackMobile": |
| | | return this.ZipImportBlackMobile(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private JsonPageResult SaveMobileSegMent(PageContext<SysUser> context) |
| | | { |
| | | int @int = context.GetInt("pid"); |
| | | string @string = context.GetString("mobileData"); |
| | | if (@int < 0) |
| | | throw new ArgumentException("参数PoolID获取失败"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("请填写号段"); |
| | | if (new GwBlackPoolDao().UpMobileSegMentdate(new GwBlackPool() |
| | | private JsonPageResult SaveMobileSegMent(PageContext<SysUser> context) |
| | | { |
| | | PoolID = @int, |
| | | MobileSegMent = SegmentHelper.Filrate(@string) |
| | | })) |
| | | return new JsonPageResult(true, (object) "号段修改成功"); |
| | | return new JsonPageResult(false, (object) "添加号段失败"); |
| | | } |
| | | |
| | | private JsonPageResult GetMobileSegment(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, (object) new GwBlackPoolDao().GetGwBlackPool(context.GetInt("pid"))); |
| | | } |
| | | |
| | | private JsonPageResult LoadGwBlackPool(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("poolName"); |
| | | int recordcount = 0; |
| | | int int1 = context.GetInt("pageIndex", 1); |
| | | int int2 = context.GetInt("pageSize", 20); |
| | | string str = ""; |
| | | using (GwBlackPoolDao gwBlackPoolDao = new GwBlackPoolDao()) |
| | | { |
| | | List<GwBlackPool> list = gwBlackPoolDao.LoadInfoList(@string, out recordcount, int1, int2); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | foreach (GwBlackPool gwBlackPool in list) |
| | | int @int = context.GetInt("pid"); |
| | | string @string = context.GetString("mobileData"); |
| | | if (@int < 0) |
| | | throw new ArgumentException("参数PoolID获取失败"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("请填写号段"); |
| | | if (new GwBlackPoolDao().UpMobileSegMentdate(new GwBlackPool() |
| | | { |
| | | str = str + (object) "<tr ><td>" + gwBlackPool.PoolName + "</td><td>" + (object) gwBlackPool.BlackPoolID + "</td>"; |
| | | str += "<td>"; |
| | | str += string.Format("<a class=\"btn btn-xs btn-primary btn-poolmobile\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += " 查询</a> "; |
| | | str += string.Format("<a class=\"btn btn-xs btn-primary btn-mobile-segment\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class=\"fa fa-edit\"></i> 黑名单号段</a> "; |
| | | str += string.Format("<a class=\"action-txtimportBlack btn btn-info btn-xs \" href=\"javascript:;\" data-id=\"{0}\" data-name=\"{1}\">", (object) gwBlackPool.PoolID, (object) gwBlackPool.PoolName); |
| | | str += " 黑名单导入</a> "; |
| | | if (gwBlackPool.PoolID > 0) |
| | | { |
| | | str += string.Format("<a class=\"action-modal-edit btn btn-success btn-xs \" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class='fa fa-edit'></i> 编辑"; |
| | | str += "</a> "; |
| | | str += string.Format("<a class=\"action-delete btnbtn btn btn-default btn-xs\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class='fa fa-trash'></i> 删除"; |
| | | str += "</a> "; |
| | | } |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"3\" style=\"text-align: center;\">暂无信息</td></tr>"; |
| | | PoolID = @int, |
| | | MobileSegMent = SegmentHelper.Filrate(@string) |
| | | })) |
| | | return new JsonPageResult(true, (object) "号段修改成功"); |
| | | return new JsonPageResult(false, (object) "添加号段失败"); |
| | | } |
| | | return new JsonPageResult(true, (object) new |
| | | |
| | | private JsonPageResult GetMobileSegment(PageContext<SysUser> context) |
| | | { |
| | | Table = str.ToString(), |
| | | TotalCount = recordcount |
| | | }); |
| | | } |
| | | |
| | | private JsonPageResult Save(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("poolName"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("黑名单池名称不能为空!"); |
| | | if (this._GwBlackPoolDao.IsExitsPoolName(@string)) |
| | | throw new ArgumentException("黑名单池名称已存在!"); |
| | | this._GwBlackPoolDao.Add(new GwBlackPool() |
| | | { |
| | | PoolName = @string |
| | | }); |
| | | return new JsonPageResult(true, (object) "创建黑名单池成功!"); |
| | | } |
| | | |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | int @int = context.GetInt("poolID"); |
| | | string @string = context.GetString("poolName"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("黑名单池名称不能为空!"); |
| | | if (this._GwBlackPoolDao.IsExitsPoolName(@string, @int)) |
| | | throw new ArgumentException("黑名单池名称已存在!"); |
| | | this._GwBlackPoolDao.Update(new GwBlackPool() |
| | | { |
| | | PoolID = @int, |
| | | PoolName = @string |
| | | }); |
| | | return new JsonPageResult(true, (object) "修改黑名单池成功!"); |
| | | } |
| | | |
| | | private JsonPageResult DeletePool(PageContext<SysUser> context) |
| | | { |
| | | int @int = context.GetInt("poolID"); |
| | | if (this._GwBlackPoolDao.IsGwOpPortExits(@int)) |
| | | throw new Exception("通道信息配置中正在使用该黑名单池,不能删除!"); |
| | | this._GwBlackPoolDao.DeleteMobile(@int); |
| | | return new JsonPageResult(true, (object) "删除黑名单池成功!"); |
| | | } |
| | | |
| | | |
| | | // 清除黑名单数据成功 |
| | | |
| | | private JsonPageResult truntateBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | this._GwBlackPoolDao.truntateBlackMobile(); |
| | | |
| | | return new JsonPageResult(true,"清除全部黑名单号码成功!"); |
| | | } |
| | | // 清除黑名单数据成功END |
| | | |
| | | |
| | | private JsonPageResult GetGwBlackPool(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, (object) this._GwBlackPoolDao.GetGwBlackPool(context.GetInt("poolID"))); |
| | | } |
| | | |
| | | private JsonPageResult LoadGwBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | string string1 = context.GetString("blackpool"); |
| | | string string2 = context.GetString("mobile"); |
| | | if (string.IsNullOrEmpty(string2)) |
| | | throw new ArgumentException("手机号码不能为空!"); |
| | | string str = ""; |
| | | using (GwBlackPoolDao gwBlackPoolDao = new GwBlackPoolDao()) |
| | | { |
| | | List<GwBlackPool> list = gwBlackPoolDao.LoadInfoList(string1, string2); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | foreach (GwBlackPool gwBlackPool in list) |
| | | { |
| | | str = str + (object) "<tr ><td>" + gwBlackPool.Mobile + "</td><td>" + gwBlackPool.PoolName + "</td><td>" + (object) gwBlackPool.ModifyTime + "</td>"; |
| | | str += "<td>"; |
| | | str += string.Format("<a class=\"action-mobile-delete btnbtn btn btn-default btn-xs\" href=\"javascript:;\" data-id=\"{0}\" data-moblie=\"{1}\">", (object) gwBlackPool.BlackPoolID, (object) gwBlackPool.Mobile); |
| | | str += "<i class='fa fa-trash'></i> 删除"; |
| | | str += "</a>"; |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"4\" style=\"text-align: center;\">暂无信息</td></tr>"; |
| | | return new JsonPageResult(true, (object) new GwBlackPoolDao().GetGwBlackPool(context.GetInt("pid"))); |
| | | } |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Table = str.ToString() |
| | | }); |
| | | } |
| | | |
| | | private JsonPageResult AddGwBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | string string1 = context.GetString("blackpool"); |
| | | string string2 = context.GetString("mobile"); |
| | | if (string.IsNullOrEmpty(string1)) |
| | | throw new ArgumentException("黑名单池不能为空!"); |
| | | if (string.IsNullOrEmpty(string2)) |
| | | throw new ArgumentException("手机号码不能为空!"); |
| | | if (!this._GwBlackPoolDao.IsPortExits(Convert.ToInt32(string1), string2)) |
| | | throw new Exception("黑名单号码已存在!"); |
| | | this._GwBlackPoolDao.AddMobile(Convert.ToInt32(string1), string2); |
| | | return new JsonPageResult(true, (object) "新增黑名单号码成功!"); |
| | | } |
| | | |
| | | private JsonPageResult DeleteMobile(PageContext<SysUser> context) |
| | | { |
| | | this._GwBlackPoolDao.DeleteMobile(context.GetInt("poolID"), context.GetString("mobile")); |
| | | return new JsonPageResult(true, (object) "删除黑名单号码成功!"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private JsonPageResult ZipImportBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | HttpPostedFile httpPostedFile = context.Files["certPath"]; |
| | | if (httpPostedFile == null || httpPostedFile.FileName == "") |
| | | throw new Exception("请选择要导入的zip文件,并检查文件大小!"); |
| | | string extension = Path.GetExtension(httpPostedFile.FileName); |
| | | if (!extension.Equals(".zip", StringComparison.OrdinalIgnoreCase) && !extension.Equals(".txt", StringComparison.OrdinalIgnoreCase)) |
| | | throw new Exception("导入文件格式不正确,只允许导入zip或txt文件!"); |
| | | if (httpPostedFile.ContentLength > 104857600) |
| | | throw new Exception("文件上传不能超过100M,请检查文件大小,是否有写权限!"); |
| | | string @string = context.GetString("ablackpool"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new Exception("请选择黑名单池!"); |
| | | List<Stream> outputStreamList = new List<Stream>(); |
| | | if (extension.Equals(".txt", StringComparison.OrdinalIgnoreCase)) |
| | | outputStreamList.Add(httpPostedFile.InputStream); |
| | | else if (extension.Equals(".zip", StringComparison.OrdinalIgnoreCase)) |
| | | ZipUtils.Decompression(httpPostedFile.InputStream, ref outputStreamList, true); |
| | | HashSet<string> blackPoolMobile = this._GwBlackPoolDao.GetBlackPoolMobile(Convert.ToInt32(@string.ToString())); |
| | | HashSet<string> tempSet = new HashSet<string>(); |
| | | DataTable dt = new DataTable("GW_BLACKPOOL_MOBILE"); |
| | | dt.Columns.Add("MOBILE", typeof (string)); |
| | | DateTime now = DateTime.Now; |
| | | DataColumn column1 = new DataColumn("BLACKPOOL_ID", typeof (int)); |
| | | DataColumn column2 = new DataColumn("MODIFY_TIME", typeof (DateTime)); |
| | | DataColumn column3 = new DataColumn("IS_DELETED", typeof (int)); |
| | | column1.DefaultValue = (object) @string; |
| | | column2.DefaultValue = (object) now; |
| | | column3.DefaultValue = (object) 0; |
| | | dt.Columns.Add(column1); |
| | | dt.Columns.Add(column2); |
| | | dt.Columns.Add(column3); |
| | | StringBuilder errorBuilder = new StringBuilder(); |
| | | int count = 0; |
| | | foreach (Stream stream in outputStreamList) |
| | | private JsonPageResult LoadGwBlackPool(PageContext<SysUser> context) |
| | | { |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | count += this.ProcessStream(blackPoolMobile, tempSet, dt, errorBuilder, stream); |
| | | } |
| | | int num = this.SaveDataTable(dt, now, count); |
| | | stopwatch.Stop(); |
| | | string str = "数量:" + (object) num + "个,耗时:" + (object) stopwatch.ElapsedMilliseconds + "ms"; |
| | | if (errorBuilder.Length > 0) |
| | | str = str + ",错误号码包含:" + errorBuilder.ToString(); |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Message = "全局黑名单导入成功!", |
| | | Msg = str |
| | | }); |
| | | } |
| | | |
| | | private int SaveDataTable(DataTable dt, DateTime dtime, int count) |
| | | { |
| | | if (dt != null) |
| | | { |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | try |
| | | string @string = context.GetString("poolName"); |
| | | int recordcount = 0; |
| | | int int1 = context.GetInt("pageIndex", 1); |
| | | int int2 = context.GetInt("pageSize", 20); |
| | | string str = ""; |
| | | using (GwBlackPoolDao gwBlackPoolDao = new GwBlackPoolDao()) |
| | | { |
| | | this._GwBlackPoolDao.Import(dt); |
| | | this._GwBlackPoolDao.Add_EventLog(dtime); |
| | | count += dt.Rows.Count; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("写入数据出错:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | private int ProcessStream(HashSet<string> existsSet, HashSet<string> tempSet, DataTable dt, StringBuilder errorBuilder, Stream stream) |
| | | { |
| | | int count = 0; |
| | | using (StreamReader streamReader = new StreamReader(stream, Encoding.Default)) |
| | | { |
| | | Regex regex = new Regex("^1[34578]\\d{9}$"); |
| | | int num = 0; |
| | | while (!streamReader.EndOfStream) |
| | | { |
| | | string str1; |
| | | try |
| | | { |
| | | str1 = streamReader.ReadLine(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("读取文件出错,手机号码请换行!"); |
| | | } |
| | | if (!string.IsNullOrEmpty(str1)) |
| | | { |
| | | string[] strArray; |
| | | try |
| | | { |
| | | strArray = str1.Split(new char[8] |
| | | List<GwBlackPool> list = gwBlackPoolDao.LoadInfoList(@string, out recordcount, int1, int2); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | foreach (GwBlackPool gwBlackPool in list) |
| | | { |
| | | str = str + (object) "<tr ><td>" + gwBlackPool.PoolName + "</td><td>" + (object) gwBlackPool.BlackPoolID + "</td>"; |
| | | str += "<td>"; |
| | | str += string.Format("<a class=\"btn btn-xs btn-primary btn-poolmobile\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += " 查询</a> "; |
| | | str += string.Format("<a class=\"btn btn-xs btn-primary btn-mobile-segment\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class=\"fa fa-edit\"></i> 黑名单号段</a> "; |
| | | str += string.Format("<a class=\"action-txtimportBlack btn btn-info btn-xs \" href=\"javascript:;\" data-id=\"{0}\" data-name=\"{1}\">", (object) gwBlackPool.PoolID, (object) gwBlackPool.PoolName); |
| | | str += " 黑名单导入</a> "; |
| | | if (gwBlackPool.PoolID > 0) |
| | | { |
| | | str += string.Format("<a class=\"action-modal-edit btn btn-success btn-xs \" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class='fa fa-edit'></i> 编辑"; |
| | | str += "</a> "; |
| | | str += string.Format("<a class=\"action-delete btnbtn btn btn-default btn-xs\" href=\"javascript:;\" data-id=\"{0}\">", (object) gwBlackPool.PoolID); |
| | | str += "<i class='fa fa-trash'></i> 删除"; |
| | | str += "</a> "; |
| | | } |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"3\" style=\"text-align: center;\">暂无信息</td></tr>"; |
| | | } |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Table = str.ToString(), |
| | | TotalCount = recordcount |
| | | }); |
| | | } |
| | | |
| | | private JsonPageResult Save(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("poolName"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("黑名单池名称不能为空!"); |
| | | if (this._GwBlackPoolDao.IsExitsPoolName(@string)) |
| | | throw new ArgumentException("黑名单池名称已存在!"); |
| | | this._GwBlackPoolDao.Add(new GwBlackPool() |
| | | { |
| | | PoolName = @string |
| | | }); |
| | | return new JsonPageResult(true, (object) "创建黑名单池成功!"); |
| | | } |
| | | |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | int @int = context.GetInt("poolID"); |
| | | string @string = context.GetString("poolName"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("黑名单池名称不能为空!"); |
| | | if (this._GwBlackPoolDao.IsExitsPoolName(@string, @int)) |
| | | throw new ArgumentException("黑名单池名称已存在!"); |
| | | this._GwBlackPoolDao.Update(new GwBlackPool() |
| | | { |
| | | PoolID = @int, |
| | | PoolName = @string |
| | | }); |
| | | return new JsonPageResult(true, (object) "修改黑名单池成功!"); |
| | | } |
| | | |
| | | private JsonPageResult DeletePool(PageContext<SysUser> context) |
| | | { |
| | | int @int = context.GetInt("poolID"); |
| | | if (this._GwBlackPoolDao.IsGwOpPortExits(@int)) |
| | | throw new Exception("通道信息配置中正在使用该黑名单池,不能删除!"); |
| | | this._GwBlackPoolDao.DeleteMobile(@int); |
| | | return new JsonPageResult(true, (object) "删除黑名单池成功!"); |
| | | } |
| | | |
| | | |
| | | // 清除黑名单数据成功 |
| | | |
| | | private JsonPageResult truntateBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | this._GwBlackPoolDao.truntateBlackMobile(); |
| | | |
| | | return new JsonPageResult(true,"清除全部黑名单号码成功!"); |
| | | } |
| | | // 清除黑名单数据成功END |
| | | |
| | | |
| | | private JsonPageResult GetGwBlackPool(PageContext<SysUser> context) |
| | | { |
| | | return new JsonPageResult(true, (object) this._GwBlackPoolDao.GetGwBlackPool(context.GetInt("poolID"))); |
| | | } |
| | | |
| | | private JsonPageResult LoadGwBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | string string1 = context.GetString("blackpool"); |
| | | string string2 = context.GetString("mobile"); |
| | | if (string.IsNullOrEmpty(string2)) |
| | | throw new ArgumentException("手机号码不能为空!"); |
| | | string str = ""; |
| | | using (GwBlackPoolDao gwBlackPoolDao = new GwBlackPoolDao()) |
| | | { |
| | | List<GwBlackPool> list = gwBlackPoolDao.LoadInfoList(string1, string2); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | foreach (GwBlackPool gwBlackPool in list) |
| | | { |
| | | str = str + (object) "<tr ><td>" + gwBlackPool.Mobile + "</td><td>" + gwBlackPool.PoolName + "</td><td>" + (object) gwBlackPool.ModifyTime + "</td>"; |
| | | str += "<td>"; |
| | | str += string.Format("<a class=\"action-mobile-delete btnbtn btn btn-default btn-xs\" href=\"javascript:;\" data-id=\"{0}\" data-moblie=\"{1}\">", (object) gwBlackPool.BlackPoolID, (object) gwBlackPool.Mobile); |
| | | str += "<i class='fa fa-trash'></i> 删除"; |
| | | str += "</a>"; |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"4\" style=\"text-align: center;\">暂无信息</td></tr>"; |
| | | } |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Table = str.ToString() |
| | | }); |
| | | } |
| | | |
| | | private JsonPageResult AddGwBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | string string1 = context.GetString("blackpool"); |
| | | string string2 = context.GetString("mobile"); |
| | | if (string.IsNullOrEmpty(string1)) |
| | | throw new ArgumentException("黑名单池不能为空!"); |
| | | if (string.IsNullOrEmpty(string2)) |
| | | throw new ArgumentException("手机号码不能为空!"); |
| | | if (!this._GwBlackPoolDao.IsPortExits(Convert.ToInt32(string1), string2)) |
| | | throw new Exception("黑名单号码已存在!"); |
| | | this._GwBlackPoolDao.AddMobile(Convert.ToInt32(string1), string2); |
| | | return new JsonPageResult(true, (object) "新增黑名单号码成功!"); |
| | | } |
| | | |
| | | private JsonPageResult DeleteMobile(PageContext<SysUser> context) |
| | | { |
| | | this._GwBlackPoolDao.DeleteMobile(context.GetInt("poolID"), context.GetString("mobile")); |
| | | return new JsonPageResult(true, (object) "删除黑名单号码成功!"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private JsonPageResult ZipImportBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | HttpPostedFile httpPostedFile = context.Files["certPath"]; |
| | | if (httpPostedFile == null || httpPostedFile.FileName == "") |
| | | throw new Exception("请选择要导入的zip文件,并检查文件大小!"); |
| | | string extension = Path.GetExtension(httpPostedFile.FileName); |
| | | if (!extension.Equals(".zip", StringComparison.OrdinalIgnoreCase) && !extension.Equals(".txt", StringComparison.OrdinalIgnoreCase)) |
| | | throw new Exception("导入文件格式不正确,只允许导入zip或txt文件!"); |
| | | if (httpPostedFile.ContentLength > 104857600) |
| | | throw new Exception("文件上传不能超过100M,请检查文件大小,是否有写权限!"); |
| | | string @string = context.GetString("ablackpool"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new Exception("请选择黑名单池!"); |
| | | List<Stream> outputStreamList = new List<Stream>(); |
| | | if (extension.Equals(".txt", StringComparison.OrdinalIgnoreCase)) |
| | | outputStreamList.Add(httpPostedFile.InputStream); |
| | | else if (extension.Equals(".zip", StringComparison.OrdinalIgnoreCase)) |
| | | ZipUtils.Decompression(httpPostedFile.InputStream, ref outputStreamList, true); |
| | | HashSet<string> blackPoolMobile = this._GwBlackPoolDao.GetBlackPoolMobile(Convert.ToInt32(@string.ToString())); |
| | | HashSet<string> tempSet = new HashSet<string>(); |
| | | DataTable dt = new DataTable("GW_BLACKPOOL_MOBILE"); |
| | | dt.Columns.Add("MOBILE", typeof (string)); |
| | | DateTime now = DateTime.Now; |
| | | DataColumn column1 = new DataColumn("BLACKPOOL_ID", typeof (int)); |
| | | DataColumn column2 = new DataColumn("MODIFY_TIME", typeof (DateTime)); |
| | | DataColumn column3 = new DataColumn("IS_DELETED", typeof (int)); |
| | | column1.DefaultValue = (object) @string; |
| | | column2.DefaultValue = (object) now; |
| | | column3.DefaultValue = (object) 0; |
| | | dt.Columns.Add(column1); |
| | | dt.Columns.Add(column2); |
| | | dt.Columns.Add(column3); |
| | | StringBuilder errorBuilder = new StringBuilder(); |
| | | int count = 0; |
| | | foreach (Stream stream in outputStreamList) |
| | | { |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | count += this.ProcessStream(blackPoolMobile, tempSet, dt, errorBuilder, stream); |
| | | } |
| | | int num = this.SaveDataTable(dt, now, count); |
| | | stopwatch.Stop(); |
| | | string str = "数量:" + (object) num + "个,耗时:" + (object) stopwatch.ElapsedMilliseconds + "ms"; |
| | | if (errorBuilder.Length > 0) |
| | | str = str + ",错误号码包含:" + errorBuilder.ToString(); |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Message = "全局黑名单导入成功!", |
| | | Msg = str |
| | | }); |
| | | } |
| | | |
| | | private int SaveDataTable(DataTable dt, DateTime dtime, int count) |
| | | { |
| | | if (dt != null) |
| | | { |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | try |
| | | { |
| | | this._GwBlackPoolDao.Import(dt); |
| | | this._GwBlackPoolDao.Add_EventLog(dtime); |
| | | count += dt.Rows.Count; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("写入数据出错:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | private int ProcessStream(HashSet<string> existsSet, HashSet<string> tempSet, DataTable dt, StringBuilder errorBuilder, Stream stream) |
| | | { |
| | | int count = 0; |
| | | using (StreamReader streamReader = new StreamReader(stream, Encoding.Default)) |
| | | { |
| | | Regex regex = new Regex("^1[34578]\\d{9}$"); |
| | | int num = 0; |
| | | while (!streamReader.EndOfStream) |
| | | { |
| | | string str1; |
| | | try |
| | | { |
| | | str1 = streamReader.ReadLine(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("读取文件出错,手机号码请换行!"); |
| | | } |
| | | if (!string.IsNullOrEmpty(str1)) |
| | | { |
| | | string[] strArray; |
| | | try |
| | | { |
| | | strArray = str1.Split(new char[8] |
| | | { |
| | | '\r', |
| | | '\n', |
| | | ',', |
| | |
| | | '|', |
| | | ';', |
| | | ',' |
| | | }, StringSplitOptions.RemoveEmptyEntries); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("分割手机号码出错!"); |
| | | } |
| | | foreach (string str2 in strArray) |
| | | { |
| | | string input = str2.Trim(); |
| | | if (!regex.IsMatch(input)) |
| | | errorBuilder.AppendFormat("{0};", (object) input); |
| | | else if (!existsSet.Contains(input) && !tempSet.Contains(input)) |
| | | { |
| | | ++num; |
| | | DataRow row = dt.NewRow(); |
| | | row["MOBILE"] = (object) input; |
| | | dt.Rows.Add(row); |
| | | tempSet.Add(input); |
| | | }, StringSplitOptions.RemoveEmptyEntries); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("分割手机号码出错!"); |
| | | } |
| | | foreach (string str2 in strArray) |
| | | { |
| | | string input = str2.Trim(); |
| | | if (!regex.IsMatch(input)) |
| | | errorBuilder.AppendFormat("{0};", (object) input); |
| | | else if (!existsSet.Contains(input) && !tempSet.Contains(input)) |
| | | { |
| | | ++num; |
| | | DataRow row = dt.NewRow(); |
| | | row["MOBILE"] = (object) input; |
| | | dt.Rows.Add(row); |
| | | tempSet.Add(input); |
| | | } |
| | | if (num == 1000000) |
| | | { |
| | | count = this.SaveDataTable(dt, DateTime.Now, count); |
| | | num = 0; |
| | | dt.Clear(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (num == 1000000) |
| | | { |
| | | count = this.SaveDataTable(dt, DateTime.Now, count); |
| | | num = 0; |
| | | dt.Clear(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | private JsonPageResult TxtImportBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | HttpPostedFile httpPostedFile = context.Files["certPath"]; |
| | | if (httpPostedFile == null) |
| | | throw new Exception("未选择文件或上传文件超过10M!"); |
| | | if (httpPostedFile.FileName == "") |
| | | throw new Exception("请选择要导入的txt文件!"); |
| | | string extension = Path.GetExtension(httpPostedFile.FileName); |
| | | if (!extension.Equals(".txt") && !extension.Equals(".TXT")) |
| | | throw new Exception("导入文件格式不正确,只允许导入txt文件!"); |
| | | if (httpPostedFile.ContentLength > 10485760) |
| | | throw new Exception("文件上传不能超过10M,请检查文件大小,是否有写权限!"); |
| | | string @string = context.GetString("ablackpool"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new Exception("请选择黑名单池!"); |
| | | HashSet<string> blackPoolMobile = this._GwBlackPoolDao.GetBlackPoolMobile(Convert.ToInt32(@string.ToString())); |
| | | HashSet<string> hashSet = new HashSet<string>(); |
| | | DataTable dt = new DataTable("GW_BLACKPOOL_MOBILE"); |
| | | dt.Columns.Add("MOBILE", typeof (string)); |
| | | DateTime dtime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | DataColumn column1 = new DataColumn("BLACKPOOL_ID", typeof (int)); |
| | | DataColumn column2 = new DataColumn("MODIFY_TIME", typeof (DateTime)); |
| | | DataColumn column3 = new DataColumn("IS_DELETED", typeof (int)); |
| | | column1.DefaultValue = (object) @string; |
| | | column2.DefaultValue = (object) dtime; |
| | | column3.DefaultValue = (object) 0; |
| | | dt.Columns.Add(column1); |
| | | dt.Columns.Add(column2); |
| | | dt.Columns.Add(column3); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (StreamReader streamReader = new StreamReader(httpPostedFile.InputStream, Encoding.Default)) |
| | | private JsonPageResult TxtImportBlackMobile(PageContext<SysUser> context) |
| | | { |
| | | Regex regex = new Regex("^1[34578]\\d{9}$"); |
| | | string str1 = streamReader.ReadToEnd(); |
| | | if (!string.IsNullOrEmpty(str1)) |
| | | { |
| | | string str2 = str1; |
| | | char[] separator = new char[6] |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | HttpPostedFile httpPostedFile = context.Files["certPath"]; |
| | | if (httpPostedFile == null) |
| | | throw new Exception("未选择文件或上传文件超过10M!"); |
| | | if (httpPostedFile.FileName == "") |
| | | throw new Exception("请选择要导入的txt文件!"); |
| | | string extension = Path.GetExtension(httpPostedFile.FileName); |
| | | if (!extension.Equals(".txt") && !extension.Equals(".TXT")) |
| | | throw new Exception("导入文件格式不正确,只允许导入txt文件!"); |
| | | if (httpPostedFile.ContentLength > 10485760) |
| | | throw new Exception("文件上传不能超过10M,请检查文件大小,是否有写权限!"); |
| | | string @string = context.GetString("ablackpool"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new Exception("请选择黑名单池!"); |
| | | HashSet<string> blackPoolMobile = this._GwBlackPoolDao.GetBlackPoolMobile(Convert.ToInt32(@string.ToString())); |
| | | HashSet<string> hashSet = new HashSet<string>(); |
| | | DataTable dt = new DataTable("GW_BLACKPOOL_MOBILE"); |
| | | dt.Columns.Add("MOBILE", typeof (string)); |
| | | DateTime dtime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
| | | DataColumn column1 = new DataColumn("BLACKPOOL_ID", typeof (int)); |
| | | DataColumn column2 = new DataColumn("MODIFY_TIME", typeof (DateTime)); |
| | | DataColumn column3 = new DataColumn("IS_DELETED", typeof (int)); |
| | | column1.DefaultValue = (object) @string; |
| | | column2.DefaultValue = (object) dtime; |
| | | column3.DefaultValue = (object) 0; |
| | | dt.Columns.Add(column1); |
| | | dt.Columns.Add(column2); |
| | | dt.Columns.Add(column3); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | using (StreamReader streamReader = new StreamReader(httpPostedFile.InputStream, Encoding.Default)) |
| | | { |
| | | Regex regex = new Regex("^1[34578]\\d{9}$"); |
| | | string str1 = streamReader.ReadToEnd(); |
| | | if (!string.IsNullOrEmpty(str1)) |
| | | { |
| | | string str2 = str1; |
| | | char[] separator = new char[6] |
| | | { |
| | | '\r', |
| | | '\n', |
| | | ',', |
| | | ';', |
| | | ' ', |
| | | '|' |
| | | }; |
| | | int num = 1; |
| | | foreach (string str3 in str2.Split(separator, (StringSplitOptions) num)) |
| | | { |
| | | string input = str3.Trim(); |
| | | if (!regex.IsMatch(input)) |
| | | stringBuilder.AppendFormat("{0};", (object) input); |
| | | else if (!blackPoolMobile.Contains(input) && !hashSet.Contains(input)) |
| | | { |
| | | DataRow row = dt.NewRow(); |
| | | row["MOBILE"] = (object) input; |
| | | dt.Rows.Add(row); |
| | | hashSet.Add(input); |
| | | } |
| | | }; |
| | | int num = 1; |
| | | foreach (string str3 in str2.Split(separator, (StringSplitOptions) num)) |
| | | { |
| | | string input = str3.Trim(); |
| | | if (!regex.IsMatch(input)) |
| | | stringBuilder.AppendFormat("{0};", (object) input); |
| | | else if (!blackPoolMobile.Contains(input) && !hashSet.Contains(input)) |
| | | { |
| | | DataRow row = dt.NewRow(); |
| | | row["MOBILE"] = (object) input; |
| | | dt.Rows.Add(row); |
| | | hashSet.Add(input); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | int num1 = 0; |
| | | if (dt != null) |
| | | { |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | try |
| | | { |
| | | num1 = this._GwBlackPoolDao.Import(dt, dtime); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("写入数据出错:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | stopwatch.Stop(); |
| | | string str = "数量:" + (object) num1 + "个,耗时:" + (object) stopwatch.ElapsedMilliseconds + "ms"; |
| | | if (stringBuilder.Length > 0) |
| | | str = str + ",错误号码包含:" + stringBuilder.ToString(); |
| | | "".TrimEnd(','); |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Message = "全局黑名单导入成功!", |
| | | Msg = str |
| | | }); |
| | | } |
| | | int num1 = 0; |
| | | if (dt != null) |
| | | { |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | try |
| | | { |
| | | num1 = this._GwBlackPoolDao.Import(dt, dtime); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception("写入数据出错:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | stopwatch.Stop(); |
| | | string str = "数量:" + (object) num1 + "个,耗时:" + (object) stopwatch.ElapsedMilliseconds + "ms"; |
| | | if (stringBuilder.Length > 0) |
| | | str = str + ",错误号码包含:" + stringBuilder.ToString(); |
| | | "".TrimEnd(','); |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Message = "全局黑名单导入成功!", |
| | | Msg = str |
| | | }); |
| | | } |
| | | } |
New file |
| | |
| | | <%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="GwClientSub.aspx.cs" Inherits="_GwClient" %> |
| | | |
| | | <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> |
| | | <script type="text/javascript" src="/web/js/jquery.min.js?v=2.1.4"></script> |
| | | <%--<link href="css/plugins/bootstrap-fileinput/fileinput.min.css" rel="stylesheet"/> |
| | | <script src="js/plugins/bootstrap-fileinput/fileinput.min.js" type="text/javascript"></script>--%> |
| | | <script type="text/javascript"> |
| | | $(document).ready(function () { |
| | | $("textarea").numberedtextarea(); |
| | | |
| | | //全选 |
| | | $("#checkAll").click(function () { |
| | | $("input[name='checkbox']").prop("checked", $(this).is(":checked")); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-query", function () { |
| | | loadPageList(); |
| | | }); |
| | | loadPageList(); |
| | | |
| | | $(document).on("click", ".action-modal-create", function () { |
| | | $("#clientDialog .modal-title").text("创建客户信息"); |
| | | $("#clientDialog input").attr("readonly", false); |
| | | $("#clientDialog input[name=action]").val("save"); |
| | | |
| | | //$("#clientDialog #id").val(""); |
| | | $("#clientDialog #clientID").val(""); |
| | | $("#clientDialog #company").val(""); |
| | | $("#clientDialog #clientName").val(""); |
| | | $("#clientDialog #agent").val(""); |
| | | $("#clientDialog #address").val(""); |
| | | $("#clientDialog #telephone").val(""); |
| | | $("#clientDialog #chargeType").val(""); |
| | | $("#clientDialog #smsStatusReport").val(""); |
| | | $("#clientDialog #mmsStatusReport").val(""); |
| | | $("#clientDialog #customerManager").val(""); |
| | | $("#clientDialog #salesman").val(""); |
| | | $("#clientDialog #supportStaff").val(""); |
| | | $("#clientDialog #financialStaff").val(""); |
| | | $("#clientDialog #remark").val(""); |
| | | $("#clientDialog input[name=permissionData]").iCheck("uncheck"); |
| | | |
| | | $("#clientDialog input[name=isEnableWhite][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isEnableBlack][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isRemoteLoginNotice][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isMobileCaptcha][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isHideMobile][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isDisplayStatus][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog input[name=isLoginIpRestrict][value='" + 0 + "']").iCheck("check"); |
| | | |
| | | $("#clientDialog #isLoginIpAllowGather").val(""); |
| | | $("#clientDialog input[name=isLoginCityRestrict][value='" + 0 + "']").iCheck("check"); |
| | | $("#clientDialog #isLoginCityAllowGather").val(""); |
| | | |
| | | $("#clientDialog").modal("show"); |
| | | |
| | | //刷新一次随机密码 |
| | | $("#password").val(randomString(8)); |
| | | |
| | | $(".pwdCss").show(); |
| | | |
| | | }); |
| | | |
| | | //编辑 |
| | | $(document).on("click", ".action-modal-edit", function () { |
| | | $("#clientDialog .modal-title").text("修改客户资料"); |
| | | $("#clientDialog input[name=action]").val("update"); |
| | | var id = $(this).data("id"); |
| | | $.get("gwclient.ashx?action=get", { clientID: id }, function (r) { |
| | | if (r.OK) { |
| | | try { |
| | | $("#clientDialog #id").val(r.Message.Id); |
| | | $("#clientDialog #clientID").val(r.Message.ClientID); |
| | | $("#clientDialog #company").val(r.Message.Company); |
| | | //$("#clientDialog #password").val(r.Message.Password); |
| | | $("#clientDialog #password").val(""); |
| | | //编辑时密码框隐藏 |
| | | $(".pwdCss").hide(); |
| | | |
| | | $("#clientDialog #clientName").val(r.Message.ClientName); |
| | | $("#clientDialog #agent").val(r.Message.Agent); |
| | | $("#clientDialog #address").val(r.Message.Address); |
| | | $("#clientDialog #telephone").val(r.Message.Telephone); |
| | | $("#clientDialog #chargeType").val(r.Message.ChargeType); |
| | | $("#clientDialog #smsStatusReport").val(r.Message.SmsStatusReport); |
| | | $("#clientDialog #mmsStatusReport").val(r.Message.MmsStatusReport); |
| | | $("#clientDialog #customerManager").val(r.Message.CustomerManager); |
| | | $("#clientDialog #salesman").val(r.Message.Salesman); |
| | | $("#clientDialog #supportStaff").val(r.Message.SupportStaff); |
| | | $("#clientDialog #financialStaff").val(r.Message.FinancialStaff); |
| | | $("#clientDialog #remark").val(r.Message.Remark); |
| | | var permissionData = $.evalJSON(r.Message.PermissionData); |
| | | $("#clientDialog input[name=permissionData]").iCheck("uncheck"); |
| | | $.each(permissionData, function (i) { |
| | | $("#clientDialog input[name=permissionData][value='" + this + "']").iCheck("check"); |
| | | }); |
| | | |
| | | //$("#clientDialog #isEnableWhite").val(r.Message.IsEnableWhite); |
| | | $("#clientDialog input[name=isEnableWhite]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isEnableWhite][value='" + r.Message.IsEnableWhite + "']").iCheck("check"); |
| | | |
| | | //$("#clientDialog #isEnableBlack").val(r.Message.IsEnableBlack); |
| | | $("#clientDialog input[name=isEnableBlack]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isEnableBlack][value='" + r.Message.IsEnableBlack + "']").iCheck("check"); |
| | | //$("#clientDialog #isRemoteLoginNotice").val(r.Message.IsRemoteLoginNotice); |
| | | $("#clientDialog input[name=isRemoteLoginNotice]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isRemoteLoginNotice][value='" + r.Message.IsRemoteLoginNotice + "']").iCheck("check"); |
| | | //$("#clientDialog #isMobileCaptcha").val(r.Message.IsMobileCaptcha); |
| | | $("#clientDialog input[name=isMobileCaptcha]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isMobileCaptcha][value='" + r.Message.IsMobileCaptcha + "']").iCheck("check"); |
| | | //$("#clientDialog #isHideMobile").val(r.Message.IsHideMobile); |
| | | $("#clientDialog input[name=isHideMobile]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isHideMobile][value='" + r.Message.IsHideMobile + "']").iCheck("check"); |
| | | //$("#clientDialog #isDisplayStatus").val(r.Message.IsDisplayStatus); |
| | | $("#clientDialog input[name=isDisplayStatus]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isDisplayStatus][value='" + r.Message.IsDisplayStatus + "']").iCheck("check"); |
| | | //$("#clientDialog #isLoginIpRestrict").val(r.Message.IsLoginIpRestrict); |
| | | $("#clientDialog input[name=isLoginIpRestrict]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isLoginIpRestrict][value='" + r.Message.IsLoginIpRestrict + "']").iCheck("check"); |
| | | |
| | | $("#clientDialog #isLoginIpAllowGather").val(r.Message.IsLoginIpAllowGather); |
| | | //$("#clientDialog #isLoginCityRestrict").val(r.Message.IsLoginCityRestrict); |
| | | $("#clientDialog input[name=isLoginCityRestrict]").iCheck("uncheck"); |
| | | $("#clientDialog input[name=isLoginCityRestrict][value='" + r.Message.IsLoginCityRestrict + "']").iCheck("check"); |
| | | $("#clientDialog #isLoginCityAllowGather").val(r.Message.IsLoginCityAllowGather); |
| | | } |
| | | catch (e) { |
| | | } |
| | | |
| | | $("#clientDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | }, "json"); |
| | | }); |
| | | |
| | | //免密登录 |
| | | $(document).on("click", ".action-modal-login", function () { |
| | | var url = $(this).data("url"); |
| | | var id = $(this).data("id"); |
| | | |
| | | var milliseconds = new Date().getTime(); //获得当前时间的毫秒值 |
| | | url += "&t=" + milliseconds; |
| | | //console.log(url); |
| | | window.open(url, "_blank"); |
| | | |
| | | |
| | | }); |
| | | |
| | | //黑名单 |
| | | $(document).on("click", ".action-modal-black", function () { |
| | | var id = $(this).data("id"); |
| | | $.get("gwclient.ashx?action=getBlack", { clientID: id }, function (r) { |
| | | if (r.OK) { |
| | | $("#blackDialog input[name='clientID']").val(id); |
| | | $("#blackDialog textarea").val(r.Message); |
| | | $("#blackDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | }, "json"); |
| | | }); |
| | | |
| | | //白名单 |
| | | $(document).on("click", ".action-modal-white", function () { |
| | | var id = $(this).data("id"); |
| | | $.get("gwclient.ashx?action=getWhite", { clientID: id }, function (r) { |
| | | if (r.OK) { |
| | | $("#whiteDialog input[name='clientID']").val(id); |
| | | $("#whiteDialog textarea").val(r.Message); |
| | | $("#whiteDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | }, "json"); |
| | | }); |
| | | |
| | | //面板页提交:隐藏面板(白名单,黑名单,修改密码) |
| | | $("#blackForm, #whiteForm").ajaxForm({ |
| | | success: function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | $("#whiteDialog, #blackDialog").modal("hide"); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //面板页提交:重新加载列表 |
| | | $("#clientForm, #updatePwdForm").ajaxForm({ |
| | | success: function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | r.OK && (window.location.reload()); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //修改密码:打开界面 |
| | | $(document).on("click", ".action-modal-updatePwd", function () { |
| | | //$("#updatePwdDialog .modal-title").text("修改客户资料"); |
| | | $("#updatePwdDialog input[name=action]").val("updatePwd"); |
| | | var id = $(this).data("id"); |
| | | |
| | | $("#updatePwdDialog input[name='clientID']").val(id); |
| | | $("#updatePwdDialog #newPwd").val(""); |
| | | |
| | | $("#updatePwdDialog").modal("show"); |
| | | |
| | | }); |
| | | |
| | | //修改分配个性产品:显示客户对应的分配个性产品 |
| | | $(document).on("click", ".action-modal-updateProduct", function () { |
| | | var clientId = $(this).data("id"); |
| | | $.get("GwClient.ashx", { action: "getPersonalityProduct", clientId: clientId }, function (result) { |
| | | if (!result.OK) { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | else { |
| | | $("#updateProductDialog input[name='clientID']").val(clientId); |
| | | $("#updateProductDialog #_ProductId").prop("checked", false); |
| | | $.each(result.Message, function (i) { |
| | | $("#updateProductDialog #_ProductId[value='" + this + "']").prop("checked", true); |
| | | }); |
| | | } |
| | | $("#updateProductDialog").modal("show"); |
| | | }, "json"); |
| | | }); |
| | | |
| | | //修改分配个性产品:修改确认 |
| | | $(document).on("click", ".action-updateProduct", function () { |
| | | var productIdArray = []; |
| | | //mytek.confirm("是否需要修改客户分配个性产品?", "确认分配个性产品,请谨慎操作!", function (b) { |
| | | //if (b) { |
| | | if (confirm("是否需要修改客户分配个性产品?") == true) { |
| | | $("#updateProductDialog #_ProductId").each(function () { |
| | | if ($(this).is(":checked")) { |
| | | productIdArray.push($(this).val()); |
| | | } |
| | | }); |
| | | |
| | | //var clientId = $("#updateProductDialog").data("id"); |
| | | var clientId = $("#updateProductDialog input[name='clientID']").val(); |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#updateProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //swal.close(); |
| | | //} |
| | | //}); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //充值 |
| | | $(document).on("click", ".action-modal-orderCreate", function () { |
| | | var clientId = $(this).data("id"); //客户账号 |
| | | //window.open("gwOrderCreate.aspx?spId=" + spID, 'gwOrderCreate'); |
| | | window.location.href = "gwOrderCreate.aspx?clientId=" + clientId; |
| | | }); |
| | | |
| | | //充值日志 |
| | | $(document).on("click", ".action-modal-orderLog", function () { |
| | | var clientId = $(this).data("id"); |
| | | window.location.href = "GwOrderList.aspx?clientId=" + clientId + ""; |
| | | }); |
| | | |
| | | //启用或停用 |
| | | $(document).on("click", ".action-modal-updateStatus", function () { |
| | | //data的属性参数不能含有大写字母。 |
| | | var clientId = $(this).data("id"); |
| | | var isEnable = $(this).data("status"); |
| | | var statusMsg = ""; |
| | | if (isEnable == 0) { |
| | | statusMsg = "【停用】"; |
| | | } |
| | | else { |
| | | statusMsg = "【启用】"; |
| | | } |
| | | mytek.confirm("是否需要" + statusMsg + "该信息?", "确认更新信息状态,请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $.post("gwclient.ashx", { "action": "updateStatus", clientId: clientId, isEnable: isEnable }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //删除 |
| | | $(document).on("click", ".action-delete", function () { |
| | | var id = $(this).data("id"); |
| | | mytek.confirm("是否需要删除该客户?", "客户删除后将无法恢复,请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $.post("gwclient.ashx", { action: "delete", clientID: id }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | window.location.reload(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | /** |
| | | //重置密码 |
| | | $(document).on("click", ".action-modal-resetPwd", function () { |
| | | var id = $(this).data("id"); |
| | | mytek.confirm("重置密码?", "是否重置密码?请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $.post("gwclient.ashx", { action: "resetPwd", clientID: id }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | window.location.reload(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | **/ |
| | | |
| | | }) |
| | | |
| | | |
| | | $("#pager").Pager({ |
| | | pageSize: 20, |
| | | onChange: function (pageIndex, pageSize) { |
| | | loadPageList(); |
| | | } |
| | | }); |
| | | |
| | | function loadPageList() { |
| | | var ClientID = $("#ClientID").val(); |
| | | var Company = $("#Company").val(); |
| | | var ClientName = $("#ClientName").val(); |
| | | var Telephone = $("#Telephone").val(); |
| | | //var Agent = $("#Agent").val(); |
| | | var Agent = ""; |
| | | var Salesman = $("#Salesman").val(); |
| | | var SupportStaff = $("#SupportStaff").val(); |
| | | var ProductId = $("#ProductId").val(); |
| | | var IsEnable = <%=IsEnable%>; |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, SupportStaff: SupportStaff, ProductId: ProductId, IsEnable: IsEnable , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#gwclientTable tbody").html(result.Message.Table); |
| | | $("#pager").Pager("setTotalCount", result.Message.TotalCount); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function randomString(len) { |
| | | len = len || 32; |
| | | var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/ |
| | | var maxPos = $chars.length; |
| | | var pwd = ''; |
| | | for (i = 0; i < len; i++) { |
| | | pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); |
| | | } |
| | | return pwd; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //批量分配个性产品:打开界面 |
| | | $(document).on("click", ".action-modal-setProduct", function () { |
| | | var idArray = []; |
| | | |
| | | $("input[name='checkbox']:checkbox:checked").each(function () { |
| | | var id = $(this).val(); |
| | | idArray.push(id); |
| | | }); |
| | | |
| | | if (idArray.length == 0) { |
| | | mytek.alert("请选择要分配个性产品的客户!", false); |
| | | return; |
| | | } |
| | | |
| | | $("#selected-op-box").text(idArray.join(",")); |
| | | |
| | | $("#setProductDialog").modal("show"); |
| | | }); |
| | | |
| | | //批量分配客户个性产品--确认修改 |
| | | $(document).on("click", ".action-update-setProduct", function () { |
| | | var idArray = []; |
| | | |
| | | $("input[name='checkbox']:checkbox:checked").each(function () { |
| | | var id = $(this).val(); |
| | | idArray.push(id); |
| | | }); |
| | | |
| | | if (idArray.length == 0) { |
| | | mytek.alert("请选择要分配个性产品的客户!", false); |
| | | return; |
| | | } |
| | | |
| | | var productId = $("#productId").val(); |
| | | |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | method: "POST", |
| | | data: { idArray: $.toJSON(idArray), productId: productId, action: "batchUpdateClientProduct" }, |
| | | success: function (result) { |
| | | mytek.alert(result.Message, result.OK, function () { |
| | | $("#setProductDialog #productId").val(""); |
| | | $("#setProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //导出数据 |
| | | $(document).on("click", ".action-export", function () { |
| | | var ClientID = $("#ClientID").val(); |
| | | var Company = $("#Company").val(); |
| | | var ClientName = $("#ClientName").val(); |
| | | var Telephone = $("#Telephone").val(); |
| | | //var Agent = $("#Agent").val(); |
| | | var Agent = ""; |
| | | var Salesman = $("#Salesman").val(); |
| | | var SupportStaff = $("#SupportStaff").val(); |
| | | var ProductId = $("#ProductId").val(); |
| | | var IsEnable = <%=IsEnable%>; |
| | | var url = "ExportDocument.aspx?action=exportGwClient&ClientID=" + ClientID + "&Company=" + Company + "&ClientName=" + ClientName + "&Telephone=" + Telephone + "&Agent=" + Agent + "&Salesman=" + Salesman + "&SupportStaff=" + SupportStaff + "&ProductId=" + ProductId + "&IsEnable=" + IsEnable + ""; |
| | | |
| | | window.location.href = url; |
| | | }); |
| | | |
| | | |
| | | //添加客户:生成密码 |
| | | $(document).on("click", ".action-generate-password", function () { |
| | | $("#password").val(randomString(8)); |
| | | }); |
| | | |
| | | //添加客户:复制密码 |
| | | $(document).on("click", ".action-copyPwd", function () { |
| | | var value = $("#password").val(); |
| | | if (value == "") { |
| | | mytek.alert("请生成密码!"); |
| | | return false; |
| | | } |
| | | // for ie |
| | | if (window.clipboardData) { |
| | | window.clipboardData.clearData(); |
| | | window.clipboardData.setData('text', value); |
| | | } |
| | | // for modern browser |
| | | else if (document.execCommand) { |
| | | var element = document.createElement('SPAN'); |
| | | element.textContent = value; |
| | | document.body.appendChild(element); |
| | | if (document.selection) { |
| | | var range = document.body.createTextRange(); |
| | | range.moveToElementText(element); |
| | | range.select(); |
| | | } else if (window.getSelection) { |
| | | var range = document.createRange(); |
| | | range.selectNode(element); |
| | | window.getSelection().removeAllRanges(); |
| | | window.getSelection().addRange(range); |
| | | } |
| | | document.execCommand('copy'); |
| | | element.remove ? element.remove() : element.removeNode(true); |
| | | } |
| | | mytek.alert("复制成功!", true); |
| | | |
| | | }); |
| | | |
| | | //修改密码:生成密码 |
| | | $(document).on("click", ".action-generate-newPwd", function () { |
| | | $("#newPwd").val(randomString(8)); |
| | | }); |
| | | |
| | | //修改密码:复制密码 |
| | | $(document).on("click", ".action-copyNewPwd", function () { |
| | | var value = $("#newPwd").val(); |
| | | if (value == "") { |
| | | mytek.alert("请生成密码!"); |
| | | return false; |
| | | } |
| | | |
| | | // for ie |
| | | if (window.clipboardData) { |
| | | window.clipboardData.clearData(); |
| | | window.clipboardData.setData('text', value); |
| | | } |
| | | // for modern browser |
| | | else if (document.execCommand) { |
| | | var element = document.createElement('SPAN'); |
| | | element.textContent = value; |
| | | document.body.appendChild(element); |
| | | if (document.selection) { |
| | | var range = document.body.createTextRange(); |
| | | range.moveToElementText(element); |
| | | range.select(); |
| | | } else if (window.getSelection) { |
| | | var range = document.createRange(); |
| | | range.selectNode(element); |
| | | window.getSelection().removeAllRanges(); |
| | | window.getSelection().addRange(range); |
| | | } |
| | | document.execCommand('copy'); |
| | | element.remove ? element.remove() : element.removeNode(true); |
| | | } |
| | | mytek.alert("复制成功!", false); |
| | | |
| | | }); |
| | | |
| | | </script> |
| | | </asp:Content> |
| | | <asp:Content ID="Content2" ContentPlaceHolderID="title" runat="Server">客户信息</asp:Content> |
| | | <asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server"> |
| | | <div class="modal inmodal fade" id="whiteDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <form name="whiteForm" method="post" action="gwclient.ashx?action=updateWhite" id="whiteForm" |
| | | class="form-horizontal"> |
| | | <div class="modal-dialog modal-sm"> |
| | | <div class="modal-content "> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title">客户白名单 |
| | | </h4> |
| | | 客户白名单对该客户下所有接入账号均有效<input type="hidden" value="" name="clientID" /> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <span class="help-block m-b-none">每行一个号码,客户白名单内的手机号码将不受每小时下发次数限制; 白名单总数尽量控制2000以内</span> |
| | | </div> |
| | | <div class="form-group"> |
| | | <textarea class="form-control" name="mobileData" rows="6"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-save"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="modal inmodal fade" id="blackDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <form name="blackForm" method="post" action="gwclient.ashx?action=updateBlack" id="blackForm" |
| | | class="form-horizontal"> |
| | | <div class="modal-dialog modal-sm"> |
| | | <div class="modal-content "> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title">客户黑名单 |
| | | </h4> |
| | | 客户黑名单对该客户下所有接入账号均有效<input type="hidden" value="" name="clientID" /> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <span class="help-block m-b-none">每行一个号码,客户黑名单内的手机号码将无法下发短信; 黑名单总数尽量控制2000以内;如需更大黑名单,请使用全局黑名单</span> |
| | | </div> |
| | | <div class="form-group"> |
| | | <textarea class="form-control" name="mobileData" rows="6"> </textarea> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-save"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <!--重置密码或修改密码 --> |
| | | <div class="modal inmodal fade" id="updatePwdDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <form name="updatePwdForm" method="post" action="gwclient.ashx?action=updatePwd" id="updatePwdForm" |
| | | class="form-horizontal"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content "> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title">客户信息密码修改 |
| | | </h4> |
| | | 请先执行【生成密码】后,再执行【复制密码】。 |
| | | </div> |
| | | <div class="modal-body"> |
| | | <input type="hidden" value="" name="clientID" /> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 登录密码 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="password" name="newPwd" id="newPwd" value="" class="form-control" /> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <a class="btn btn-xs btn-primary action-generate-newPwd ">生成密码</a> |
| | | <a class="btn btn-xs btn-success action-copyNewPwd " >复制密码</a> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-save"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | |
| | | <!--创建客户信息面板 --> |
| | | <div class="modal inmodal fade" id="clientDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <form name="clientForm" method="post" action="gwclient.ashx" id="clientForm" class="form-horizontal"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content "> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title">创建/修改客户信息 |
| | | </h4> |
| | | <input name="action" value="add" type="hidden" /> |
| | | <input name="id" id="id" type="hidden" value="" /> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 登录账户 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="clientID" id="clientID" value="" class="form-control" /> |
| | | </div> |
| | | <!--<span class="help-block m-b-none"><i class="fa fa-exclamation-triangle"></i>请输入公司单位名称</span>--> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 公司名称(全称) <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="company" id="company" value="" class="form-control" /> |
| | | </div> |
| | | <!--<span class="help-block m-b-none"><i class="fa fa-exclamation-triangle"></i>请输入公司单位名称</span>--> |
| | | </div> |
| | | |
| | | |
| | | <div class="form-group pwdCss"> |
| | | <label class="control-label col-sm-2"> |
| | | 登录密码 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="password" name="password" id="password" value="123456" class="form-control" /> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <a class="btn btn-xs btn-primary action-generate-password ">生成密码</a> |
| | | <a class="btn btn-xs btn-success action-copyPwd " >复制密码</a> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 联系人 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="clientName" id="clientName" value="" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group "> |
| | | <label class="control-label col-sm-2"> |
| | | 联系电话 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" name="telephone" id="telephone" value="" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 联系地址 |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="address" id="address" value="" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 结费方式 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="chargeType" id="chargeType" class="form-control"> |
| | | <option value="" ></option> |
| | | <option value="1" >预付费</option> |
| | | <option value="2" >后付费</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 短信是否显示状态报告 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="smsStatusReport" id="smsStatusReport" class="form-control"> |
| | | <option value="0" >不显示</option> |
| | | <%--<option value="1" >只显示提交失败为发送失败状态</option>--%> |
| | | <option value="2" >显示</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 归属客户经理 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="customerManager" id="customerManager" class="form-control"> |
| | | <%=customerManagerOptions(0)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 归属业务员 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="salesman" id="salesman" class="form-control"> |
| | | <%=salesmanOptions(0)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 归属客服人员 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="supportStaff" id="supportStaff" class="form-control"> |
| | | <%=supportStaffOptions(0)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 归属财务人员 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select name="financialStaff" id="financialStaff" class="form-control"> |
| | | <%=financialStaffOptions(0)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2">营业执照</label> |
| | | <div class="col-sm-4"> |
| | | <input type="file" name="txt_file" id="txt_file" class="file-loading" /> |
| | | </div> |
| | | </div> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 权限管理 |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input type="checkbox" class="icheck-me" value="GwClientList.aspx" name="permissionData" />代理商管理(*是否支持创建下级代理) |
| | | <!//-- |
| | | <input type="checkbox" class="icheck-me" value="LgSmsDetailReport.aspx" name="permissionData" />查看状态报告 |
| | | <input type="checkbox" class="icheck-me" value="1" name="permissionData" />发送权限 |
| | | <input type="checkbox" class="icheck-me" value="2" name="permissionData" />查看数据权限 |
| | | --//> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否启用白名单 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isEnableWhite" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isEnableWhite" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否启用黑名单 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isEnableBlack" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isEnableBlack" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否异地登录通知 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isRemoteLoginNotice" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isRemoteLoginNotice" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否启用手机验证码 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isMobileCaptcha" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isMobileCaptcha" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否隐藏客户端手机号 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isHideMobile" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isHideMobile" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否显示状态接口 |
| | | </label> |
| | | <div class="col-sm-8"> |
| | | <input type="radio" class="icheck-me" name="isDisplayStatus" value="0" checked="checked" /><label>不显示</label> |
| | | <input type="radio" class="icheck-me" name="isDisplayStatus" value="1" /><label>只显示提交失败为发送失败状态</label> |
| | | <input type="radio" class="icheck-me" name="isDisplayStatus" value="2" /><label>显示全部状态状态</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否启用登录IP限制 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isLoginIpRestrict" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isLoginIpRestrict" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 登录IP允许集合 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <textarea class="form-control" name="isLoginIpAllowGather" id="isLoginIpAllowGather" rows="4" ></textarea> |
| | | <!--<span class="help-block m-b-none">配合是否启用登录IP限制一起使用,多个限制IP时,按半角逗号","分隔。可使用IP段,如:202.203.1.*。</span>--> |
| | | <span class="help-block m-b-none">配合是否启用登录IP限制一起使用,多个限制IP时,每一行为1个IP。可使用IP段,如:202.203.1.*。</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 是否启用登录地区(城市)限制 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <input type="radio" class="icheck-me" name="isLoginCityRestrict" value="0" checked="checked" /><label>禁用</label> |
| | | <input type="radio" class="icheck-me" name="isLoginCityRestrict" value="1" /><label>启用</label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 登录地区(城市)允许集合 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <textarea class="form-control" name="isLoginCityAllowGather" id="isLoginCityAllowGather" rows="4" ></textarea> |
| | | <!--<span class="help-block m-b-none">配合是否启用登录城市限制一起使用,多个限制地区时,按半角逗号","分隔。 </span>--> |
| | | <span class="help-block m-b-none">配合是否启用登录城市限制一起使用,多个限制地区时,每一行为1个地区(城市)。 </span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-2"> |
| | | 备注 |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="remark" id="remark" value="" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-save"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <!-- 条件查询 --> |
| | | <form name="queryForm" method="post" id="queryForm" class="form-inline"> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">客户账户</span> |
| | | <input type="text" name="ClientID" id="ClientID" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">公司名称</span> |
| | | <input type="text" name="Company" id="Company" class=" form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">联系人</span> |
| | | <input type="text" name="ClientName" id="ClientName" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">联系电话</span> |
| | | <input type="text" name="Telephone" id="Telephone" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">归属业务员</span> |
| | | <select name="Salesman" id="Salesman" class="form-control"> |
| | | <%=salesmanOptions(-1)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">归属客服人员</span> |
| | | <select name="SupportStaff" id="SupportStaff" class="form-control"> |
| | | <%=supportStaffOptions(-1)%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <span class="input-group-addon">已分配激活产品</span> |
| | | <select name="ProductId" id="ProductId" class="form-control"> |
| | | <%=GetProductOptions("")%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="input-group m-b"> |
| | | <input type="button" value="查询" class="btn btn-primary action-query" />  |
| | | |
| | | <% if(IsEnable==1) { %> |
| | | <input class="btn btn-success action-modal-create" value="创建客户" type="button" />  |
| | | <%} %> |
| | | </div> |
| | | |
| | | </div> |
| | | </form> |
| | | |
| | | <!-- 列表 --> |
| | | <div class="table-responsive"> |
| | | <% if(IsEnable==1) { %> |
| | | <input class="btn btn-danger action-modal-setProduct" value="批量分配个性产品" type="button" /> |
| | | <%} %> |
| | | <input class="btn btn-info action-export" value="导出数据" type="button" /> |
| | | <table class="table table-striped table-bordered table-hover" id="gwclientTable" style="margin:10px 0 0 0;"> |
| | | <thead> |
| | | <tr class="header"> |
| | | <th> |
| | | <input type='checkbox' name='checkAll' id='checkAll' /> |
| | | </th> |
| | | <th>客户账户 |
| | | </th> |
| | | <th>公司名称</th> |
| | | <th>联系人 |
| | | </th> |
| | | <th>联系电话 |
| | | </th> |
| | | <th>账户余额(元) |
| | | </th> |
| | | <th>累计充值(元) |
| | | </th> |
| | | |
| | | <th>业务员 |
| | | </th> |
| | | |
| | | <th>已分配个性产品(多个按“,”分隔) |
| | | </th> |
| | | <!-- |
| | | <th>认证状态 |
| | | </th> |
| | | --> |
| | | |
| | | <th>状态 |
| | | </th> |
| | | <th>操作 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | </tbody> |
| | | |
| | | </table> |
| | | </div> |
| | | <div id="pager" style="margin:10px 0 0 0;"> |
| | | </div> |
| | | |
| | | <!--批量修改个性产品 --> |
| | | <div class="modal inmodal fade" id="setProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <div class="modal-dialog form-horizontal"> |
| | | <div class="modal-content animated "> |
| | | <div class="modal-header"> |
| | | <span class="title"><h3>批量分配个性产品</h3></span><a class="close" data-dismiss="modal" aria-hidden="true">×</a> |
| | | <span class="text-muted"> |
| | | 批量分配个性产品将会更新所有选中的账户的客户,<br /> |
| | | 确定分配不能取消,请谨慎操作!<br /> |
| | | </span> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 个性产品 |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <select name="productId" id="productId" class="form-control"> |
| | | <%=GetPersonalityProductOptions("")%> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <input class="btn btn-primary action-update-setProduct" value="确定修改" type="button" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 客户修改个性产品 --> |
| | | <div class="modal inmodal fade" id="updateProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content animated bounceInRight"> |
| | | <input type="hidden" value="" name="clientID" /> |
| | | <div class="modal-header"> |
| | | <span class="title">设置客户个性产品</span><a class="close" data-dismiss="modal" aria-hidden="true">×</a> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <%=ClientProductAll() %> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-updateProduct" data-dismiss="modal" aria-hidden="true"> |
| | | 保存</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- footBar --> |
| | | <div id="mask" class="mask"> |
| | | <span></span> |
| | | <img src="img/spinning-circles.svg" alt="载入中..." /> |
| | | </div> |
| | | </asp:Content> |
| | | |
New file |
| | |
| | | |
| | | using Common; |
| | | using Model; |
| | | using System; |
| | | using System.Web; |
| | | using System.Web.Profile; |
| | | using System.Web.SessionState; |
| | | using Dao; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | | |
| | | public partial class _GwClient : PageBase<SysUser>, IRequiresSessionState |
| | | { |
| | | |
| | | protected List<SysUser> SysUserList; |
| | | protected List<GwProduct> GwProductList; |
| | | |
| | | string addressClasses = ConfigurationManager.AppSettings["addressClasses"]; |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | //权限校验 |
| | | this.CheckRight("301", FailedOperation.ErrorMsgOnly); |
| | | |
| | | //获取启用的产品分类 |
| | | using (UserDao userDao = new UserDao()) |
| | | { |
| | | |
| | | int recordCount = 0; |
| | | int int1 = 999999999; |
| | | int int2 = 1; |
| | | this.SysUserList = userDao.LoadInfoList(out recordCount, int1, int2); |
| | | |
| | | } |
| | | |
| | | //获取启用的产品 |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | { |
| | | GwProduct bean = new GwProduct(); |
| | | bean.Classes = 1; |
| | | bean.IsDefault = -1; |
| | | bean.IsEnable = -1; |
| | | this.GwProductList = gwProductDao.getAllList(bean); |
| | | } |
| | | } |
| | | public int IsEnable |
| | | { |
| | | get |
| | | { |
| | | return this.AppContext.GetInt("IsEnable"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //归属业务员 |
| | | public string salesmanOptions(int userId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.SysUserList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (SysUser bean in this.SysUserList) |
| | | { |
| | | //停用的用户不再显示 |
| | | if (bean.Status == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤用户类型 1-管理员;2-业务员--全员;3-客户经理;4-客服人员;5-财务人员 |
| | | if (!checkStrForArrayStr(1, bean.UserType) && !checkStrForArrayStr(2, bean.UserType) ) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (userId == bean.UserID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //归属客户经理 |
| | | public string customerManagerOptions(int userId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.SysUserList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (SysUser bean in this.SysUserList) |
| | | { |
| | | //停用的用户不再显示 |
| | | if (bean.Status == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤用户类型 1-管理员;2-业务员--全员;3-客户经理;4-客服人员;5-财务人员 |
| | | if (!checkStrForArrayStr(1, bean.UserType) && !checkStrForArrayStr(3, bean.UserType)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (userId == bean.UserID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //归属客服人员 |
| | | public string supportStaffOptions(int userId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.SysUserList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (SysUser bean in this.SysUserList) |
| | | { |
| | | //停用的用户不再显示 |
| | | if (bean.Status == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤用户类型 1-管理员;2-业务员--全员;3-客户经理;4-客服人员;5-财务人员 |
| | | if (!checkStrForArrayStr(1, bean.UserType) && !checkStrForArrayStr(4, bean.UserType)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (userId == bean.UserID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //归属财务人员 |
| | | public string financialStaffOptions(int userId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.SysUserList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (SysUser bean in this.SysUserList) |
| | | { |
| | | //停用的用户不再显示 |
| | | if (bean.Status == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤用户类型 1-管理员;2-业务员--全员;3-客户经理;4-客服人员;5-财务人员 |
| | | if (!checkStrForArrayStr(1, bean.UserType) && !checkStrForArrayStr(5, bean.UserType)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (userId == bean.UserID) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | |
| | | //获取产品信息 |
| | | public string GetProductOptions(string productId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GwProductList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (GwProduct bean in this.GwProductList) |
| | | { |
| | | //停用的产品分类不再显示 |
| | | if (bean.IsEnable == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤产品类别 |
| | | if (bean.Classes == 0) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (productId.Equals(bean.Id)) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | |
| | | //获取个性产品信息 |
| | | public string GetPersonalityProductOptions(string productId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GwProductList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (GwProduct bean in this.GwProductList) |
| | | { |
| | | //停用的产品分类不再显示 |
| | | if (bean.IsEnable == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤产品类别 |
| | | if (bean.Classes == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤推广方式 |
| | | if (bean.IsDefault == 1) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (productId.Equals(bean.Id)) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | //所有个性产品 |
| | | protected string ClientProductAll() |
| | | { |
| | | using (GwProductDao gwProductDao = new GwProductDao()) |
| | | { |
| | | GwProduct gwProduct = new GwProduct(); |
| | | gwProduct.Classes = 1; //0-产品分类;1-产品 |
| | | gwProduct.IsDefault = 0; //默认值0。0-个性化;1-系统默认。 |
| | | gwProduct.IsEnable = 1; //0-停用;1-启用;默认1 |
| | | List<GwProduct> list = gwProductDao.getAllList(gwProduct); |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("<table cellpadding='5'>"); |
| | | if(list.Count>0) |
| | | { |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | GwProduct bean = (GwProduct)list[i]; |
| | | |
| | | //行开始符 |
| | | if (i%5 == 0) |
| | | { |
| | | stringBuilder.Append("<tr>"); |
| | | } |
| | | |
| | | //行单元格 |
| | | stringBuilder.AppendFormat("<td><input type=\"checkbox\" id=\"_ProductId\" name=\"_ProductId\" value=\"{0}\" /><span style='padding:5px;'>{1} </span> \r\n </td>", (object)bean.Id, (object)bean.Name); |
| | | |
| | | //行结束符 |
| | | if (i % 5 == 4 || i == (list.Count - 1)) |
| | | { |
| | | stringBuilder.Append("</tr>"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | stringBuilder.Append("</table>"); |
| | | |
| | | return stringBuilder.ToString(); |
| | | } |
| | | } |
| | | |
| | | //检查数组格式字符串中是否包含某元素 |
| | | public static bool checkStrForArrayStr(object str, string arrayStr) |
| | | { |
| | | return stringToArray(arrayStr).Contains(str.ToString()); |
| | | } |
| | | |
| | | //字符串转数组 |
| | | public static object[] stringToArray(string str) |
| | | { |
| | | object[] array = str.Split(','); |
| | | return array; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | using System; |
| | | using System.Web; |
| | | using com.softwee.smgw.common; |
| | | //using com.softwee.smgw.common; |
| | | using Dao; |
| | | using Model; |
| | | using System.Collections.Generic; |
| | |
| | | <a href="#"><i class="fa fa-user-secret"></i><span class="nav-label">客户管理 </span><span class="fa arrow"></span></a> |
| | | <ul class="nav nav-second-level"> |
| | | <li><a href="GwClient.aspx?IsEnable=1" class="J_menuItem">客户信息管理</a> </li> |
| | | <li><a href="GwClient.aspx?IsEnable=1" class="J_menuItem">分销商下级客户信息管理</a> </li> |
| | | |
| | | <li><a href="GwClient.aspx?IsEnable=0" class="J_menuItem">停用客户信息管理</a> </li> |
| | | <li><a href="GwSp.aspx" class="J_menuItem">短信账号管理</a> </li> |
| | | <li><a href="GwMoRoute.aspx" class="J_menuItem">上行路由配置</a> </li> |
| | |
| | | <%@ WebHandler Language="C#" Class="gwdiverterHandler" %> |
| | | //这个页面新加的为了实现导流 |
| | | //这个页面新加的为了实现导流 |
| | | |
| | | using com.softwee.smgw.common; |
| | | //using App_Code; |
| | | using Common; |
| | | using Dao; |
| | | using Model; |
| | |
| | | |
| | | public class gwdiverterHandler : PageHandler<SysUser> |
| | | { |
| | | private GwDiverterDao _Dao = new GwDiverterDao(); |
| | | //private SysOperationLogDao _OperationLogDao = new SysOperationLogDao(); |
| | | private List<GwOp> OpList; |
| | | private GwDiverterDao _Dao = new GwDiverterDao(); |
| | | //private SysOperationLogDao _OperationLogDao = new SysOperationLogDao(); |
| | | private List<GwOp> OpList; |
| | | |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<SysUser> context) |
| | | { |
| | | case "loadGwDiverter": |
| | | return this.LoadGwDiverter(context); |
| | | case "delete": |
| | | return this.Delete(context); |
| | | case "editDeal": |
| | | return this.Update(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | } |
| | | } |
| | | |
| | | private JsonPageResult Delete(PageContext<SysUser> context) |
| | | { |
| | | context.CheckRight("1064", FailedOperation.ErrorMsgOnly); |
| | | string @string = context.GetString("did"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("参数异常"); |
| | | this._Dao.Delete(@string); |
| | | //WriteSysLogHelper.WriteSysLog(context.SessionObject.Account, 1064, 106, string.Format("删除导流策略:策略编号:{0}", (object) @string), context.ClientIP); |
| | | return new JsonPageResult(true, (object) "删除成功"); |
| | | } |
| | | |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | context.CheckRight("1062", FailedOperation.ErrorMsgOnly); |
| | | int @int = context.GetInt("DiverterID"); |
| | | string string1 = context.GetString("DiverterName"); |
| | | string string2 = context.GetString("Content"); |
| | | if (string.IsNullOrEmpty(string1)) |
| | | throw new ArgumentException("策略名称不能为空"); |
| | | GwDiverter diverter = new GwDiverter(); |
| | | diverter.DiverterID = @int; |
| | | diverter.DiverterName = string1; |
| | | List<GwDiverterItem> list1 = JsonConvert.DeserializeObject<List<GwDiverterItem>>(string2); |
| | | if (list1 == null) |
| | | throw new ArgumentException("策略数据异常,请重试"); |
| | | List<GwDiverterItem> items = new List<GwDiverterItem>(); |
| | | List<GwDiverterItem> list2 = new List<GwDiverterItem>(); |
| | | foreach (GwDiverterItem gwDiverterItem1 in list1) |
| | | { |
| | | GwDiverterItem gwDiverterItem2 = new GwDiverterItem() |
| | | { |
| | | Mode = gwDiverterItem1.Mode, |
| | | Keywords = "", |
| | | SmMaxLength = gwDiverterItem1.SmMaxLength, |
| | | SmMinLength = gwDiverterItem1.SmMinLength, |
| | | Segments = "", |
| | | ExtNoMode = gwDiverterItem1.ExtNoMode, |
| | | Province = "", |
| | | CMOPID = gwDiverterItem1.CMOPID, |
| | | CUOPID = gwDiverterItem1.CUOPID, |
| | | CTOPID = gwDiverterItem1.CTOPID, |
| | | CMExtNo = gwDiverterItem1.CMExtNo, |
| | | CUExtNo = gwDiverterItem1.CUExtNo, |
| | | CTExtNo = gwDiverterItem1.CTExtNo, |
| | | CMExtParams = gwDiverterItem1.CMExtParams, |
| | | CTExtParams = gwDiverterItem1.CTExtParams, |
| | | CUExtParams = gwDiverterItem1.CUExtParams |
| | | }; |
| | | GwDiverterItem gwDiverterItem3 = new GwDiverterItem() |
| | | { |
| | | Mode = gwDiverterItem1.Mode, |
| | | Keywords = gwDiverterItem1.Keywords, |
| | | SmMaxLength = gwDiverterItem1.SmMaxLength, |
| | | SmMinLength = gwDiverterItem1.SmMinLength, |
| | | Segments = SegmentHelper.Filrate(gwDiverterItem1.Segments), |
| | | Province = gwDiverterItem1.Province, |
| | | ExtNoMode = gwDiverterItem1.ExtNoMode, |
| | | CMOPID = gwDiverterItem1.CMOPID, |
| | | CUOPID = gwDiverterItem1.CUOPID, |
| | | CTOPID = gwDiverterItem1.CTOPID, |
| | | CMExtNo = gwDiverterItem1.CMExtNo, |
| | | CUExtNo = gwDiverterItem1.CUExtNo, |
| | | CTExtNo = gwDiverterItem1.CTExtNo, |
| | | CMExtParams = gwDiverterItem1.CMExtParams, |
| | | CTExtParams = gwDiverterItem1.CTExtParams, |
| | | CUExtParams = gwDiverterItem1.CUExtParams |
| | | }; |
| | | list2.Add(gwDiverterItem2); |
| | | items.Add(gwDiverterItem3); |
| | | } |
| | | string str = JsonConvert.SerializeObject((object) list2); |
| | | if (str.Length > 5000) |
| | | throw new ArgumentException("导流规则不能超过5000字符"); |
| | | diverter.Content = str; |
| | | if (this._Dao.Exists(diverter.DiverterID, diverter.DiverterName)) |
| | | throw new ArgumentException("该策略名称已经存在"); |
| | | this._Dao.UpdateInfo(diverter, items); |
| | | // WriteSysLogHelper.WriteSysLog(context.SessionObject.Account, 1062, 106, string.Format("导流策略:策略编号:{0}策略名称:{1}", (object) @int, (object) string1), context.ClientIP); |
| | | return new JsonPageResult(true, (object) "导流策略保存成功"); |
| | | } |
| | | |
| | | private JsonPageResult LoadGwDiverter(PageContext<SysUser> context) |
| | | { |
| | | List<GwDiverter> list = this._Dao.LoadList(); |
| | | string str = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | int num = 0; |
| | | foreach (GwDiverter gwDiverter in list) |
| | | { |
| | | ++num; |
| | | str = string.Concat(new object[4] |
| | | string @string = context.GetString("action"); |
| | | switch (@string) |
| | | { |
| | | case "loadGwDiverter": |
| | | return this.LoadGwDiverter(context); |
| | | case "delete": |
| | | return this.Delete(context); |
| | | case "editDeal": |
| | | return this.Update(context); |
| | | default: |
| | | throw new Exception("Invalid Action=" + @string); |
| | | } |
| | | } |
| | | |
| | | private JsonPageResult Delete(PageContext<SysUser> context) |
| | | { |
| | | context.CheckRight("1064", FailedOperation.ErrorMsgOnly); |
| | | string @string = context.GetString("did"); |
| | | if (string.IsNullOrEmpty(@string)) |
| | | throw new ArgumentException("参数异常"); |
| | | this._Dao.Delete(@string); |
| | | //WriteSysLogHelper.WriteSysLog(context.SessionObject.Account, 1064, 106, string.Format("删除导流策略:策略编号:{0}", (object) @string), context.ClientIP); |
| | | return new JsonPageResult(true, (object) "删除成功"); |
| | | } |
| | | |
| | | private JsonPageResult Update(PageContext<SysUser> context) |
| | | { |
| | | context.CheckRight("1062", FailedOperation.ErrorMsgOnly); |
| | | int @int = context.GetInt("DiverterID"); |
| | | string string1 = context.GetString("DiverterName"); |
| | | string string2 = context.GetString("Content"); |
| | | if (string.IsNullOrEmpty(string1)) |
| | | throw new ArgumentException("策略名称不能为空"); |
| | | GwDiverter diverter = new GwDiverter(); |
| | | diverter.DiverterID = @int; |
| | | diverter.DiverterName = string1; |
| | | List<GwDiverterItem> list1 = JsonConvert.DeserializeObject<List<GwDiverterItem>>(string2); |
| | | if (list1 == null) |
| | | throw new ArgumentException("策略数据异常,请重试"); |
| | | List<GwDiverterItem> items = new List<GwDiverterItem>(); |
| | | List<GwDiverterItem> list2 = new List<GwDiverterItem>(); |
| | | foreach (GwDiverterItem gwDiverterItem1 in list1) |
| | | { |
| | | GwDiverterItem gwDiverterItem2 = new GwDiverterItem() |
| | | { |
| | | Mode = gwDiverterItem1.Mode, |
| | | Keywords = "", |
| | | SmMaxLength = gwDiverterItem1.SmMaxLength, |
| | | SmMinLength = gwDiverterItem1.SmMinLength, |
| | | Segments = "", |
| | | ExtNoMode = gwDiverterItem1.ExtNoMode, |
| | | Province = "", |
| | | CMOPID = gwDiverterItem1.CMOPID, |
| | | CUOPID = gwDiverterItem1.CUOPID, |
| | | CTOPID = gwDiverterItem1.CTOPID, |
| | | CMExtNo = gwDiverterItem1.CMExtNo, |
| | | CUExtNo = gwDiverterItem1.CUExtNo, |
| | | CTExtNo = gwDiverterItem1.CTExtNo, |
| | | CMExtParams = gwDiverterItem1.CMExtParams, |
| | | CTExtParams = gwDiverterItem1.CTExtParams, |
| | | CUExtParams = gwDiverterItem1.CUExtParams |
| | | }; |
| | | GwDiverterItem gwDiverterItem3 = new GwDiverterItem() |
| | | { |
| | | Mode = gwDiverterItem1.Mode, |
| | | Keywords = gwDiverterItem1.Keywords, |
| | | SmMaxLength = gwDiverterItem1.SmMaxLength, |
| | | SmMinLength = gwDiverterItem1.SmMinLength, |
| | | Segments = SegmentHelper.Filrate(gwDiverterItem1.Segments), |
| | | Province = gwDiverterItem1.Province, |
| | | ExtNoMode = gwDiverterItem1.ExtNoMode, |
| | | CMOPID = gwDiverterItem1.CMOPID, |
| | | CUOPID = gwDiverterItem1.CUOPID, |
| | | CTOPID = gwDiverterItem1.CTOPID, |
| | | CMExtNo = gwDiverterItem1.CMExtNo, |
| | | CUExtNo = gwDiverterItem1.CUExtNo, |
| | | CTExtNo = gwDiverterItem1.CTExtNo, |
| | | CMExtParams = gwDiverterItem1.CMExtParams, |
| | | CTExtParams = gwDiverterItem1.CTExtParams, |
| | | CUExtParams = gwDiverterItem1.CUExtParams |
| | | }; |
| | | list2.Add(gwDiverterItem2); |
| | | items.Add(gwDiverterItem3); |
| | | } |
| | | string str = JsonConvert.SerializeObject((object) list2); |
| | | if (str.Length > 5000) |
| | | throw new ArgumentException("导流规则不能超过5000字符"); |
| | | diverter.Content = str; |
| | | if (this._Dao.Exists(diverter.DiverterID, diverter.DiverterName)) |
| | | throw new ArgumentException("该策略名称已经存在"); |
| | | this._Dao.UpdateInfo(diverter, items); |
| | | // WriteSysLogHelper.WriteSysLog(context.SessionObject.Account, 1062, 106, string.Format("导流策略:策略编号:{0}策略名称:{1}", (object) @int, (object) string1), context.ClientIP); |
| | | return new JsonPageResult(true, (object) "导流策略保存成功"); |
| | | } |
| | | |
| | | private JsonPageResult LoadGwDiverter(PageContext<SysUser> context) |
| | | { |
| | | List<GwDiverter> list = this._Dao.LoadList(); |
| | | string str = ""; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | int num = 0; |
| | | foreach (GwDiverter gwDiverter in list) |
| | | { |
| | | ++num; |
| | | str = string.Concat(new object[4] |
| | | { |
| | | (object) str, |
| | | (object) "<tr><td>", |
| | | (object) gwDiverter.DiverterID, |
| | | (object) "</td>" |
| | | }); |
| | | str = str + "<td>" + gwDiverter.DiverterName + "</td>"; |
| | | str = str + "<td>" + this.FormatContent(gwDiverter.Content) + "</td>"; |
| | | str += "<td nowrap=\"true\">"; |
| | | str = string.Concat(new object[4] |
| | | { |
| | | }); |
| | | str = str + "<td>" + gwDiverter.DiverterName + "</td>"; |
| | | str = str + "<td>" + this.FormatContent(gwDiverter.Content) + "</td>"; |
| | | str += "<td nowrap=\"true\">"; |
| | | str = string.Concat(new object[4] |
| | | { |
| | | (object) str, |
| | | (object) "<a href='javascript:;' data-id='", |
| | | (object) gwDiverter.DiverterID, |
| | | (object) "' class='action-edit btn btn-xs btn-success operator'><i class=\"fa fa-edit\"></i> 编辑</a> " |
| | | }); |
| | | str = string.Concat(new object[4] |
| | | { |
| | | }); |
| | | str = string.Concat(new object[4] |
| | | { |
| | | (object) str, |
| | | (object) "<a href='javascript:;' data-id='", |
| | | (object) gwDiverter.DiverterID, |
| | | (object) "' class='action-delete btn btn-xs btn-default operator'><i class=\"fa fa-trash\"></i> 删除</a>" |
| | | }); |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"4\" style=\"padding-left:5px; text-align: center;\">暂无信息</td></tr>"; |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Table = str.ToString() |
| | | }); |
| | | str += "</td>"; |
| | | str += "</tr>"; |
| | | } |
| | | } |
| | | else |
| | | str += "<tr><td colspan=\"4\" style=\"padding-left:5px; text-align: center;\">暂无信息</td></tr>"; |
| | | return new JsonPageResult(true, (object) new |
| | | { |
| | | Table = str.ToString() |
| | | }); |
| | | } |
| | | |
| | | private string FormatContent(string content) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | try |
| | | private string FormatContent(string content) |
| | | { |
| | | foreach (GwDiverterItem gwDiverterItem in JsonConvert.DeserializeObject<List<GwDiverterItem>>(content)) |
| | | { |
| | | stringBuilder.AppendFormat("<div class=\"m-b\">"); |
| | | stringBuilder.AppendFormat("{0}", (object) this.ModeStr(gwDiverterItem.Mode)); |
| | | stringBuilder.AppendFormat("短信将从 移动 <span class=\"label label-success\">{0}</span> 联通 <span class=\"label label-primary\">{1}</span> 电信 <span class=\"label label-warning\"> {2} </span>导流。", (object) this.GetOpName(gwDiverterItem.CMOPID), (object) this.GetOpName(gwDiverterItem.CUOPID), (object) this.GetOpName(gwDiverterItem.CTOPID)); |
| | | stringBuilder.AppendLine("</div>"); |
| | | } |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | try |
| | | { |
| | | foreach (GwDiverterItem gwDiverterItem in JsonConvert.DeserializeObject<List<GwDiverterItem>>(content)) |
| | | { |
| | | stringBuilder.AppendFormat("<div class=\"m-b\">"); |
| | | stringBuilder.AppendFormat("{0}", (object) this.ModeStr(gwDiverterItem.Mode)); |
| | | stringBuilder.AppendFormat("短信将从 移动 <span class=\"label label-success\">{0}</span> 联通 <span class=\"label label-primary\">{1}</span> 电信 <span class=\"label label-warning\"> {2} </span>导流。", (object) this.GetOpName(gwDiverterItem.CMOPID), (object) this.GetOpName(gwDiverterItem.CUOPID), (object) this.GetOpName(gwDiverterItem.CTOPID)); |
| | | stringBuilder.AppendLine("</div>"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error(ex); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error(ex); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |
| | | |
| | | public string ModeStr(int mode) |
| | | { |
| | | string str1 = ""; |
| | | string str2; |
| | | switch (mode) |
| | | public string ModeStr(int mode) |
| | | { |
| | | case 1: |
| | | return str2 = string.Format("当短信内容匹配【关键字】时,"); |
| | | case 2: |
| | | return str2 = string.Format("当短信内容匹配 “字数” 时,"); |
| | | case 3: |
| | | return str2 = string.Format("当短信号码匹配 “号段” 时,"); |
| | | case 4: |
| | | return str2 = string.Format("当短信号码匹配 “省份” 时,"); |
| | | default: |
| | | return str1.ToString(); |
| | | string str1 = ""; |
| | | string str2; |
| | | switch (mode) |
| | | { |
| | | case 1: |
| | | return str2 = string.Format("当短信内容匹配【关键字】时,"); |
| | | case 2: |
| | | return str2 = string.Format("当短信内容匹配 “字数” 时,"); |
| | | case 3: |
| | | return str2 = string.Format("当短信号码匹配 “号段” 时,"); |
| | | case 4: |
| | | return str2 = string.Format("当短信号码匹配 “省份” 时,"); |
| | | default: |
| | | return str1.ToString(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private string GetOpName(int opID) |
| | | { |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | if (this.OpList == null) |
| | | return string.Empty; |
| | | GwOp gwOp = this.OpList.Find((Predicate<GwOp>) (op => op.OpID == opID)); |
| | | if (gwOp != null) |
| | | return string.Format("{0}-{1}", (object) gwOp.OpID, (object) gwOp.OpName); |
| | | return "未设置通道"; |
| | | } |
| | | private string GetOpName(int opID) |
| | | { |
| | | using (GwOpDao gwOpDao = new GwOpDao()) |
| | | this.OpList = gwOpDao.LoadInfoList(); |
| | | if (this.OpList == null) |
| | | return string.Empty; |
| | | GwOp gwOp = this.OpList.Find((Predicate<GwOp>) (op => op.OpID == opID)); |
| | | if (gwOp != null) |
| | | return string.Format("{0}-{1}", (object) gwOp.OpID, (object) gwOp.OpName); |
| | | return "未设置通道"; |
| | | } |
| | | } |