特种设备修改,车辆管理人员管理合并,考试接口创建试卷和答题使用redis

This commit is contained in:
李鹏飞 2024-04-02 14:28:52 +08:00
parent 1b96387adc
commit d87b2d5be9
49 changed files with 4175 additions and 179 deletions

Binary file not shown.

View File

@ -0,0 +1,81 @@
alter table dbo.InApproveManager_EquipmentInItem
add InDate datetime
go
exec sp_addextendedproperty 'MS_Description', N'进场时间', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem',
'COLUMN', 'InDate'
go
alter table dbo.InApproveManager_EquipmentInItem
add EququalityExpireDate datetime
go
exec sp_addextendedproperty 'MS_Description', N'设备资质有效期', 'SCHEMA', 'dbo', 'TABLE',
'InApproveManager_EquipmentInItem', 'COLUMN', 'EququalityExpireDate'
go
alter table dbo.InApproveManager_EquipmentInItem
add InsuredAmount decimal
go
exec sp_addextendedproperty 'MS_Description', N'保额', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem',
'COLUMN', 'InsuredAmount'
go
alter table dbo.InApproveManager_EquipmentInItem
add OperatorName nvarchar(50)
go
exec sp_addextendedproperty 'MS_Description', N'操作人员姓名', 'SCHEMA', 'dbo', 'TABLE',
'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorName'
go
alter table dbo.InApproveManager_EquipmentInItem
add OperatorIdentityCard nvarchar(50)
go
exec sp_addextendedproperty 'MS_Description', N'操作人员身份证号', 'SCHEMA', 'dbo', 'TABLE',
'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorIdentityCard'
go
alter table dbo.InApproveManager_EquipmentInItem
add OperatorQualityExpireDate datetime
go
exec sp_addextendedproperty 'MS_Description', N'操作人员资质有效期', 'SCHEMA', 'dbo', 'TABLE',
'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorQualityExpireDate'
go
alter table dbo.InApproveManager_EquipmentInItem
add CertificationDepartment nvarchar(50)
go
exec sp_addextendedproperty 'MS_Description', N'发证部门', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem',
'COLUMN', 'CertificationDepartment'
go
alter table dbo.Administrative_CarManager
add DriverName nvarchar(50)
go
alter table dbo.Administrative_CarManager
add DriverCode nvarchar(50)
go
alter table dbo.Administrative_CarManager
add DrivingDate datetime
go
exec sp_addextendedproperty 'MS_Description', N' 姓名', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager', 'COLUMN',
'DriverName'
go
exec sp_addextendedproperty 'MS_Description', N'驾驶证号', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager',
'COLUMN', 'DriverCode'
go
exec sp_addextendedproperty 'MS_Description', N'发证日期', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager',
'COLUMN', 'DrivingDate'
go

View File

@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using EmitMapper;
using EmitMapper.MappingConfiguration;
using Model;
namespace BLL
{
@ -253,7 +254,9 @@ namespace BLL
};
db.Training_TestRecordItem.InsertAllOnSubmit(getItems);
db.SubmitChanges();
db.SubmitChanges();
BLL.RedisHelper redis = new BLL.RedisHelper();
redis.SetObjString(testRecordId, getItems);
}
}
}
@ -615,33 +618,40 @@ namespace BLL
/// <returns>考试人员</returns>
public static List<Model.TestRecordItemItem> geTestRecordItemListByTestRecordId(string testRecordId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
BLL.RedisHelper redis = new BLL.RedisHelper();
var getDataLists= redis.GetObjString<List<TestRecordItemItem>>(testRecordId); //先从redis取数据,不存在再从数据库取
if (getDataLists.Count==0)
{
var getDataLists = (from x in db.Training_TestRecordItem
where x.TestRecordId == testRecordId
orderby x.TestType, x.TrainingItemCode
select new Model.TestRecordItemItem
{
TestRecordItemId = x.TestRecordItemId,
TestRecordId = x.TestRecordId,
TrainingItemCode = x.TrainingItemCode,
TrainingItemName = x.TrainingItemName,
Abstracts = x.Abstracts,
AttachUrl = x.AttachUrl.Replace("\\", "/") ?? "",
TestType = x.TestType,
TestTypeName = x.TestType == "1" ? "单选题" : (x.TestType == "2" ? "多选题" : "判断题"),
AItem = x.AItem ?? "",
BItem = x.BItem ?? "",
CItem = x.CItem ?? "",
DItem = x.DItem ?? "",
EItem = x.EItem ?? "",
AnswerItems = x.AnswerItems ?? "",
Score = x.Score ?? 0,
SubjectScore = x.SubjectScore ?? 0,
SelectedItem = x.SelectedItem ?? "",
}).ToList();
return getDataLists;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
getDataLists = (from x in db.Training_TestRecordItem
where x.TestRecordId == testRecordId
orderby x.TestType, x.TrainingItemCode
select new Model.TestRecordItemItem
{
TestRecordItemId = x.TestRecordItemId,
TestRecordId = x.TestRecordId,
TrainingItemCode = x.TrainingItemCode,
TrainingItemName = x.TrainingItemName,
Abstracts = x.Abstracts,
AttachUrl = x.AttachUrl.Replace("\\", "/") ?? "",
TestType = x.TestType,
TestTypeName = x.TestType == "1" ? "单选题" : (x.TestType == "2" ? "多选题" : "判断题"),
AItem = x.AItem ?? "",
BItem = x.BItem ?? "",
CItem = x.CItem ?? "",
DItem = x.DItem ?? "",
EItem = x.EItem ?? "",
AnswerItems = x.AnswerItems ?? "",
Score = x.Score ?? 0,
SubjectScore = x.SubjectScore ?? 0,
SelectedItem = x.SelectedItem ?? "",
}).ToList();
}
}
return getDataLists;
}
#endregion

View File

@ -21,6 +21,8 @@
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -55,11 +57,14 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
<Reference Include="Fleck, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Fleck.1.2.0\lib\net45\Fleck.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -83,12 +88,18 @@
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
<Reference Include="Quartz, Version=3.7.0.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.7.0\lib\netstandard2.0\Quartz.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.7.33\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
@ -105,6 +116,14 @@
</Reference>
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Pipelines, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.1\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
@ -117,6 +136,11 @@
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@ -136,6 +160,9 @@
<Reference Include="System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.7.0.2\lib\netstandard2.0\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
@ -255,6 +282,9 @@
<Compile Include="Common\NPOIHelper.cs" />
<Compile Include="Common\PrinterDocService.cs" />
<Compile Include="Common\ProjectDataFlowSetService.cs" />
<Compile Include="Common\Redis\ICache.cs" />
<Compile Include="Common\Redis\Redis.cs" />
<Compile Include="Common\Redis\RedisHelper.cs" />
<Compile Include="Common\UploadFileService.cs" />
<Compile Include="Common\UpLoadImageService.cs" />
<Compile Include="Common\UserShowColumnsService.cs" />
@ -1044,7 +1074,15 @@
<ItemGroup>
<WCFMetadataStorage Include="Service References\CNCECHSSEService\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -1,10 +1,7 @@
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System;
using StackExchange.Redis;
namespace WebAPI.Common
namespace BLL
{
/// <summary>
/// 接口

View File

@ -1,12 +1,9 @@
using Newtonsoft.Json;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System;
using System.Configuration;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using StackExchange.Redis;
namespace WebAPI.Common
namespace BLL
{
/// <summary>
///

File diff suppressed because it is too large Load Diff

View File

@ -360,7 +360,29 @@
lis[2] = new ListItem("仪表安装工程", "3");
return lis;
}
public static ListItem[] Sys_Menu_Type()
{
ListItem[] lis = new ListItem[18];
lis[0] = new ListItem("项目清单", "Menu_Project");
lis[1] = new ListItem("大数据中心", "Menu_DigData");
lis[2] = new ListItem("总部检查", "Menu_Server");
lis[3] = new ListItem("通知管理", "Menu_Notice");
lis[4] = new ListItem("员工菜单", "Menu_Person");
lis[5] = new ListItem("综合管理", "Menu_ZHGL");
lis[6] = new ListItem("系统设置", "Menu_SysSet");
lis[7] = new ListItem("施工管理", "Menu_PZHGL");
lis[8] = new ListItem("进度/计划", "Menu_JDGL");
lis[9] = new ListItem("质量", "Menu_CQMS");
lis[10] = new ListItem("HSE", "Menu_HSSE");
lis[11] = new ListItem("焊接管理", "Menu_HJGL");
lis[12] = new ListItem("变更管理", "Menu_Change");
lis[13] = new ListItem("文控管理", "Menu_DocControl");
lis[14] = new ListItem("现场考勤", "Menu_Attendance");
lis[15] = new ListItem("视频监控", "Menu_Video");
lis[16] = new ListItem("试车管理", "Menu_TestRun");
lis[17] = new ListItem("项目设置", "Menu_ProjectSet");
return lis;
}
// 定义允许上传的文件类型列表
public static List<string> allowExtensions = new List<string>
{

View File

@ -40,7 +40,10 @@ namespace BLL
Remark = carManager.Remark,
CompileMan = carManager.CompileMan,
CompileDate = carManager.CompileDate,
States = carManager.States
States = carManager.States,
DriverName = carManager.DriverName,
DriverCode = carManager.DriverCode,
DrivingDate= carManager.DrivingDate,
};
Funs.DB.Administrative_CarManager.InsertOnSubmit(newCarManager);
Funs.DB.SubmitChanges();
@ -67,6 +70,9 @@ namespace BLL
newCarManager.CompileMan = carManager.CompileMan;
newCarManager.CompileDate = carManager.CompileDate;
newCarManager.States = carManager.States;
newCarManager.DriverName = carManager.DriverName;
newCarManager.DriverCode = carManager.DriverCode;
newCarManager.DrivingDate = carManager.DrivingDate;
Funs.DB.SubmitChanges();
}
}

View File

@ -1,4 +1,5 @@
using System;
using Quartz.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -54,7 +55,15 @@ namespace BLL
InsuranceNum = equipmentInItem.InsuranceNum,
CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum,
IsUsed = equipmentInItem.IsUsed,
IsIn = equipmentInItem.IsIn
IsIn = equipmentInItem.IsIn,
InDate = equipmentInItem.InDate,
EququalityExpireDate= equipmentInItem.EququalityExpireDate,
InsuredAmount= equipmentInItem.InsuredAmount,
OperatorName= equipmentInItem.OperatorName,
OperatorIdentityCard= equipmentInItem.OperatorIdentityCard,
OperatorQualityExpireDate= equipmentInItem.OperatorQualityExpireDate,
CertificationDepartment= equipmentInItem.CertificationDepartment,
};
db.InApproveManager_EquipmentInItem.InsertOnSubmit(newEquipmentItem);
db.SubmitChanges();
@ -83,6 +92,14 @@ namespace BLL
newEquipmentItem.CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum;
newEquipmentItem.IsUsed = equipmentInItem.IsUsed;
newEquipmentItem.IsIn = equipmentInItem.IsIn;
newEquipmentItem.InDate = equipmentInItem.InDate;
newEquipmentItem.EququalityExpireDate = equipmentInItem.EququalityExpireDate;
newEquipmentItem.InsuredAmount = equipmentInItem.InsuredAmount;
newEquipmentItem.OperatorName = equipmentInItem.OperatorName;
newEquipmentItem.OperatorIdentityCard = equipmentInItem.OperatorIdentityCard;
newEquipmentItem.OperatorQualityExpireDate = equipmentInItem.OperatorQualityExpireDate;
newEquipmentItem.CertificationDepartment = equipmentInItem.CertificationDepartment;
db.SubmitChanges();
}
}

View File

@ -1,7 +1,9 @@
using FineUIPro;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
@ -23,7 +25,7 @@ namespace BLL
get;
set;
}
public static List<Model.Sys_HttpLog> GetSys_HttpLogByModle(Model.Sys_HttpLog table)
public static IQueryable<Model.Sys_HttpLog> GetSys_HttpLogByModle(Model.Sys_HttpLog table)
{
var q = from x in db.Sys_HttpLog
where
@ -32,15 +34,15 @@ namespace BLL
(string.IsNullOrEmpty(table.HttpUrl) || x.HttpUrl.Contains(table.HttpUrl)) &&
(string.IsNullOrEmpty(table.LogTxt) || x.LogTxt.Contains(table.LogTxt)) &&
(string.IsNullOrEmpty(table.MeThod) || x.MeThod.Contains(table.MeThod)) //&&
// (!table.LogTime.HasValue || (x.LogTime.HasValue && x.LogTime.Value.Date == table.LogTime.Value.Date))
// (!table.LogTime.HasValue || (x.LogTime.HasValue && x.LogTime.Value.Date == table.LogTime.Value.Date))
select x
select x
;
if (table.LogTime.HasValue)
{
q=q.Where(x=> x.LogTime.Value.Date.CompareTo(table.LogTime.Value.Date) == 0);
q = q.Where(x => x.LogTime.Value.Date.CompareTo(table.LogTime.Value.Date) == 0);
}
return q.OrderByDescending(x=>x.LogTime ).ToList();
return q;
}
/// 获取分页列表
@ -48,7 +50,7 @@ namespace BLL
/// <param name="PageIndex">页码</param>
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
public static IEnumerable getListData(Model.Sys_HttpLog table, Grid Grid1)
public static List<Sys_HttpLog> getListData(Model.Sys_HttpLog table, Grid Grid1)
{
var q = GetSys_HttpLogByModle(table);
count = q.Count();
@ -56,19 +58,10 @@ namespace BLL
{
return null;
}
q= q.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
q = q.OrderByDescending(x => x.LogTime).Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize);
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.HttpLogId,
x.LogTime,
x.UserName,
x.HttpUrl,
x.LogTxt,
x.MeThod,
};
return (from x in q
select x).ToList();
}
#endregion
@ -76,7 +69,10 @@ namespace BLL
{
return db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId);
}
public static DateTime? GetSys_HttpLogMaxDate()
{
return db.Sys_HttpLog.Max(x => x.LogTime);
}
public static void AddSys_HttpLog(Model.Sys_HttpLog newtable)
{
@ -139,5 +135,12 @@ namespace BLL
}
}
public static void aa()
{
}
}
}

View File

@ -20,13 +20,17 @@ namespace BLL
var list = (from x in Funs.DB.Sys_Menu where x.SuperMenu == superMenu orderby x.SortIndex select x).ToList();
return list;
}
public static Model.Sys_Menu GetSys_MenuById(string MenuId)
/// <summary>
/// 根据MenuId获取菜单名称项
/// </summary>
/// <param name="menuId"></param>
/// <returns></returns>
public static Model.Sys_Menu GetSupMenuBySuperMenu(string superMenu)
{
return Funs.DB.Sys_Menu.FirstOrDefault(e => e.MenuId == MenuId);
}
/// <summary>
/// 根据MenuId获取菜单名称项
/// </summary>
/// <param name="menuId"></param>
/// <returns></returns>
public static Model.Sys_Menu GetSupMenuBySuperMenu(string superMenu)
{
return Funs.DB.Sys_Menu.FirstOrDefault(x => x.SuperMenu == superMenu);
}
@ -91,6 +95,37 @@ namespace BLL
}
return lists;
}
}
public static void UpdateSys_Menu(Model.Sys_Menu newtable)
{
Model.Sys_Menu table = Funs.DB.Sys_Menu.FirstOrDefault(e => e.MenuId == newtable.MenuId);
if (table != null)
{
table.MenuId = newtable.MenuId;
table.IsUsed = newtable.IsUsed;
table.MenuName = newtable.MenuName;
table.Icon = newtable.Icon;
table.Url = newtable.Url;
table.SortIndex = newtable.SortIndex;
table.SuperMenu = newtable.SuperMenu;
table.MenuType = newtable.MenuType;
table.IsOffice = newtable.IsOffice;
table.IsEnd = newtable.IsEnd;
Funs.DB.SubmitChanges();
}
}
public static void SetAllIsUsed(string MenuType)
{
var q = from x in Funs.DB.Sys_Menu
where x.MenuType == MenuType
select x;
foreach (var p in q)
{
p.IsUsed = false;
}
db.SubmitChanges();
}
}
}

View File

@ -1711,3 +1711,58 @@ IP地址:::1
出错时间:03/21/2024 15:24:09
错误信息开始=====>
错误类型:SqlException
错误信息:列名 'CertificationDepartmentCodeRecords' 无效。
错误堆栈:
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 D:\数据\诺必达\成达\test\sggl_cd\SGGL\BLL\SQLHelper.cs:行号 311
在 FineUIPro.Web.HSSE.InApproveManager.EquipmentIn.BindGrid() 位置 D:\数据\诺必达\成达\test\sggl_cd\SGGL\FineUIPro.Web\HSSE\InApproveManager\EquipmentIn.aspx.cs:行号 98
在 FineUIPro.Web.HSSE.InApproveManager.EquipmentIn.Page_Load(Object sender, EventArgs e) 位置 D:\数据\诺必达\成达\test\sggl_cd\SGGL\FineUIPro.Web\HSSE\InApproveManager\EquipmentIn.aspx.cs:行号 56
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:03/29/2024 11:07:46
出错文件:http://localhost:1295/HSSE/InApproveManager/EquipmentIn.aspx
IP地址:::1
操作人员:JT
出错时间:03/29/2024 11:07:46
错误信息开始=====>
错误类型:IndexOutOfRangeException
错误信息:索引超出了数组界限。
错误堆栈:
在 BLL.DropListService.Sys_Menu_Type()
在 FineUIPro.Web.SysManage.SystemMenuSet.Page_Load(Object sender, EventArgs e) 位置 D:\数据\诺必达\成达\test\sggl_cd\SGGL\FineUIPro.Web\SysManage\SystemMenuSet.aspx.cs:行号 26
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:03/29/2024 16:27:40
出错文件:http://localhost:1295/SysManage/SystemMenuSet.aspx
IP地址:::1
操作人员:JT
出错时间:03/29/2024 16:27:40

View File

@ -1796,6 +1796,9 @@
<Content Include="SysManage\HttpLog.aspx" />
<Content Include="SysManage\OutputValueProject.aspx" />
<Content Include="SysManage\ADomain.aspx" />
<Content Include="SysManage\SystemMenuSet.aspx" />
<Content Include="SysManage\SystemMenuSetEdit.aspx" />
<Content Include="SysManage\SystemMenuSetMove.aspx" />
<Content Include="TaskScheduling\InterFace\IFLogList.aspx" />
<Content Include="TaskScheduling\InterFace\InterFaceEdit.aspx" />
<Content Include="TaskScheduling\InterFace\InterFaceSet.aspx" />
@ -15243,6 +15246,27 @@
<Compile Include="SysManage\SysConstSet.aspx.designer.cs">
<DependentUpon>SysConstSet.aspx</DependentUpon>
</Compile>
<Compile Include="SysManage\SystemMenuSet.aspx.cs">
<DependentUpon>SystemMenuSet.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SysManage\SystemMenuSet.aspx.designer.cs">
<DependentUpon>SystemMenuSet.aspx</DependentUpon>
</Compile>
<Compile Include="SysManage\SystemMenuSetEdit.aspx.cs">
<DependentUpon>SystemMenuSetEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SysManage\SystemMenuSetEdit.aspx.designer.cs">
<DependentUpon>SystemMenuSetEdit.aspx</DependentUpon>
</Compile>
<Compile Include="SysManage\SystemMenuSetMove.aspx.cs">
<DependentUpon>SystemMenuSetMove.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SysManage\SystemMenuSetMove.aspx.designer.cs">
<DependentUpon>SystemMenuSetMove.aspx</DependentUpon>
</Compile>
<Compile Include="SysManage\Unit.aspx.cs">
<DependentUpon>Unit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -54,6 +54,17 @@
<f:RenderField Width="120px" ColumnID="CarModel" DataField="CarModel" SortField="CarModel"
FieldType="String" HeaderText="车型" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="DriverName" DataField="DriverName" SortField="DriverName"
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="DriverCode" DataField="DriverCode" SortField="DriverCode"
FieldType="String" HeaderText="驾驶证号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="DrivingDate" DataField="DrivingDate" SortField="DrivingDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发证日期"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="BuyDate" DataField="BuyDate" SortField="BuyDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="购买日期"
HeaderTextAlign="Center" TextAlign="Center">

View File

@ -39,7 +39,7 @@ namespace FineUIPro.Web.HSSE.Administrative
/// </summary>
private void BindGrid()
{
string strSql = "SELECT CarManager.CarManagerId,CarManager.ProjectId,CodeRecords.Code AS CarManagerCode,CarManager.CarName,"
string strSql = "SELECT CarManager.CarManagerId,CarManager.ProjectId,CodeRecords.Code AS CarManagerCode,CarManager.CarName,CarManager.DriverCode,CarManager.DriverName,CarManager.DrivingDate,"
+ @"CarManager.CarModel,CarManager.BuyDate,CarManager.LastYearCheckDate,CarManager.Remark,CarManager.CompileMan,"
+ @"CarManager.CompileDate,CarManager.InsuranceDate,CarManager.States,"
+ @"(CASE WHEN CarManager.States = " + BLL.Const.State_0 + " OR CarManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN CarManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"

View File

@ -23,20 +23,31 @@
<f:TextBox ID="txtCarName" runat="server" Label="车牌号" LabelAlign="Right" MaxLength="50"
LabelWidth="120px" FocusOnPageLoad="true">
</f:TextBox>
<f:TextBox ID="txtCarModel" runat="server" Label="车型" LabelAlign="Right" MaxLength="50"
LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCarModel" runat="server" Label="车型" LabelAlign="Right" MaxLength="50"
LabelWidth="120px">
<f:TextBox ID="txtDriverName" runat="server" Label="驾驶员姓名" LabelAlign="Right" MaxLength="50"
LabelWidth="120px" FocusOnPageLoad="true">
</f:TextBox>
<f:DatePicker ID="txtBuyDate" runat="server" Label="购买日期" LabelAlign="Right" EnableEdit="true"
LabelWidth="120px">
<f:TextBox ID="txtDriverCode" runat="server" Label="驾驶证号" LabelAlign="Right" MaxLength="50"
LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtDrivingDate" runat="server" Label="发证日期" LabelAlign="Right" EnableEdit="true"
LabelWidth="120px">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtBuyDate" runat="server" Label="购买日期" LabelAlign="Right" EnableEdit="true"
LabelWidth="120px">
</f:DatePicker>
<f:DatePicker ID="txtLastYearCheckDate" runat="server" Label="年检有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>

View File

@ -62,6 +62,9 @@ namespace FineUIPro.Web.HSSE.Administrative
this.txtLastYearCheckDate.Text = string.Format("{0:yyyy-MM-dd}", carManager.LastYearCheckDate);
this.txtInsuranceDate.Text = string.Format("{0:yyyy-MM-dd}", carManager.InsuranceDate);
this.txtRemark.Text = carManager.Remark;
this.txtDriverName.Text=carManager.DriverName;
this.txtDriverCode.Text=carManager.DriverCode;
this.txtDrivingDate.SelectedDate=carManager.DrivingDate;
}
}
else
@ -127,7 +130,10 @@ namespace FineUIPro.Web.HSSE.Administrative
Remark = this.txtRemark.Text.Trim(),
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now,
States = BLL.Const.State_0
States = BLL.Const.State_0,
DriverName = txtDriverName.Text.Trim(),
DriverCode = txtDriverCode.Text.Trim(),
DrivingDate = txtDrivingDate.SelectedDate
};
if (type == BLL.Const.BtnSubmit)
{

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.Administrative {
public partial class CarManagerEdit {
namespace FineUIPro.Web.HSSE.Administrative
{
public partial class CarManagerEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtCarManagerCode 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarManagerCode;
/// <summary>
/// txtCarName 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarName;
/// <summary>
/// txtCarModel 控件。
/// </summary>
@ -65,7 +67,34 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarModel;
/// <summary>
/// txtDriverName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDriverName;
/// <summary>
/// txtDriverCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDriverCode;
/// <summary>
/// txtDrivingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtDrivingDate;
/// <summary>
/// txtBuyDate 控件。
/// </summary>
@ -74,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtBuyDate;
/// <summary>
/// txtLastYearCheckDate 控件。
/// </summary>
@ -83,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtLastYearCheckDate;
/// <summary>
/// txtInsuranceDate 控件。
/// </summary>
@ -92,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtInsuranceDate;
/// <summary>
/// txtRemark 控件。
/// </summary>
@ -101,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
@ -110,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ctlAuditFlow 控件。
/// </summary>
@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
@ -164,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// btnClose 控件。
/// </summary>
@ -173,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -19,30 +19,41 @@
<f:FormRow>
<Items>
<f:TextBox ID="txtCarManagerCode" runat="server" Label="编号" LabelAlign="Right"
Readonly="true" LabelWidth="120px">
MaxLength="50" Required="true" ShowRedStar="true" Readonly="true" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtCarName" runat="server" Label="车牌号" LabelAlign="Right" Readonly="true"
LabelWidth="120px">
<f:TextBox ID="txtCarName" runat="server" Label="车牌号" LabelAlign="Right" MaxLength="50"
LabelWidth="120px" FocusOnPageLoad="true">
</f:TextBox>
<f:TextBox ID="txtCarModel" runat="server" Label="车型" LabelAlign="Right" MaxLength="50"
LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCarModel" runat="server" Label="车型" LabelAlign="Right" Readonly="true"
LabelWidth="120px">
<f:TextBox ID="txtDriverName" runat="server" Label="驾驶员姓名" LabelAlign="Right" MaxLength="50"
LabelWidth="120px" FocusOnPageLoad="true">
</f:TextBox>
<f:TextBox ID="txtBuyDate" runat="server" Label="购买日期" LabelAlign="Right" Readonly="true"
LabelWidth="120px">
<f:TextBox ID="txtDriverCode" runat="server" Label="驾驶证号" LabelAlign="Right" MaxLength="50"
LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtDrivingDate" runat="server" Label="发证日期" LabelAlign="Right" EnableEdit="true"
LabelWidth="120px">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtBuyDate" runat="server" Label="购买日期" LabelAlign="Right" EnableEdit="true"
LabelWidth="120px">
</f:DatePicker>
<f:DatePicker ID="txtLastYearCheckDate" runat="server" Label="年检有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:DatePicker ID="txtInsuranceDate" runat="server" Label="保险有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
</Items>
</f:FormRow>

View File

@ -46,6 +46,9 @@ namespace FineUIPro.Web.HSSE.Administrative
this.txtLastYearCheckDate.Text = string.Format("{0:yyyy-MM-dd}", carManager.LastYearCheckDate);
this.txtInsuranceDate.Text = string.Format("{0:yyyy-MM-dd}", carManager.InsuranceDate);
this.txtRemark.Text = carManager.Remark;
this.txtDriverName.Text = carManager.DriverName;
this.txtDriverCode.Text = carManager.DriverCode;
this.txtDrivingDate.SelectedDate = carManager.DrivingDate;
}
}
///初始化审核菜单

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.Administrative {
public partial class CarManagerView {
namespace FineUIPro.Web.HSSE.Administrative
{
public partial class CarManagerView
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtCarManagerCode 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarManagerCode;
/// <summary>
/// txtCarName 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarName;
/// <summary>
/// txtCarModel 控件。
/// </summary>
@ -65,7 +67,34 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCarModel;
/// <summary>
/// txtDriverName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDriverName;
/// <summary>
/// txtDriverCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDriverCode;
/// <summary>
/// txtDrivingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtDrivingDate;
/// <summary>
/// txtBuyDate 控件。
/// </summary>
@ -73,8 +102,8 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtBuyDate;
protected global::FineUIPro.DatePicker txtBuyDate;
/// <summary>
/// txtLastYearCheckDate 控件。
/// </summary>
@ -83,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtLastYearCheckDate;
/// <summary>
/// txtInsuranceDate 控件。
/// </summary>
@ -92,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtInsuranceDate;
/// <summary>
/// txtRemark 控件。
/// </summary>
@ -101,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
@ -110,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ctlAuditFlow 控件。
/// </summary>
@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnClose 控件。
/// </summary>
@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Administrative {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -64,11 +64,31 @@
<f:RenderField Width="150px" ColumnID="CarNumber" DataField="CarNumber" SortField="CarNumber"
FieldType="String" HeaderText="车牌号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="140px" ColumnID="OwnerCheck" DataField="OwnerCheck" SortField="OwnerCheck"
FieldType="String" HeaderText="进场前自查自检情况" HeaderTextAlign="Center" TextAlign="Left">
<f:RenderField Width="100px" ColumnID="InsuredAmount" DataField="InsuredAmount"
SortField="InsuredAmount" FieldType="String" HeaderText="保额(元)" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="CertificateNum" DataField="CertificateNum"
<f:BoundField Width="140px" DataField="EququalityExpireDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="设备资质有效期" />
<f:BoundField Width="140px" DataField="InDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="进场时间" />
<f:RenderField Width="160px" ColumnID="OwnerCheck" DataField="OwnerCheck" SortField="OwnerCheck"
FieldType="String" HeaderText="进场前自查自检情况" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="160px" ColumnID="OperatorName" DataField="OperatorName"
SortField="OperatorName" FieldType="String" HeaderText="操作人员姓名" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="OperatorIdentityCard" DataField="OperatorIdentityCard"
SortField="OperatorIdentityCard" FieldType="String" HeaderText="操作人员身份证号" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<f:BoundField Width="180px" DataField="OperatorQualityExpireDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="操作人员资质有效期" />
<f:RenderField Width="160px" ColumnID="CertificationDepartment" DataField="CertificationDepartment"
SortField="CertificationDepartment" FieldType="String" HeaderText="发证部门" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
<%--<f:RenderField Width="130px" ColumnID="CertificateNum" DataField="CertificateNum"
SortField="CertificateNum" FieldType="String" HeaderText="施工设备合格证号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
@ -94,7 +114,7 @@
<f:RenderField Width="100px" ColumnID="CommercialInsuranceNum" DataField="CommercialInsuranceNum"
SortField="CommercialInsuranceNum" FieldType="String" HeaderText="商业险保单号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</f:RenderField>--%>
<f:CheckBoxField Width="60px" SortField="IsUsed" RenderAsStaticField="true" DataField="IsUsed"
HeaderText="在用" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>

View File

@ -63,7 +63,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
{
string strSql = "SELECT EquipmentIn.EquipmentInId,EquipmentInItem.EquipmentInItemId,"
+ @"EquipmentIn.ProjectId,"
+ @"EquipmentInItem.SpecialEquipmentId,EquipmentInItem.SizeModel,EquipmentInItem.OwnerCheck,EquipmentInItem.CertificateNum,EquipmentInItem.SafetyInspectionNum,EquipmentInItem.DrivingLicenseNum,EquipmentInItem.RegistrationNum,EquipmentInItem.OperationQualificationNum,EquipmentInItem.InsuranceNum,EquipmentInItem.CommercialInsuranceNum,EquipmentInItem.IsUsed,EquipmentInItem.IsIn,"
+ @"EquipmentInItem.SpecialEquipmentId,EquipmentInItem.SizeModel,EquipmentInItem.OwnerCheck,EquipmentInItem.CertificateNum,EquipmentInItem.SafetyInspectionNum,EquipmentInItem.DrivingLicenseNum,EquipmentInItem.RegistrationNum,EquipmentInItem.OperationQualificationNum,EquipmentInItem.InsuranceNum,EquipmentInItem.CommercialInsuranceNum,EquipmentInItem.IsUsed,EquipmentInItem.IsIn,EquipmentInItem.InDate,EquipmentInItem.EququalityExpireDate,EquipmentInItem.InsuredAmount,EquipmentInItem.OperatorName,EquipmentInItem.OperatorIdentityCard,EquipmentInItem.OperatorQualityExpireDate,EquipmentInItem.CertificationDepartment ,"
+ @"CodeRecords.Code AS EquipmentInCode,"
+ @"EquipmentIn.UnitId,"
+ @"EquipmentIn.CarNumber,"

View File

@ -119,12 +119,33 @@
SortField="CommercialInsuranceNum" FieldType="String" HeaderText="商业险保单号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:BoundField Width="100px" DataField="InDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="进场时间" />
<f:BoundField Width="100px" DataField="EququalityExpireDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="设备资质有效期" />
<f:RenderField Width="100px" ColumnID="InsuredAmount" DataField="InsuredAmount"
SortField="InsuredAmount" FieldType="String" HeaderText="保额(元)" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OperatorName" DataField="OperatorName"
SortField="OperatorName" FieldType="String" HeaderText="操作人员姓名" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OperatorIdentityCard" DataField="OperatorIdentityCard"
SortField="OperatorIdentityCard" FieldType="String" HeaderText="操作人员身份证号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:BoundField Width="100px" DataField="OperatorQualityExpireDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="操作人员资质有效期" />
<f:RenderField Width="100px" ColumnID="CertificationDepartment" DataField="CertificationDepartment"
SortField="CertificationDepartment" FieldType="String" HeaderText="发证部门" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:CheckBoxField Width="60px" SortField="IsUsed" RenderAsStaticField="true" DataField="IsUsed"
HeaderText="在用" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
HeaderText="在用" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField Width="60px" SortField="IsIn" RenderAsStaticField="true" DataField="IsIn"
HeaderText="在场" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
HeaderText="在场" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -30,12 +30,12 @@
<f:FormRow>
<Items>
<f:DatePicker runat="server" ID="dt1" Label="设备资质有效期" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
<f:DatePicker runat="server" ID="dtEququalityExpireDate" Label="设备资质有效期" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" ID="DatePicker1" Label="进场时间" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
<f:DatePicker runat="server" ID="dtInDate" Label="进场时间" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
</Items>
</f:FormRow>
@ -84,7 +84,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="TextBox1" runat="server" Label="保额" LabelAlign="Right" MaxLength="50" LabelWidth="150px">
<f:TextBox ID="txtInsuredAmount" runat="server" Label="保额(元)" LabelAlign="Right" MaxLength="50" LabelWidth="150px" InputType="number">
</f:TextBox>
</Items>
</f:FormRow>
@ -103,26 +103,26 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="TextBox2" runat="server" Label="操作人员姓名" LabelAlign="Right"
<f:TextBox ID="txtOperatorName" runat="server" Label="操作人员姓名" LabelAlign="Right"
MaxLength="50" LabelWidth="150px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="TextBox3" runat="server" Label="操作人员身份证号" LabelAlign="Right"
<f:TextBox ID="txtOperatorIdentityCard" runat="server" Label="操作人员身份证号" LabelAlign="Right"
MaxLength="50" LabelWidth="150px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" ID="DatePicker2" Label="操作人员资质有效期" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
<f:DatePicker runat="server" ID="dtOperatorQualityExpireDate" Label="操作人员资质有效期" LabelAlign="Right" MaxLength="50" LabelWidth="150px"/>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="TextBox4" runat="server" Label="发证部门" LabelAlign="Right"
<f:TextBox ID="txtCertificationDepartment" runat="server" Label="发证部门" LabelAlign="Right"
MaxLength="50" LabelWidth="150px">
</f:TextBox>
</Items>

View File

@ -73,6 +73,14 @@ namespace FineUIPro.Web.HSSE.InApproveManager
this.txtOperationQualificationNum.Text = equipmentInItem.OperationQualificationNum;
this.txtInsuranceNum.Text = equipmentInItem.InsuranceNum;
this.txtCommercialInsuranceNum.Text = equipmentInItem.CommercialInsuranceNum;
this.dtInDate.SelectedDate = equipmentInItem.InDate;
this.dtEququalityExpireDate.SelectedDate = equipmentInItem.EququalityExpireDate;
this.txtInsuredAmount.Text = equipmentInItem.InsuredAmount.ToString();
this.txtOperatorName.Text = equipmentInItem.OperatorName;
this.txtOperatorIdentityCard.Text = equipmentInItem.OperatorIdentityCard;
this.dtOperatorQualityExpireDate.SelectedDate = equipmentInItem.OperatorQualityExpireDate;
this.txtCertificationDepartment.Text = equipmentInItem.CertificationDepartment;
if (equipmentInItem.IsUsed != true)
{
this.cbIsUsed.Checked = false;
@ -119,6 +127,14 @@ namespace FineUIPro.Web.HSSE.InApproveManager
equipmentInItem.CommercialInsuranceNum = this.txtCommercialInsuranceNum.Text.Trim();
equipmentInItem.IsUsed = Convert.ToBoolean(this.cbIsUsed.Checked);
equipmentInItem.IsIn = Convert.ToBoolean(this.cbIsIn.Checked);
equipmentInItem.InDate = dtInDate.SelectedDate;
equipmentInItem.EququalityExpireDate = this.dtEququalityExpireDate.SelectedDate;
equipmentInItem.InsuredAmount = Funs.GetNewDecimalOrZero(this.txtInsuredAmount.Text) ;
equipmentInItem.OperatorName = this.txtOperatorName.Text.Trim();
equipmentInItem.OperatorIdentityCard = this.txtOperatorIdentityCard.Text.Trim();
equipmentInItem.OperatorQualityExpireDate = this.dtOperatorQualityExpireDate.SelectedDate;
equipmentInItem.CertificationDepartment = this.txtCertificationDepartment.Text.Trim();
if (!string.IsNullOrEmpty(this.EquipmentInItemId))
{
equipmentInItem.EquipmentInItemId = this.EquipmentInItemId;

View File

@ -60,22 +60,22 @@ namespace FineUIPro.Web.HSSE.InApproveManager
protected global::FineUIPro.TextBox txtSizeModel;
/// <summary>
/// dt1 控件。
/// dtEququalityExpireDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker dt1;
protected global::FineUIPro.DatePicker dtEququalityExpireDate;
/// <summary>
/// DatePicker1 控件。
/// dtInDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker DatePicker1;
protected global::FineUIPro.DatePicker dtInDate;
/// <summary>
/// txtOwnerCheck 控件。
@ -132,13 +132,13 @@ namespace FineUIPro.Web.HSSE.InApproveManager
protected global::FineUIPro.TextBox txtOperationQualificationNum;
/// <summary>
/// TextBox1 控件。
/// txtInsuredAmount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox TextBox1;
protected global::FineUIPro.TextBox txtInsuredAmount;
/// <summary>
/// txtInsuranceNum 控件。
@ -159,40 +159,40 @@ namespace FineUIPro.Web.HSSE.InApproveManager
protected global::FineUIPro.TextBox txtCommercialInsuranceNum;
/// <summary>
/// TextBox2 控件。
/// txtOperatorName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox TextBox2;
protected global::FineUIPro.TextBox txtOperatorName;
/// <summary>
/// TextBox3 控件。
/// txtOperatorIdentityCard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox TextBox3;
protected global::FineUIPro.TextBox txtOperatorIdentityCard;
/// <summary>
/// DatePicker2 控件。
/// dtOperatorQualityExpireDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker DatePicker2;
protected global::FineUIPro.DatePicker dtOperatorQualityExpireDate;
/// <summary>
/// TextBox4 控件。
/// txtCertificationDepartment 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox TextBox4;
protected global::FineUIPro.TextBox txtCertificationDepartment;
/// <summary>
/// cbIsUsed 控件。

View File

@ -30,10 +30,10 @@
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="HTTP请求日志表" EnableCollapse="true"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="HTTP请求日志表" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="HttpLogId" AllowCellEditing="true" EnableTextSelection="true"
ClicksToEdit="2" DataIDField="HttpLogId" AllowSorting="true" SortField="HttpLogId"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" FixedRowHeight="true" RowHeight="72px" OnRowDoubleClick="Grid1_RowDoubleClick"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" >
<Toolbars>
@ -74,7 +74,7 @@
<f:RenderField Width="450px" ColumnID="LogTxt" DataField="LogTxt" SortField="LogTxt"
FieldType="String" HeaderText="日志信息" TextAlign="Left" HeaderTextAlign="Center" >
</f:RenderField>
<f:RenderField Width="150px" ColumnID="MeThod" DataField="MeThod" SortField="MeThod"
<f:RenderField Width="150px" ColumnID="MeThod" DataField="MeThod" SortField="MeThod" ShowToolTip="True"
FieldType="String" HeaderText="方法" TextAlign="Left" HeaderTextAlign="Center" >
</f:RenderField>
@ -104,9 +104,14 @@
Title="编辑Sys_HttpLog" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
</f:Menu>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit" >
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnDelete_Click" EnablePostBack="true" Icon="Delete"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';

View File

@ -20,6 +20,7 @@ namespace FineUIPro.Web.SysManage
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
txtLogTime.SelectedDate= SysHttplogService.GetSys_HttpLogMaxDate();
// 绑定表格
this.BindGrid();
}
@ -163,5 +164,71 @@ namespace FineUIPro.Web.SysManage
{
BindGrid();
}
#region
/// <summary>
/// 新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HttpLogEdit.aspx?HttpLogId={0}", string.Empty, "增加 - ")));
}
/// <summary>
/// 编辑按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string ID = Grid1.SelectedRowID;
var model = BLL.SysHttplogService.GetSys_HttpLogById(ID);
if (model != null) ///已上报时不能删除
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HttpLogEdit.aspx?HttpLogId={0}", ID, "编辑 - ")));
}
}
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.btnEdit_Click(null, null);
}
/// <summary>
/// 批量删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var model = BLL.SysHttplogService.GetSys_HttpLogById(rowID);
if (model != null)
{
BLL.SysHttplogService.DeleteSys_HttpLogById(rowID);
}
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#endregion
}
}

View File

@ -184,5 +184,23 @@ namespace FineUIPro.Web.SysManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}

View File

@ -449,6 +449,9 @@
</f:Toolbar>
</Toolbars>
</f:Tab>
<f:Tab ID="TabSystemMenuSet" Title="菜单设置" BodyPadding="5px" Height="600" Layout="Fit" EnableIFrame="true" IconFont="Bookmark" IFrameUrl="./SystemMenuSet.aspx" Hidden="true" runat="server">
</f:Tab>
<f:Tab ID="TabHttpLog" Title="接口日志查询" BodyPadding="5px" Height="600" Layout="Fit" EnableIFrame="true" IconFont="Bookmark" IFrameUrl="./HttpLog.aspx" Hidden="true" runat="server">
</f:Tab>
</Tabs>

View File

@ -23,6 +23,12 @@ namespace FineUIPro.Web.SysManage
{
if (!IsPostBack)
{
if (this.CurrUser.UserId == Const.hfnbdId)
{
this.TabSystemMenuSet.Hidden = false;
this.TabHttpLog.Hidden = false;
this.TabOnlineMenuSet.Hidden = false;
}
//if (this.CurrUser.UserId == BLL.Const.sysglyId || this.CurrUser.UserId == BLL.Const.hfnbdId)
//{
// this.btnArrowRefresh.Hidden = false;

View File

@ -986,6 +986,15 @@ namespace FineUIPro.Web.SysManage
/// </remarks>
protected global::FineUIPro.Button OnlineMenuSetSave;
/// <summary>
/// TabSystemMenuSet 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab TabSystemMenuSet;
/// <summary>
/// TabHttpLog 控件。
/// </summary>

View File

@ -0,0 +1,91 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemMenuSet.aspx.cs" Inherits="FineUIPro.Web.SysManage.SystemMenuSet" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>功能菜单设置</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
<f:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="160px" EnableCollapse="false"
BodyPadding="10px" ShowBorder="true" ShowHeader="true" AutoScroll="True"
Title="菜单设置">
<Items>
<f:CheckBoxList ID="ckMenuType" Label="菜单类型" runat="server" AutoColumnWidth="true" ColumnNumber="10"
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="ckMenuType_OnSelectedIndexChanged">
<Listeners>
<f:Listener Event="change" Handler="onCheckBoxListChange" />
</Listeners>
</f:CheckBoxList>
</Items>
<Items>
<f:Tree ID="tvMenu" EnableCollapse="true" ShowHeader="false" Title="系统菜单" ShowBorder="false"
AutoLeafIdentification="true" runat="server" EnableIcons="true"
EnableSingleClickExpand="true" OnNodeCheck="tvMenu_NodeCheck" EnableCheckBox="true">
<Listeners>
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
</Listeners>
</f:Tree>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnTab2Save" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
OnClick="btnTab2Save_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:SimpleForm>
<f:Window ID="Window1" Title="设置" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="1000px" Height="570px">
</f:Window>
<f:Menu ID="Menu2" runat="server">
<%-- <f:MenuButton ID="btnMenuADD" OnClick="btnMenuADD_Click" EnablePostBack="true"
runat="server" Text="新增" Icon="Add" Hidden="true">
</f:MenuButton>--%>
<f:MenuButton ID="btnTreeMenuEdit" OnClick="btnTreeMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Hidden="true" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnTreeMenuMove" OnClick="btnTreeMenuMove_Click" EnablePostBack="true"
runat="server" Text="迁移" Hidden="true" Icon="Pencil">
</f:MenuButton>
<%--<f:MenuButton ID="btnTreeMenuDelete" OnClick="btnTreeMenuDelete_Click" EnablePostBack="true"
Icon="Delete" ConfirmText="删除选中节点?" ConfirmTarget="Parent" runat="server" Text="删除"
Hidden="true">
</f:MenuButton>--%>
</f:Menu>
</form>
<script type="text/javascript">
// 同时只能选中一项
function onCheckBoxListChange(event, checkbox, isChecked) {
var me = this;
// 当前操作是:选中
if (isChecked) {
// 仅选中这一项
me.setValue(checkbox.getInputValue());
}
// __doPostBack('', 'CheckBoxList1Change');
}
var treeID = '<%= tvMenu.ClientID %>';
var menuID2 = '<%= Menu2.ClientID %>';
// 保存当前菜单对应的树节点ID
var currentNodeId;
// 返回false来阻止浏览器右键菜单
function onTreeNodeContextMenu(event, nodeId) {
currentNodeId = nodeId;
F(menuID2).show();
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -0,0 +1,224 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSet : PageBase
{
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
this.ckMenuType.DataTextField = "Text";
this.ckMenuType.DataValueField = "Value";
this.ckMenuType.DataSource = BLL.DropListService.Sys_Menu_Type();
this.ckMenuType.DataBind();
/// 加载菜单树
this.InitMenuTree(String.Join(", ", this.ckMenuType.SelectedValueArray));
}
}
#region Tab2
/// <summary>
/// 菜单类型选择
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ckMenuType_OnSelectedIndexChanged(object sender, EventArgs e)
{
this.InitMenuTree(String.Join(", ", this.ckMenuType.SelectedValueArray));
}
#region
/// <summary>
/// 初始化树
/// </summary>
/// <param name="menuList">菜单集合</param>
private void InitMenuTree(string menuType)
{
this.tvMenu.Nodes.Clear();
var menus = BLL.SysMenuService.GetMenuListByMenuType(menuType);
if (menus.Count() > 0)
{
TreeNode rootNode = new TreeNode
{
Text = "菜单",
NodeID = "0",
EnableCheckBox = true,
EnableCheckEvent = true,
Expanded = true
};
this.tvMenu.Nodes.Add(rootNode);
this.BoundTree(rootNode.Nodes, menus, rootNode.NodeID);
}
}
/// <summary>
/// 遍历增加子节点
/// </summary>
/// <param name="nodes"></param>
/// <param name="menuId"></param>
private void BoundTree(TreeNodeCollection nodes, List<Model.Sys_Menu> sysMenus, string superMenuId)
{
var menus = sysMenus.Where(x => x.SuperMenu == superMenuId).OrderBy(x => x.SortIndex);
if (menus.Count() > 0)
{
foreach (var item in menus)
{
TreeNode chidNode = new TreeNode
{
Text = item.MenuName,
NodeID = item.MenuId,
EnableCheckBox = true,
EnableCheckEvent = true
};
if (item.IsUsed == true)
{
chidNode.Checked = true;
chidNode.Expanded = true;
chidNode.Selectable = true;
}
nodes.Add(chidNode);
if (!item.IsEnd.HasValue || item.IsEnd == false)
{
this.BoundTree(chidNode.Nodes, sysMenus, item.MenuId);
}
}
}
}
#endregion
#region
/// <summary>
/// 全选、全不选
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvMenu_NodeCheck(object sender, FineUIPro.TreeCheckEventArgs e)
{
if (e.Checked)
{
this.tvMenu.CheckAllNodes(e.Node.Nodes);
SetCheckParentNode(e.Node);
}
else
{
this.tvMenu.UncheckAllNodes(e.Node.Nodes);
}
}
/// <summary>
/// 选中父节点
/// </summary>
/// <param name="node"></param>
private void SetCheckParentNode(TreeNode node)
{
if (node.ParentNode != null && node.ParentNode.NodeID != "0")
{
node.ParentNode.Checked = true;
if (node.ParentNode.ParentNode.NodeID != "0")
{
SetCheckParentNode(node.ParentNode);
}
}
}
#endregion
#region Tab2保存按钮
/// <summary>
/// Tab2保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnTab2Save_Click(object sender, EventArgs e)
{
string menuTyp = String.Join(", ", this.ckMenuType.SelectedValueArray);
if (!string.IsNullOrEmpty(menuTyp))
{
BLL.SysMenuService.SetAllIsUsed(menuTyp);
TreeNode[] nodes = this.tvMenu.GetCheckedNodes();
if (nodes.Length > 0)
{
foreach (TreeNode tn in nodes)
{
if (tn.NodeID != "0")
{
if (BLL.RolePowerService.IsExistMenu(tn.NodeID))
{
var menu = Funs.DB.Sys_Menu.FirstOrDefault(x => x.MenuId == tn.NodeID);
if (menu != null)
{
menu.IsUsed=true;
BLL.SysMenuService.UpdateSys_Menu(menu);
}
}
}
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
}
#endregion
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (this.CurrUser.Account=="hfnbd")
{
this.btnTreeMenuEdit.Hidden = false;
this.btnTreeMenuMove.Hidden = false;
this.btnTab2Save.Hidden = false;
}
//if (this.CurrUser.UserId == BLL.Const.sysglyId)
//{
// this.btnRefresh.Hidden = false;
// this.btnRefresh1.Hidden = false;
//}
}
#endregion
protected void btnTreeMenuEdit_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SystemMenuSetEdit.aspx?MenuId={0}", this.tvMenu.SelectedNodeID, "编辑 - ")));
}
protected void btnTreeMenuMove_Click(object sender, EventArgs e)
{
if (this.tvMenu.SelectedNodeID=="0")
{
Alert.ShowInParent("暂不支持根节点迁移!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SystemMenuSetMove.aspx?MenuId={0}", this.tvMenu.SelectedNodeID, "编辑 - ")));
}
}
}

View File

@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSet
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// ckMenuType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList ckMenuType;
/// <summary>
/// tvMenu 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvMenu;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// btnTab2Save 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnTab2Save;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu2;
/// <summary>
/// btnTreeMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnTreeMenuEdit;
/// <summary>
/// btnTreeMenuMove 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnTreeMenuMove;
}
}

View File

@ -0,0 +1,61 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemMenuSetEdit.aspx.cs" Inherits="FineUIPro.Web.SysManage.SystemMenuSetEdit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑单位设置</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtMenuName" runat="server" Label="菜单名称" Required="true"
MaxLength="200" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtUrl" runat="server" Label="菜单地址"
MaxLength="200" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox Label="排序" ID="txtSortIndex" runat="server"
NoDecimal="true" NoNegative="true" Required="true"
ShowRedStar="true" />
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rbIsUsed" Label="是否使用">
<f:RadioItem Value="1" Text="是" Selected="true" />
<f:RadioItem Value="0" Text="否" />
</f:RadioButtonList>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="false"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,97 @@
using System;
using System.Linq;
using BLL;
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSetEdit : PageBase
{
#region
/// <summary>
/// 单位主键
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.MenuId=Request.Params["MenuId"];
if (!string.IsNullOrEmpty(MenuId))
{
var menu=BLL.SysMenuService.GetSys_MenuById(MenuId);
if (menu != null)
{
this.txtMenuName.Text = menu.MenuName;
this.txtUrl.Text = menu.Url;
this.txtSortIndex.Text = menu.SortIndex.ToString();
this.rbIsUsed.SelectedValue=menu.IsUsed.ToString()=="True"?"1":"0";
}
}
}
}
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
var menu = BLL.SysMenuService.GetSys_MenuById(MenuId);
if (menu != null)
{
menu.MenuName=this.txtMenuName.Text;
menu.Url= this.txtUrl.Text ;
menu.SortIndex = Funs.GetNewInt(this.txtSortIndex.Text);
if (this.rbIsUsed.SelectedValue=="1")
{
menu.IsUsed =true ;
}
else
{
menu.IsUsed = false;
}
SysMenuService.UpdateSys_Menu(menu);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,107 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSetEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtMenuName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMenuName;
/// <summary>
/// txtUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUrl;
/// <summary>
/// txtSortIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSortIndex;
/// <summary>
/// rbIsUsed 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rbIsUsed;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}

View File

@ -0,0 +1,60 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemMenuSetMove.aspx.cs" Inherits="FineUIPro.Web.SysManage.SystemMenuSetMove" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑单位设置</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:CheckBoxList ID="ckMenuType" Label="菜单类型" runat="server" AutoColumnWidth="true" ColumnNumber="8"
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="ckMenuType_OnSelectedIndexChanged">
<Listeners>
<f:Listener Event="change" Handler="onCheckBoxListChange" />
</Listeners>
</f:CheckBoxList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Tree ID="tvMenu" EnableCollapse="true" ShowHeader="false" Title="系统菜单" Height="500px" ShowBorder="false"
AutoLeafIdentification="true" runat="server" EnableIcons="true" AutoScroll="true"
EnableSingleClickExpand="true" EnableCheckBox="false">
</f:Tree>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="false"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
<script type="text/javascript">
function onCheckBoxListChange(event, checkbox, isChecked) {
var me = this;
// 当前操作是:选中
if (isChecked) {
// 仅选中这一项
me.setValue(checkbox.getInputValue());
}
// __doPostBack('', 'CheckBoxList1Change');
}
</script>
</body>
</html>

View File

@ -0,0 +1,175 @@
using System;
using System.Linq;
using BLL;
using System.Collections.Generic;
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSetMove : PageBase
{
#region
/// <summary>
/// 单位主键
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.MenuId=Request.Params["MenuId"];
this.ckMenuType.DataTextField = "Text";
this.ckMenuType.DataValueField = "Value";
this.ckMenuType.DataSource = BLL.DropListService.Sys_Menu_Type();
this.ckMenuType.DataBind();
this.InitMenuTree(String.Join(", ", this.ckMenuType.SelectedValueArray));
if (!string.IsNullOrEmpty(MenuId))
{
var menu=BLL.SysMenuService.GetSys_MenuById(MenuId);
if (menu != null)
{
//this.txtMenuName.Text = menu.MenuName;
//this.txtUrl.Text = menu.Url;
//this.txtSortIndex.Text = menu.SortIndex.ToString();
//this.rbIsUsed.SelectedValue=menu.IsUsed.ToString()=="True"?"1":"0";
}
}
}
}
#region
/// <summary>
/// 初始化树
/// </summary>
/// <param name="menuList">菜单集合</param>
private void InitMenuTree(string menuType)
{
this.tvMenu.Nodes.Clear();
var menus = BLL.SysMenuService.GetMenuListByMenuType(menuType);
if (menus.Count() > 0)
{
TreeNode rootNode = new TreeNode
{
Text = "菜单",
NodeID = "0",
EnableCheckBox = true,
EnableCheckEvent = true,
Expanded = true
};
this.tvMenu.Nodes.Add(rootNode);
this.BoundTree(rootNode.Nodes, menus, rootNode.NodeID);
}
}
/// <summary>
/// 遍历增加子节点
/// </summary>
/// <param name="nodes"></param>
/// <param name="menuId"></param>
private void BoundTree(TreeNodeCollection nodes, List<Model.Sys_Menu> sysMenus, string superMenuId)
{
var menus = sysMenus.Where(x => x.SuperMenu == superMenuId &&x.IsEnd==false).OrderBy(x => x.SortIndex);
if (menus.Count() > 0)
{
foreach (var item in menus)
{
TreeNode chidNode = new TreeNode
{
Text = item.MenuName,
NodeID = item.MenuId,
EnableCheckBox = true,
EnableCheckEvent = true
};
if (item.IsUsed == true)
{
chidNode.Checked = true;
chidNode.Expanded = true;
chidNode.Selectable = true;
}
nodes.Add(chidNode);
if (!item.IsEnd.HasValue || item.IsEnd == false)
{
this.BoundTree(chidNode.Nodes, sysMenus, item.MenuId);
}
}
}
}
#endregion
protected void ckMenuType_OnSelectedIndexChanged(object sender, EventArgs e)
{
this.InitMenuTree(String.Join(", ", this.ckMenuType.SelectedValueArray));
}
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string MenuType = String.Join(", ", this.ckMenuType.SelectedValueArray);
string newSuperMenuId = this.tvMenu.SelectedNodeID;
if (MenuType=="")
{
Alert.ShowInParent("请选择菜单类型!", MessageBoxIcon.Warning);
return;
}
if (newSuperMenuId == "")
{
Alert.ShowInParent("请选择要迁移到的菜单!", MessageBoxIcon.Warning);
return;
}
var menu = BLL.SysMenuService.GetSys_MenuById(MenuId);
if (menu != null)
{
menu.SuperMenu = newSuperMenuId;
menu.MenuType = MenuType;
SysMenuService.UpdateSys_Menu(menu);
}
var Menu_Child = SysMenuService.GetSupMenuListBySuperMenu(MenuId);
foreach (var item in Menu_Child)
{
item.MenuType = MenuType;
SysMenuService.UpdateSys_Menu(item);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,89 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage
{
public partial class SystemMenuSetMove
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ckMenuType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList ckMenuType;
/// <summary>
/// tvMenu 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvMenu;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}

View File

@ -180,6 +180,18 @@
<assemblyIdentity name="System.Configuration.ConfigurationManager" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -15979,6 +15979,12 @@ namespace Model
private System.Nullable<System.DateTime> _InsuranceDate;
private string _DriverName;
private string _DriverCode;
private System.Nullable<System.DateTime> _DrivingDate;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Sys_User> _Sys_User;
@ -16011,6 +16017,12 @@ namespace Model
partial void OnStatesChanged();
partial void OnInsuranceDateChanging(System.Nullable<System.DateTime> value);
partial void OnInsuranceDateChanged();
partial void OnDriverNameChanging(string value);
partial void OnDriverNameChanged();
partial void OnDriverCodeChanging(string value);
partial void OnDriverCodeChanged();
partial void OnDrivingDateChanging(System.Nullable<System.DateTime> value);
partial void OnDrivingDateChanged();
#endregion
public Administrative_CarManager()
@ -16268,6 +16280,66 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverName", DbType="NVarChar(50)")]
public string DriverName
{
get
{
return this._DriverName;
}
set
{
if ((this._DriverName != value))
{
this.OnDriverNameChanging(value);
this.SendPropertyChanging();
this._DriverName = value;
this.SendPropertyChanged("DriverName");
this.OnDriverNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverCode", DbType="NVarChar(50)")]
public string DriverCode
{
get
{
return this._DriverCode;
}
set
{
if ((this._DriverCode != value))
{
this.OnDriverCodeChanging(value);
this.SendPropertyChanging();
this._DriverCode = value;
this.SendPropertyChanged("DriverCode");
this.OnDriverCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrivingDate", DbType="DateTime")]
public System.Nullable<System.DateTime> DrivingDate
{
get
{
return this._DrivingDate;
}
set
{
if ((this._DrivingDate != value))
{
this.OnDrivingDateChanging(value);
this.SendPropertyChanging();
this._DrivingDate = value;
this.SendPropertyChanged("DrivingDate");
this.OnDrivingDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Administrative_CarManager_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@ -180683,6 +180755,20 @@ namespace Model
private System.Nullable<bool> _IsIn;
private System.Nullable<System.DateTime> _InDate;
private System.Nullable<System.DateTime> _EququalityExpireDate;
private System.Nullable<decimal> _InsuredAmount;
private string _OperatorName;
private string _OperatorIdentityCard;
private System.Nullable<System.DateTime> _OperatorQualityExpireDate;
private string _CertificationDepartment;
private EntityRef<Base_SpecialEquipment> _Base_SpecialEquipment;
private EntityRef<InApproveManager_EquipmentIn> _InApproveManager_EquipmentIn;
@ -180719,6 +180805,20 @@ namespace Model
partial void OnIsUsedChanged();
partial void OnIsInChanging(System.Nullable<bool> value);
partial void OnIsInChanged();
partial void OnInDateChanging(System.Nullable<System.DateTime> value);
partial void OnInDateChanged();
partial void OnEququalityExpireDateChanging(System.Nullable<System.DateTime> value);
partial void OnEququalityExpireDateChanged();
partial void OnInsuredAmountChanging(System.Nullable<decimal> value);
partial void OnInsuredAmountChanged();
partial void OnOperatorNameChanging(string value);
partial void OnOperatorNameChanged();
partial void OnOperatorIdentityCardChanging(string value);
partial void OnOperatorIdentityCardChanged();
partial void OnOperatorQualityExpireDateChanging(System.Nullable<System.DateTime> value);
partial void OnOperatorQualityExpireDateChanged();
partial void OnCertificationDepartmentChanging(string value);
partial void OnCertificationDepartmentChanged();
#endregion
public InApproveManager_EquipmentInItem()
@ -181016,6 +181116,146 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InDate", DbType="DateTime")]
public System.Nullable<System.DateTime> InDate
{
get
{
return this._InDate;
}
set
{
if ((this._InDate != value))
{
this.OnInDateChanging(value);
this.SendPropertyChanging();
this._InDate = value;
this.SendPropertyChanged("InDate");
this.OnInDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EququalityExpireDate", DbType="DateTime")]
public System.Nullable<System.DateTime> EququalityExpireDate
{
get
{
return this._EququalityExpireDate;
}
set
{
if ((this._EququalityExpireDate != value))
{
this.OnEququalityExpireDateChanging(value);
this.SendPropertyChanging();
this._EququalityExpireDate = value;
this.SendPropertyChanged("EququalityExpireDate");
this.OnEququalityExpireDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsuredAmount", DbType="Decimal(18,0)")]
public System.Nullable<decimal> InsuredAmount
{
get
{
return this._InsuredAmount;
}
set
{
if ((this._InsuredAmount != value))
{
this.OnInsuredAmountChanging(value);
this.SendPropertyChanging();
this._InsuredAmount = value;
this.SendPropertyChanged("InsuredAmount");
this.OnInsuredAmountChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatorName", DbType="NVarChar(50)")]
public string OperatorName
{
get
{
return this._OperatorName;
}
set
{
if ((this._OperatorName != value))
{
this.OnOperatorNameChanging(value);
this.SendPropertyChanging();
this._OperatorName = value;
this.SendPropertyChanged("OperatorName");
this.OnOperatorNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatorIdentityCard", DbType="NVarChar(50)")]
public string OperatorIdentityCard
{
get
{
return this._OperatorIdentityCard;
}
set
{
if ((this._OperatorIdentityCard != value))
{
this.OnOperatorIdentityCardChanging(value);
this.SendPropertyChanging();
this._OperatorIdentityCard = value;
this.SendPropertyChanged("OperatorIdentityCard");
this.OnOperatorIdentityCardChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatorQualityExpireDate", DbType="DateTime")]
public System.Nullable<System.DateTime> OperatorQualityExpireDate
{
get
{
return this._OperatorQualityExpireDate;
}
set
{
if ((this._OperatorQualityExpireDate != value))
{
this.OnOperatorQualityExpireDateChanging(value);
this.SendPropertyChanging();
this._OperatorQualityExpireDate = value;
this.SendPropertyChanged("OperatorQualityExpireDate");
this.OnOperatorQualityExpireDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CertificationDepartment", DbType="NVarChar(50)")]
public string CertificationDepartment
{
get
{
return this._CertificationDepartment;
}
set
{
if ((this._CertificationDepartment != value))
{
this.OnCertificationDepartmentChanging(value);
this.SendPropertyChanging();
this._CertificationDepartment = value;
this.SendPropertyChanged("CertificationDepartment");
this.OnCertificationDepartmentChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_InApproveManager_EquipmentInItem_Base_SpecialEquipment", Storage="_Base_SpecialEquipment", ThisKey="SpecialEquipmentId", OtherKey="SpecialEquipmentId", IsForeignKey=true)]
public Base_SpecialEquipment Base_SpecialEquipment
{

View File

@ -1,12 +1,8 @@
using Aspose.Words.Lists;
using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using Fleck;
using Newtonsoft.Json;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Web;
namespace WebAPI.Common
{

View File

@ -8,6 +8,7 @@ using System.Net;
using System.Net.Http;
using System.Web.Http;
using BLL;
using Model;
namespace WebAPI.Controllers
{
/// <summary>
@ -346,6 +347,77 @@ namespace WebAPI.Controllers
return responeData;
}
public Model.ResponeData getTestRecordItemAnswerBySelectedItem(string testRecordId,string testRecordItemId, string selectedItem)
{
var responeData = new Model.ResponeData();
try
{
if (!string.IsNullOrEmpty(testRecordId) && !string.IsNullOrEmpty(testRecordItemId) && !string.IsNullOrEmpty(selectedItem))
{
BLL.RedisHelper redis = new RedisHelper();
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId); //根据试卷ID获取试卷题目列表
var getTItem= trainingTestRecordItems.FirstOrDefault(x => x.TestRecordItemId== testRecordItemId); //获取试题
if (getTItem==null)
{
responeData.code = 0;
responeData.message = "答题为空选项!";
return responeData;
}
getTItem.SubjectScore = 0;
getTItem.SelectedItem = selectedItem;
if (!string.IsNullOrEmpty(selectedItem))
{
if (getTItem.AnswerItems == selectedItem)
{
getTItem.SubjectScore = getTItem.Score ?? 0;
}
else
{
var listA = Funs.GetStrListByStr(getTItem.AnswerItems.ToUpper(), ',');
var listS = Funs.GetStrListByStr(selectedItem.ToUpper(), ',');
if (getTItem.TestType == "2" && listA.Count >= listS.Count)
{
int i = 0;
foreach (var item in listS)
{
if (!listA.Contains(item))
{
i++;
break;
}
}
if (i == 0)
{
if (listA.Count == listS.Count)
{
getTItem.SubjectScore = getTItem.Score ?? 0;
}
else
{
getTItem.SubjectScore = Convert.ToDecimal((getTItem.Score ?? 0) * 1.0 / 2);
}
}
}
}
}
redis.SetObjString(testRecordId, getTItem);
}
else
{
responeData.code = 0;
responeData.message = "参数不足!";
return responeData;
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
@ -360,6 +432,25 @@ namespace WebAPI.Controllers
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
#region
RedisHelper redis = new RedisHelper();
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId);
if (trainingTestRecordItems.Count>0)
{
var testRecordItem = from x in db.Training_TestRecordItem
where x.TestRecordId == testRecordId
select x;
if (testRecordItem.Any())
{
db.Training_TestRecordItem.DeleteAllOnSubmit(testRecordItem);
db.SubmitChanges();
}
db.Training_TestRecordItem.InsertAllOnSubmit(trainingTestRecordItems);
}
#endregion
string returnTestRecordId = string.Empty;
decimal getTestScores = 0;
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
@ -429,6 +520,25 @@ namespace WebAPI.Controllers
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
#region
RedisHelper redis = new RedisHelper();
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId);
if (trainingTestRecordItems.Count > 0)
{
var modeltestRecordItem = from x in db.Training_TestRecordItem
where x.TestRecordId == testRecordId
select x;
if (modeltestRecordItem.Any())
{
db.Training_TestRecordItem.DeleteAllOnSubmit(modeltestRecordItem);
db.SubmitChanges();
}
db.Training_TestRecordItem.InsertAllOnSubmit(trainingTestRecordItems);
}
#endregion
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
if (getTestRecord != null)
{

View File

@ -7,6 +7,7 @@ using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using System.Configuration;
using BLL;
using WebAPI.Common;
namespace WebAPI

View File

@ -217,9 +217,7 @@
<Compile Include="Areas\HelpPage\SampleGeneration\SampleDirection.cs" />
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
<Compile Include="Common\ICache.cs" />
<Compile Include="Common\PersonKqSocketServices.cs" />
<Compile Include="Common\Redis.cs" />
<Compile Include="Controllers\BaseInfoController.cs" />
<Compile Include="Controllers\CommonController.cs" />
<Compile Include="Controllers\CQMS\InspectionManagementController.cs" />