This commit is contained in:
clovejunti 2024-06-11 01:33:11 +08:00
parent 71adaf8eb5
commit 130d95dedd
71 changed files with 2961 additions and 699 deletions

View File

@ -55,6 +55,34 @@ namespace DeviceRepair.Api.Controllers
return apiResponseData;
}
/// <summary>
/// 根据设备ID获取PM的设备信息
/// </summary>
/// <param name="EquipmentID"></param>
/// <returns></returns>
[HttpGet, Route("GetPMDeviceInfoModelByEquipmentID"), HttpAuthorize]
public APIResponseData GetPMDeviceInfoModelByEquipmentID(string EquipmentID)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "未能获取到数据" };
try
{
if (string.IsNullOrWhiteSpace(EquipmentID))
{
throw new Exception("设备编号是必须的参数!");
}
return DeviceAccess.Instance.GetPMDeviceInfoModelByEquipmentID(EquipmentID);
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message.ToString();
}
return apiResponseData;
}
/// <summary>
/// 设备台账数据获取
/// </summary>
@ -152,5 +180,31 @@ namespace DeviceRepair.Api.Controllers
return apiResponseData;
}
#region KH
/// <summary>
/// 设备台账数据获取
/// </summary>
/// <param name="FilterString"></param>
/// <returns></returns>
[HttpGet,Route("GetQueryKH"), HttpAuthorize]
public APIResponseData GetQueryKH(string FilterString)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "未能获取到数据!" };
try
{
return DeviceAccess.Instance.GetQueryKH(FilterString);
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
#endregion
}
}

View File

@ -0,0 +1,37 @@
using DeviceRepair.Api.Common;
using DeviceRepair.Api.CustomAttribute;
using DeviceRepair.DataAccess;
using DeviceRepair.Models;
using DeviceRepair.Models.Logs;
using System;
using System.Web.Http;
namespace DeviceRepair.Api.Controllers
{
[RoutePrefix("Api/Operation")]
public class OperationController : CFController
{
/// <summary>
/// 用户登录登出日志
/// </summary>
/// <param name="FilterInfo"></param>
/// <returns></returns>
[HttpPost, HttpAuthorize, Route("UserLoginContent")]
public APIResponseData UserLoginContent(OperationFilterModel FilterInfo)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "操作失败!" };
try
{
apiResponseData = OperationAccess.Instance.UserLoginContent(FilterInfo);
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
}
}

View File

@ -103,7 +103,7 @@ namespace DeviceRepair.Api.Controllers
if (string.IsNullOrWhiteSpace(Item.RoleCode))
{
apiResponseData.Message = "角色编码不能为空!";
return apiResponseData;
return apiResponseData;
}
if (string.IsNullOrWhiteSpace(Item.RoleName))
@ -256,7 +256,7 @@ namespace DeviceRepair.Api.Controllers
/// <param name="UserAutoID"></param>
/// <returns></returns>
[HttpGet, Route("GetUserAuthsByUserID"), HttpAuthorize]
public IHttpActionResult GetUserAuthsByUserID(int UserAutoID)
public APIResponseData GetUserAuthsByUserID(int UserAutoID)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "操作失败!" };
try
@ -269,7 +269,7 @@ namespace DeviceRepair.Api.Controllers
apiResponseData.Message = ex.Message;
}
return new GzipCompressedResult(apiResponseData.ToJson(), Request); ;
return apiResponseData;
}
}
}

View File

@ -231,6 +231,7 @@
<Compile Include="Controllers\FormController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\MaintenanceController.cs" />
<Compile Include="Controllers\OperationController.cs" />
<Compile Include="Controllers\PlanController.cs" />
<Compile Include="Controllers\PreserveController.cs" />
<Compile Include="Controllers\RoleController.cs" />
@ -310,6 +311,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Views\Operation\" />
</ItemGroup>
<ItemGroup>
<Content Include="fonts\glyphicons-halflings-regular.woff" />

View File

@ -16,8 +16,8 @@
<WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>D:\UGit\DeviceManager\DeviceRepair.Api\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>

View File

@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>C:\Users\Clove\Desktop\20240603_Release\WebApi_20240605</PublishUrl>
<PublishUrl>C:\Users\Clove\Desktop\2024-06-07\WebApi_20240607</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
</PropertyGroup>

View File

@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PublishTargetUrl>C:\Users\Clove\Desktop\20240603_Release\WebApi_20240605</_PublishTargetUrl>
<History>True|2024-06-05T09:25:01.7658333Z;True|2024-06-05T15:19:15.9175825+08:00;True|2024-06-04T16:24:57.6501582+08:00;True|2024-06-04T14:30:31.7472780+08:00;True|2024-06-04T01:16:03.9124219+08:00;True|2024-06-03T15:22:33.9888519+08:00;True|2024-06-03T10:04:55.1562939+08:00;True|2024-06-03T09:51:46.3653303+08:00;True|2024-05-31T10:08:51.2865889+08:00;True|2024-05-31T01:21:35.1603933+08:00;True|2024-05-30T17:42:28.4008960+08:00;True|2024-05-30T17:35:13.0117556+08:00;True|2024-05-30T17:28:00.7834102+08:00;True|2024-05-30T17:10:05.9943745+08:00;True|2024-05-29T13:43:17.4797209+08:00;</History>
<_PublishTargetUrl>C:\Users\Clove\Desktop\2024-06-07\WebApi_20240607</_PublishTargetUrl>
<History>True|2024-06-07T08:16:21.1052233Z;True|2024-06-07T14:29:10.5922517+08:00;True|2024-06-07T13:08:03.5723912+08:00;True|2024-06-07T11:57:27.3523385+08:00;True|2024-06-07T02:12:35.2135048+08:00;True|2024-06-06T17:34:12.0143579+08:00;True|2024-06-06T14:39:21.1746757+08:00;True|2024-06-06T13:08:18.5085671+08:00;True|2024-06-05T17:25:01.7658333+08:00;True|2024-06-05T15:19:15.9175825+08:00;True|2024-06-04T16:24:57.6501582+08:00;True|2024-06-04T14:30:31.7472780+08:00;True|2024-06-04T01:16:03.9124219+08:00;True|2024-06-03T15:22:33.9888519+08:00;True|2024-06-03T10:04:55.1562939+08:00;True|2024-06-03T09:51:46.3653303+08:00;True|2024-05-31T10:08:51.2865889+08:00;True|2024-05-31T01:21:35.1603933+08:00;True|2024-05-30T17:42:28.4008960+08:00;True|2024-05-30T17:35:13.0117556+08:00;True|2024-05-30T17:28:00.7834102+08:00;True|2024-05-30T17:10:05.9943745+08:00;True|2024-05-29T13:43:17.4797209+08:00;</History>
</PropertyGroup>
<ItemGroup>
<File Include="Areas/HelpPage/HelpPage.css">
@ -78,37 +78,37 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>05/28/2024 22:39:54</publishTime>
</File>
<File Include="bin/DeviceRepair.Api.dll">
<publishTime>06/05/2024 17:25:01</publishTime>
<publishTime>06/07/2024 15:10:30</publishTime>
</File>
<File Include="bin/DeviceRepair.Api.pdb">
<publishTime>06/05/2024 17:25:01</publishTime>
<publishTime>06/07/2024 15:10:30</publishTime>
</File>
<File Include="bin/DeviceRepair.DataAccess.dll">
<publishTime>06/05/2024 17:25:00</publishTime>
<publishTime>06/07/2024 15:10:30</publishTime>
</File>
<File Include="bin/DeviceRepair.DataAccess.dll.config">
<publishTime>05/30/2024 11:42:20</publishTime>
</File>
<File Include="bin/DeviceRepair.DataAccess.pdb">
<publishTime>06/05/2024 17:25:00</publishTime>
<publishTime>06/07/2024 15:10:30</publishTime>
</File>
<File Include="bin/DeviceRepair.Models.dll">
<publishTime>06/05/2024 17:24:54</publishTime>
<publishTime>06/07/2024 15:10:29</publishTime>
</File>
<File Include="bin/DeviceRepair.Models.dll.config">
<publishTime>05/30/2024 11:42:20</publishTime>
</File>
<File Include="bin/DeviceRepair.Models.pdb">
<publishTime>06/05/2024 17:24:54</publishTime>
<publishTime>06/07/2024 15:10:29</publishTime>
</File>
<File Include="bin/DeviceRepair.Utils.dll">
<publishTime>06/05/2024 15:05:54</publishTime>
<publishTime>06/07/2024 15:10:29</publishTime>
</File>
<File Include="bin/DeviceRepair.Utils.dll.config">
<publishTime>05/30/2024 11:42:20</publishTime>
</File>
<File Include="bin/DeviceRepair.Utils.pdb">
<publishTime>06/05/2024 15:05:54</publishTime>
<publishTime>06/07/2024 15:10:29</publishTime>
</File>
<File Include="bin/EntityFramework.dll">
<publishTime>05/28/2024 22:39:54</publishTime>
@ -414,7 +414,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/16/2024 09:58:38</publishTime>
</File>
<File Include="Web.config">
<publishTime>06/05/2024 17:25:01</publishTime>
<publishTime>06/07/2024 16:16:20</publishTime>
</File>
</ItemGroup>
</Project>

View File

@ -93,7 +93,7 @@ namespace DeviceRepair.DataAccess
var exp = Expressionable.Create<View_DriveInfomationModel>()
.OrIF(aid > 0, t1 => t1.AutoID == aid)
.OrIF(!string.IsNullOrEmpty(FilterValue),
t1 => t1.EquipmentID.Equals(FilterValue, StringComparison.CurrentCultureIgnoreCase)
t1 => t1.EquipmentID.Contains(FilterValue)
|| t1.EquipmentName.Contains(FilterValue)
|| t1.Remarks.Contains(FilterValue)
|| t1.Specification.Contains(FilterValue)).ToExpression();//拼接表达式
@ -291,26 +291,45 @@ namespace DeviceRepair.DataAccess
int aid = 0;
int.TryParse(FilterValue, out aid);
List<DeviceRouteInfo> RootDatas = db.Queryable<DeviceRouteInfo>().Where(x => x.Status).OrderBy(x => x.AutoID).ToList();
List<DeviceRouteInfo> RootDatas = null;
if (OEMORKH != "ALL")
{
List<int> waitDel = new List<int>();
foreach (var item in RootDatas)
{
if (item.ParentID == 0 && item.Name != OEMORKH)
{
waitDel.Add(item.AutoID);
continue;
}
RootDatas = db.Ado.SqlQuery<DeviceRouteInfo>(@"
;WITH cte
AS(SELECT AutoID
FROM dbo.DeviceRoute
WHERE [Name] = @Name
UNION ALL
SELECT dr.AutoID
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT DeviceRoute.*
FROM DeviceRoute
INNER JOIN cte on DeviceRoute.AutoID = cte.AutoID WHERE Status = 1", new { Name = OEMORKH }).ToList();
if (waitDel.Any(x => x == item.ParentID))
{
waitDel.Add(item.AutoID);
}
}
RootDatas.RemoveAll(x => waitDel.Contains(x.AutoID));
//List<int> waitDel = new List<int>();
//foreach (var item in RootDatas)
//{
// if (item.ParentID == 0 && item.Name != OEMORKH)
// {
// waitDel.Add(item.AutoID);
// continue;
// }
// if (waitDel.Any(x => x == item.ParentID))
// {
// waitDel.Add(item.AutoID);
// }
//}
//RootDatas.RemoveAll(x => waitDel.Contains(x.AutoID));
}
else
{
RootDatas = db.Queryable<DeviceRouteInfo>().Where(x => x.Status).OrderBy(x => x.AutoID, OrderByType.Desc).ToList();
}
var Root = RootDatas.ToDictionary(x => x.AutoID, x => x);
@ -406,6 +425,19 @@ namespace DeviceRepair.DataAccess
Menus.RemoveAll(x => !HasValues.Contains(x.RouteAutoId) && x.ParentRouteId != Guid.Empty);
Menus.AddRange(Datas);
foreach (DeviceRouteInfo item in RootDatas)
{
DeviceInformationInfoTree Node = Menus.FirstOrDefault(x => x.RouteAutoId == item.GUID);
List<DeviceInformationInfoTree> Child = Menus.Where(x => x.Route == item.AutoID).ToList();
if (Node != null && Child.Count > 0)
{
Node.Totalcapacity = Child.Sum(x => x.Totalcapacity);
Node.Weight = Child.Sum(x => x.Weight);
Node.EquipmentOriginalvalue = Child.Sum(x => x.EquipmentOriginalvalue);
}
}
apiResponseData.Code = 1;
apiResponseData.Data = Menus;
apiResponseData.Message = "";
@ -433,5 +465,140 @@ namespace DeviceRepair.DataAccess
}
return value;
}
#region PM
public APIResponseData GetQueryKH(string FilterValue)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "没有查询到数据!" };
try
{
db.ChangeDatabase("main");
int aid = 0;
int.TryParse(FilterValue, out aid);
int[] RootIds = db.Ado.SqlQuery<int>(@"
;WITH cte
AS(SELECT AutoID
FROM dbo.DeviceRoute
WHERE [Name] = @Name
UNION ALL
SELECT dr.AutoID
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT*
FROM cte", new { Name = "KH" }).ToArray();
var exp = Expressionable.Create<View_DriveInfomationModel>()
.And(t1 => SqlFunc.ContainsArray(RootIds, t1.Route))
.OrIF(aid > 0, t1 => t1.AutoID == aid)
.OrIF(!string.IsNullOrEmpty(FilterValue),
t1 => t1.EquipmentID.Equals(FilterValue, StringComparison.CurrentCultureIgnoreCase)
|| t1.EquipmentName.Contains(FilterValue)
|| t1.Remarks.Contains(FilterValue)
|| t1.Specification.Contains(FilterValue)).ToExpression();//拼接表达式
var Datas = db.Queryable<DeviceInformationInfo, MaintenanceFormVersionInfo, DeviceRouteInfo>(
(t1, t2, t3) => new object[] {
JoinType.Left, t1.MaintenanceFormVersion == t2.AutoID,
JoinType.Left, t1.Route == t3.AutoID
}).Select((t1, t2, t3) => new View_DriveInfomationModel
{
AutoID = t1.AutoID,
ChangeDate = t1.ChangeDate,
ChangeUser = t1.ChangeUser,
CreatDate = t1.CreatDate,
CreatUser = t1.CreatUser,
EquipmentCategory = t1.EquipmentCategory,
EquipmentID = t1.EquipmentID,
EquipmentName = t1.EquipmentName,
EquipmentOriginalvalue = t1.EquipmentOriginalvalue,
EquipmentStatus = t1.EquipmentStatus,
InstallationLocation = t1.InstallationLocation,
MaintenanceFormVersion = t1.MaintenanceFormVersion,
MaintenanceFormVersionName = t2.FormName,
MaintenanceFormStatus = t2.FormStatus,
Manufacturer = t1.Manufacturer,
OperatingParameters = t1.OperatingParameters,
OwningUnit = t1.OwningUnit,
Remarks = t1.Remarks,
SerialNumber = t1.SerialNumber,
Specification = t1.Specification,
Totalcapacity = t1.Totalcapacity,
UsingDate = t1.UsingDate,
VersionCode = t2.VersionCode,
VersionRev = t2.VersionRev,
WarrantyPeriod = t1.WarrantyPeriod,
Route = t1.Route,
RouteText = t3.Name,
Weight = t1.Weight
}).Where(exp)
.ToList();
apiResponseData.Code = 1;
apiResponseData.Data = Datas;
apiResponseData.Message = "";
}
catch (SqlSugarException ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
/// <summary>
/// 通过设备编号查询设备信息
/// </summary>
/// <param name="EquipmentID"></param>
/// <returns></returns>
public APIResponseData GetPMDeviceInfoModelByEquipmentID(string EquipmentID)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "没有查询到数据!" };
try
{
db.ChangeDatabase("main");
int[] RootIds = db.Ado.SqlQuery<int>(@"
;WITH cte
AS(SELECT AutoID
FROM dbo.DeviceRoute
WHERE [Name] = @Name
UNION ALL
SELECT dr.AutoID
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT*
FROM cte", new { Name = "KH" }).ToArray();
DeviceInformationInfo Data = CurrentDb.AsQueryable().First(x => SqlFunc.ContainsArray(RootIds, x.Route) && x.EquipmentID.Equals(EquipmentID, StringComparison.CurrentCultureIgnoreCase));
apiResponseData.Code = 1;
apiResponseData.Data = Data;
apiResponseData.Message = "";
}
catch (SqlSugarException ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
#endregion
}
}

View File

@ -49,6 +49,7 @@
<Compile Include="FieldAccess.cs" />
<Compile Include="FormAccess.cs" />
<Compile Include="MaintenanceAccess.cs" />
<Compile Include="OperationAccess.cs" />
<Compile Include="PlanAccess.cs" />
<Compile Include="PreserveAccess.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@ -368,6 +368,8 @@ namespace DeviceRepair.DataAccess
public APIResponseData ChangeDownStatus(int AutoID, bool Status, HeaderModel Operation)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = $"数据处理失败!" };
db.ChangeDatabase("main");
db.BeginTran();
try
{
if (AutoID <= 0)
@ -376,7 +378,12 @@ namespace DeviceRepair.DataAccess
}
DateTime CurrentTime = DateTime.Now;
db.ChangeDatabase("main");
if (db.Queryable<DeviceWarrantyRequestMaintaionInfo>().Any(x => x.FormID == AutoID && x.SubmitBy > 0))
{
throw new Exception("数据已被修改!");
}
DeviceWarrantyRequestForm Entity = db.Queryable<DeviceWarrantyRequestForm>().First(x => x.AutoID == AutoID);
if (Entity == null)
@ -387,20 +394,24 @@ namespace DeviceRepair.DataAccess
Entity.IsDown = Status;
if (db.Updateable(Entity).UpdateColumns(it => new { it.IsDown }).ExecuteCommand() > 0)
{
db.CommitTran();
apiResponseData.Code = 1;
apiResponseData.Message = string.Empty;
}
}
catch (SqlSugarException e)
{
db.RollbackTran();
apiResponseData.Code = -1;
apiResponseData.Message = e.Message;
}
catch (Exception ex)
{
db.RollbackTran();
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
db.RollbackTran();
return apiResponseData;
}
@ -512,7 +523,7 @@ namespace DeviceRepair.DataAccess
}
else
{
throw new Exception("待处理的停机单状态异常,请重试!");
throw new Exception("待处理的停机单状态不正确,或已被其他用户处理,请重试!");
}
@ -568,6 +579,19 @@ namespace DeviceRepair.DataAccess
try
{
db.ChangeDatabase("main");
Dictionary<int, string> RootIds = db.Ado.SqlQuery<DeviceRouteInfo>(@"
;WITH cte
AS(SELECT AutoID,Name
FROM dbo.DeviceRoute WHERE ParentID = 0
UNION ALL
SELECT dr.AutoID,cte.Name
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT*
FROM cte").ToDictionary(x => x.AutoID, x => x.Name);
var exp = Expressionable.Create<DeviceWarrantyRequestForm>();
if (FilterInfo != null)
{
@ -589,15 +613,17 @@ namespace DeviceRepair.DataAccess
List<DeviceWarrantyRequestForm> Datas = CurrentDb.AsQueryable().With(SqlWith.NoLock).Where(exp.ToExpression()).ToList();
Dictionary<int, UserInfoModel> Users = db.Queryable<UserInfoModel>().ToList().ToDictionary(x => x.AutoID, x => x);
Dictionary<int, FieldsInfo> Fields = db.Queryable<FieldsInfo>().ToList().ToDictionary(x => x.AutoID, x => x);
Dictionary<int, DeviceInformationInfo> devs = db.Queryable<DeviceInformationInfo>().ToList().ToDictionary(x => x.AutoID, x => x);
int i = 1;
List<MaintainOrderView> views = new List<MaintainOrderView>();
foreach (DeviceWarrantyRequestForm item in Datas)
{
int Plant = RootIds[devs[item.EquipmentPK].Route] == "KH" ? 1303 : 9997;
MaintainOrderView view = new MaintainOrderView
{
AutoNumber = i,
Plant = 1303,
Plant = Plant,
AutoID = item.AutoID,
EquipmentID = item.EquipmentID,
EquipmentName = item.EquipmentName,
@ -613,7 +639,7 @@ namespace DeviceRepair.DataAccess
DeviceWarrantyRequestMaintaionInfo repair = item.MaintaionItems;
view.RepairPersonnel = Users[repair.SubmitBy].RealName;
view.RepairStartDate = repair.MaintainStartTime.ToString("yyyy-M-dd");
view.RepairStartDate = repair.MaintainEndTime.ToString("yyyy-M-dd");
view.RepairFinishDate = repair.MaintainEndTime.ToString("yyyy-M-dd");
view.MaintainCause = repair.MaintainCause;
view.MaintainContent = repair.MaintainContent;
@ -627,10 +653,10 @@ namespace DeviceRepair.DataAccess
}
TimeSpan Downtime = repair.MaintainEndTime - item.CreatOn.Value;
view.Downtime = Downtime.Hours;
view.Downtime = Convert.ToDecimal(Math.Round(Downtime.TotalHours, 2));
TimeSpan RepairDuration = repair.MaintainEndTime - repair.MaintainStartTime;
view.RepairDuration = RepairDuration.Hours;
view.RepairDuration = Convert.ToDecimal(Math.Round(RepairDuration.TotalHours));
view.Maintenance = Fields[repair.Maintenance].FieldText;
view.SymptomlDistinction = Fields[repair.SymptomlDistinction].FieldText;

View File

@ -0,0 +1,73 @@
using DeviceRepair.Models;
using DeviceRepair.Models.History;
using DeviceRepair.Models.Logs;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
namespace DeviceRepair.DataAccess
{
public class OperationAccess : DbContext<UserInfoModel>
{
private static OperationAccess manager;
public static OperationAccess Instance
{
get
{
if (manager == null)
manager = new OperationAccess();
return manager;
}
}
/// <summary>
/// 用户登录登出日志
/// </summary>
/// <param name="FilterInfo"></param>
/// <returns></returns>
public APIResponseData UserLoginContent(OperationFilterModel FilterInfo)
{
APIResponseData apiResponseData = new APIResponseData();
try
{
db.ChangeDatabase("main");
Dictionary<string, UserInfoModel> userInfos = base.GetList().ToDictionary(x => x.LoginCode, x => x);
if (userInfos != null && userInfos.Count > 0)
{
db.ChangeDatabase("log");
var exp = Expressionable.Create<UserLogin>();
if (FilterInfo != null)
{
exp.AndIF(FilterInfo.sDate != DateTime.MinValue, x => x.OperationDate >= FilterInfo.sDate);
exp.AndIF(FilterInfo.eDate != DateTime.MinValue, x => x.OperationDate <= FilterInfo.eDate);
exp.AndIF(!string.IsNullOrWhiteSpace(FilterInfo.LoginCode), x => x.LoginCode.Contains(FilterInfo.LoginCode));
exp.AndIF(!string.IsNullOrWhiteSpace(FilterInfo.OperationType), x => x.OperationType.Contains(FilterInfo.OperationType));
exp.AndIF(!string.IsNullOrWhiteSpace(FilterInfo.ClientName), x => x.OperationComputer.Contains(FilterInfo.ClientName));
}
List<UserLogin> userLogins = db.Queryable<UserLogin>().With(SqlWith.NoLock).Where(exp.ToExpression()).ToList();
foreach (UserLogin item in userLogins)
{
if (userInfos.ContainsKey(item.LoginCode))
item.RealName = userInfos[item.LoginCode].RealName;
}
apiResponseData.Code = 1;
apiResponseData.Data = userLogins;
}
}
catch (SqlSugarException ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
}
}

View File

@ -203,7 +203,6 @@ namespace DeviceRepair.DataAccess
try
{
db.ChangeDatabase("main");
base.db.ChangeDatabase("main");
List<View_CurrentMonthPlanTips> tips = base.db.Queryable<View_CurrentMonthPlanTips>().ToList();
apiResponseData.Code = 1;
@ -326,7 +325,24 @@ namespace DeviceRepair.DataAccess
int[] ids = Datas.Select(x => x.EquipmentID).ToArray();
Dictionary<int, UserInfoModel> usDict = db.Queryable<UserInfoModel>().With(SqlWith.NoLock).ToList().ToDictionary(x => x.AutoID, x => x);
List<DeviceInformationInfo> devLst = db.Queryable<DeviceInformationInfo>().With(SqlWith.NoLock).Where(x => SqlFunc.ContainsArray(ids, x.AutoID)).ToList();
int[] RootIds = db.Ado.SqlQuery<int>(@"
;WITH cte
AS(SELECT AutoID
FROM dbo.DeviceRoute
WHERE [Name] = @Name
UNION ALL
SELECT dr.AutoID
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT*
FROM cte", new { Name = "KH" }).ToArray();
List<DeviceInformationInfo> devLst = db.Queryable<DeviceInformationInfo>().With(SqlWith.NoLock).Where(x => SqlFunc.ContainsArray(RootIds, x.Route) && SqlFunc.ContainsArray(ids, x.AutoID)).ToList();
Datas = Datas.Where(x => devLst.Any(y => y.AutoID == x.EquipmentID)).ToList();
int[] formIds = devLst.Select(x => x.MaintenanceFormVersion).ToArray();
Dictionary<int, DeviceInformationInfo> devDict = devLst.ToDictionary(x => x.AutoID, x => x);

View File

@ -184,11 +184,25 @@ namespace DeviceRepair.DataAccess
try
{
db.ChangeDatabase("main");
int[] RootIds = db.Ado.SqlQuery<int>(@"
;WITH cte
AS(SELECT AutoID
FROM dbo.DeviceRoute
WHERE [Name] = @Name
UNION ALL
SELECT dr.AutoID
FROM dbo.DeviceRoute dr
INNER JOIN cte
ON dr.ParentID = cte.AutoID)
SELECT*
FROM cte", new { Name = "KH" }).ToArray();
lst = db.Queryable<MaintenanceRecordInfo, UserInfoModel, DeviceInformationInfo, MaintenanceFormVersionInfo>((t1, t2, t3, t4) => new object[] {
JoinType.Inner,t1.CreateBy == t2.AutoID,
JoinType.Inner,t1.EquipmentPrimaryID == t3.AutoID,
JoinType.Inner,t1.FormPrimaryID == t4.AutoID
}).Select((t1, t2, t3, t4) => new View_MaintenanceRecordList
}).Where((t1, t2, t3, t4) => SqlFunc.ContainsArray(RootIds, t3.Route)).Select((t1, t2, t3, t4) => new View_MaintenanceRecordList
{
AutoID = t1.AutoID,
EquipmentID = t3.AutoID,
@ -334,6 +348,11 @@ namespace DeviceRepair.DataAccess
if (entity.Record.AutoID == 0)
{
if (db.Queryable<MaintenanceRecordInfo>().Any(x => x.PlanPrimaryID == entity.Record.PlanPrimaryID))
{
throw new Exception("当前数据已被其他用户录入 ");
}
entity.Record.ModifyDate = CurrentDate;
entity.Record.ModifyBy = Operation.Operator;
entity.Record.CreateDate = CurrentDate;
@ -406,6 +425,13 @@ namespace DeviceRepair.DataAccess
#region
//附件写入
if (entity.Files == null || entity.Files.Count == 0)
{
int cCount = db.Updateable<AttachmentInfo>().UpdateColumns(x => new { x.Status })
.SetColumns(x => x.Status == false)
.Where(x => x.Module == "Attachment" && x.TableName == "MaintenanceRecord" && x.PrimaryKey == "AutoID" && x.PrimaryValue == Identity + "").ExecuteCommand();
}
foreach (var item in entity.Files)
{
if (item.AutoID != 0)

View File

@ -66,7 +66,7 @@ namespace DeviceRepair.DataAccess
List<PostsInfo> Datas = db.Queryable<UserPostsInfo, PostsInfo>((t1, t2) => new object[] {
JoinType.Left,t1.Post == t2.Guid
}).Select((t1, t2) => t2).ToList();
}).Where((t1, t2) => t1.UserCode.Equals(UserCode, StringComparison.CurrentCultureIgnoreCase) && t2.Status == "A").Select((t1, t2) => t2).ToList();
int PostType = -1;

View File

@ -90,6 +90,7 @@
<Compile Include="History\MaintenanceFormVersionHistoryInfo.cs" />
<Compile Include="History\MaintenanceRecordHisInfo.cs" />
<Compile Include="History\PlanlogInfo.cs" />
<Compile Include="Logs\OperationFilterModel.cs" />
<Compile Include="Logs\RoleAuthLogInfo.cs" />
<Compile Include="History\RoleInfoChangeLogInfo.cs" />
<Compile Include="History\UserInfoChangeLogInfo.cs" />

View File

@ -0,0 +1,32 @@
using System;
namespace DeviceRepair.Models.Logs
{
public class OperationFilterModel
{
/// <summary>
/// 开始时间
/// </summary>
public DateTime sDate { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime eDate { get; set; }
/// <summary>
/// 用户编号
/// </summary>
public string LoginCode { get; set; }
/// <summary>
/// 操作类型
/// </summary>
public string OperationType { get; set; }
/// <summary>
/// 客户端名称
/// </summary>
public string ClientName { get; set; }
}
}

View File

@ -25,6 +25,9 @@ namespace DeviceRepair.Models.History
public string LoginCode { get; set; }
[SugarColumn(IsIgnore = true)]
public string RealName { get; set; }
public string OperationType { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true)]

View File

@ -45,71 +45,96 @@ namespace DeviceRepair.Models
[SugarColumn(ColumnName = "Jan")]
public string Jan { get; set; }
[SugarColumn(IsIgnore = true)]
public bool JanStatus { get; set; }
/// <summary>
/// 二月
/// </summary>
[SugarColumn(ColumnName = "Feb")]
public string Feb { get; set; }
[SugarColumn(IsIgnore = true)]
public bool FebStatus { get; set; }
/// <summary>
/// 三月
/// </summary>
[SugarColumn(ColumnName = "Mar")]
public string Mar { get; set; }
[SugarColumn(IsIgnore = true)]
public bool MarStatus { get; set; }
/// <summary>
/// 四月
/// </summary>
[SugarColumn(ColumnName = "Apr")]
public string Apr { get; set; }
[SugarColumn(IsIgnore = true)]
public bool AprStatus { get; set; }
/// <summary>
/// 五月
/// </summary>
[SugarColumn(ColumnName = "May")]
public string May { get; set; }
[SugarColumn(IsIgnore = true)]
public bool MayStatus { get; set; }
/// <summary>
/// 六月
/// </summary>
[SugarColumn(ColumnName = "Jun")]
public string Jun { get; set; }
[SugarColumn(IsIgnore = true)]
public bool JunStatus { get; set; }
/// <summary>
/// 七月
/// </summary>
[SugarColumn(ColumnName = "Jul")]
public string Jul { get; set; }
[SugarColumn(IsIgnore = true)]
public bool JulStatus { get; set; }
/// <summary>
/// 八月
/// </summary>
[SugarColumn(ColumnName = "Aug")]
public string Aug { get; set; }
[SugarColumn(IsIgnore = true)]
public bool AugStatus { get; set; }
/// <summary>
/// 九月
/// </summary>
[SugarColumn(ColumnName = "Sep")]
public string Sep { get; set; }
[SugarColumn(IsIgnore = true)]
public bool SepStatus { get; set; }
/// <summary>
/// 十月
/// </summary>
[SugarColumn(ColumnName = "Oct")]
public string Oct { get; set; }
[SugarColumn(IsIgnore = true)]
public bool OctStatus { get; set; }
/// <summary>
/// 十一月
/// </summary>
[SugarColumn(ColumnName = "Nov")]
public string Nov { get; set; }
[SugarColumn(IsIgnore = true)]
public bool NovStatus { get; set; }
/// <summary>
/// 十二月
/// </summary>
[SugarColumn(ColumnName = "Dec")]
public string Dec { get; set; }
[SugarColumn(IsIgnore = true)]
public bool DecStatus { get; set; }
/// <summary>
/// 新PM起始月份

View File

@ -8,7 +8,7 @@ namespace DeviceRepair.Utils
public static EnumMaintenanceType MatchToEnum(string value)
{
EnumMaintenanceType e = EnumMaintenanceType.None;
switch (value.ToLower())
switch (value?.ToLower())
{
case "annual":
case "每年":

View File

@ -233,5 +233,81 @@ namespace DeviceRepairAndOptimization.Biz
}
return apiResponseData;
}
#region PM
/// <summary>
/// KH设备台账数据获取
/// </summary>
/// <param name="FilterValue"></param>
/// <returns></returns>
public APIResponseData GetQueryKH(string FilterValue)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "查询失败!" };
try
{
switch (DeviceRepair.Utils.Config.Configurations.Properties.ConnType?.ToLower())
{
case "api":
apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
{
URL = $"{ServiceRouteConstValue.GetDeviceQueryKH}?FilterString={FilterValue}",
Method = "Get",
ContentType = "application/json;charset=utf-8",
});
break;
default:
apiResponseData = DeviceAccess.Instance.GetQueryKH(FilterValue);
break;
}
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
/// <summary>
/// 通过设备编号查询设备信息
/// </summary>
/// <param name="EquipmentID"></param>
/// <returns></returns>
public APIResponseData GetPMDeviceInfoModelByEquipmentID(string EquipmentID)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "没有查询到数据!" };
try
{
switch (DeviceRepair.Utils.Config.Configurations.Properties.ConnType?.ToLower())
{
case "api":
apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
{
URL = ServiceRouteConstValue.GetPMDeviceInfoModelByEquipmentID + "?EquipmentID=" + EncryptionHelper.UrlEncry(EquipmentID),
Method = "Get",
ContentType = "application/json; charset=utf-8"
});
break;
case "sql":
apiResponseData = DeviceAccess.Instance.GetPMDeviceInfoModelByEquipmentID(EquipmentID);
break;
default:
break;
}
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
#endregion
}
}

View File

@ -230,7 +230,7 @@ namespace DeviceRepairAndOptimization.Biz
break;
default:
apiResponseData = MaintenanceAccess.Instance.GetDatas(FilterInfo);
apiResponseData = MaintenanceAccess.Instance.GetXlsxData(FilterInfo);
break;
}
}

View File

@ -0,0 +1,63 @@
using CsharpHttpHelper;
using DeviceRepair.DataAccess;
using DeviceRepair.Models;
using DeviceRepair.Models.Logs;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceRepairAndOptimization.Biz
{
public class OperationManager
{
private static OperationManager manager;
public static OperationManager Instance
{
get
{
if (manager == null)
manager = new OperationManager();
return manager;
}
}
/// <summary>
/// 用户登录登出日志
/// </summary>
/// <param name="FilterInfo"></param>
/// <returns></returns>
public APIResponseData UserLoginContent(OperationFilterModel FilterInfo)
{
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "没有查询到数据!" };
try
{
switch (DeviceRepair.Utils.Config.Configurations.Properties.ConnType?.ToLower())
{
case "api":
apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
{
URL = ServiceRouteConstValue.UserLoginContent,
Method = "Post",
ContentType = "application/json; charset=utf-8",
Postdata = JsonConvert.SerializeObject(FilterInfo)
});
break;
case "sql":
apiResponseData = OperationAccess.Instance.UserLoginContent(FilterInfo);
break;
default:
break;
}
}
catch (Exception ex)
{
apiResponseData.Code = -1;
apiResponseData.Message = ex.Message;
}
return apiResponseData;
}
}
}

View File

@ -187,7 +187,7 @@ namespace DeviceRepairAndOptimization.Biz
});
break;
default:
apiResponseData = PlanAccess.Instance.GetAllPlans();
apiResponseData = PlanAccess.Instance.GetDataByEquipmentAutoIdOnYear(Year,EquipmentAutoID);
break;
}

View File

@ -1,6 +1,7 @@
using CsharpHttpHelper;
using DeviceRepair.DataAccess;
using DeviceRepair.Models;
using DeviceRepair.Utils.Security;
using Newtonsoft.Json;
using System;
@ -197,7 +198,7 @@ namespace DeviceRepairAndOptimization.Biz
apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
{
URL = $"{ServiceRouteConstValue.ReprovisionDefaultPassword}?LoginCode={LoginCode}&PassWord={PassWord}",
URL = $"{ServiceRouteConstValue.ReprovisionDefaultPassword}?LoginCode={EncryptionHelper.UrlEncry(LoginCode)}&PassWord={PassWord}",
Method = "Post",
ContentType = "application/x-www-form-urlencoded",
});
@ -513,11 +514,10 @@ namespace DeviceRepairAndOptimization.Biz
URL = $"{ServiceRouteConstValue.GetUserAuthsByUserID}?UserAutoID={UserAutoID}",
Method = "Get",
ContentType = "application/json; charset=utf-8",
ResultType = CsharpHttpHelper.Enum.ResultType.Byte
}, true);
}, false);
break;
case "sql":
apiResponseData = UserAccess.Instance.GetAllUsers();
apiResponseData = RoleAccess.Instance.GetUserAuthsByUserID(UserAutoID);
break;
default:
break;

View File

@ -347,6 +347,7 @@
<Compile Include="Biz\FormManager.cs" />
<Compile Include="Biz\MaintenanceManager.cs" />
<Compile Include="Biz\MyGridLocalizer .cs" />
<Compile Include="Biz\OperationManager.cs" />
<Compile Include="Biz\PlanManager.cs" />
<Compile Include="Biz\PreserveManager.cs" />
<Compile Include="Biz\PreserveTemplate\TemplateIndexV1.cs" />
@ -381,6 +382,12 @@
<Compile Include="Models\Enum\enumClientModelType.cs" />
<Compile Include="Models\Enum\enumMaintenanceFlag.cs" />
<Compile Include="Models\MaintenanceVer\TemplateIndexV1.cs" />
<Compile Include="Pages\Common\dlgProgressBar.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Pages\Common\dlgProgressBar.Designer.cs">
<DependentUpon>dlgProgressBar.cs</DependentUpon>
</Compile>
<Compile Include="Pages\CustomField\pageFieldCode.cs">
<SubType>Form</SubType>
</Compile>
@ -459,6 +466,12 @@
<Compile Include="Pages\FormVersion\Page_FormVersionDialog.Designer.cs">
<DependentUpon>Page_FormVersionDialog.cs</DependentUpon>
</Compile>
<Compile Include="Pages\Log\page_UserLoginLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Pages\Log\page_UserLoginLog.Designer.cs">
<DependentUpon>page_UserLoginLog.cs</DependentUpon>
</Compile>
<Compile Include="Pages\Maintain\dlgAccessoriesEdit.cs">
<SubType>Form</SubType>
</Compile>
@ -667,6 +680,9 @@
<EmbeddedResource Include="frm_Launch.resx">
<DependentUpon>frm_Launch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\Common\dlgProgressBar.resx">
<DependentUpon>dlgProgressBar.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\CustomField\pageFieldCode.resx">
<DependentUpon>pageFieldCode.cs</DependentUpon>
</EmbeddedResource>
@ -706,6 +722,9 @@
<EmbeddedResource Include="Pages\FormVersion\Page_FormVersionDialog.resx">
<DependentUpon>Page_FormVersionDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\Log\page_UserLoginLog.resx">
<DependentUpon>page_UserLoginLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Pages\Maintain\dlgAccessoriesEdit.resx">
<DependentUpon>dlgAccessoriesEdit.cs</DependentUpon>
</EmbeddedResource>

View File

@ -1,163 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" DoublePass="true" ReportInfo.Created="06/28/2021 11:07:37" ReportInfo.Modified="05/24/2024 17:10:33" ReportInfo.CreatorVersion="1.9.1.0">
<Report ScriptLanguage="CSharp" DoublePass="true" UseFileCache="true" SmoothGraphics="true" ReportInfo.Created="06/28/2021 11:07:37" ReportInfo.Modified="05/24/2024 15:39:31" ReportInfo.CreatorVersion="1.9.1.0" PrintSettings.Collate="false">
<Styles>
<Style Name="NAStyle" Fill.Color="WhiteSmoke" Font="宋体, 9pt, style=Bold"/>
</Styles>
<Dictionary>
<TableDataSource Name="Head" ReferenceName="Data.Head" DataType="System.Int32" Enabled="true">
<Column Name="SopNo" DataType="System.String"/>
<Column Name="SopNoVer" DataType="System.String"/>
<Column Name="Figure" DataType="System.String"/>
<Column Name="FigureVer" DataType="System.String"/>
<Column Name="IQSVer" DataType="System.String"/>
<Column Name="Product" DataType="System.String"/>
<Column Name="Batch" DataType="System.String"/>
<Column Name="Operaters" DataType="System.String"/>
<Column Name="CompleteBy" DataType="System.String"/>
<Column Name="CompleteOn" DataType="System.String"/>
<Column Name="CompleteOKQty" DataType="System.String"/>
<Column Name="CompleteNGQty" DataType="System.String"/>
<Column Name="Note" DataType="System.String"/>
<Column Name="SopDocVer" DataType="System.String" PropName="Column"/>
</TableDataSource>
<TableDataSource Name="Body" ReferenceName="Data.Body" DataType="System.Int32" Enabled="true">
<Column Name="ProcCode" DataType="System.String"/>
<Column Name="ProcName" DataType="System.String"/>
<Column Name="ItemCode" DataType="System.String"/>
<Column Name="ItemName" DataType="System.String"/>
<Column Name="NominalValue" DataType="System.String"/>
<Column Name="Max" DataType="System.String"/>
<Column Name="Min" DataType="System.String"/>
<Column Name="Method" DataType="System.String"/>
<Column Name="Sampling" DataType="System.String"/>
<Column Name="IQSOrNot" DataType="System.String"/>
<Column Name="PKOrNot" DataType="System.String"/>
<Column Name="Tools" DataType="System.String"/>
<Column Name="Note" DataType="System.String"/>
<Column Name="ItemFont" DataType="System.String" PropName="Column"/>
<TableDataSource Name="MaintenanceInfo" ReferenceName="MaintenanceInfo.MaintenanceInfo" DataType="System.Int32" Enabled="true">
<Column Name="申请部门" DataType="System.String"/>
<Column Name="名称" DataType="System.String"/>
<Column Name="设备编号" DataType="System.String"/>
<Column Name="接收部门" DataType="System.String"/>
<Column Name="现象区分" DataType="System.String"/>
<Column Name="故障发生时间" DataType="System.String"/>
<Column Name="维修方式" DataType="System.String"/>
<Column Name="产品批号" DataType="System.String"/>
<Column Name="修理开始日期" DataType="System.String"/>
<Column Name="修理结束日期" DataType="System.String"/>
<Column Name="质量部评估" DataType="System.String"/>
<Column Name="工程部评估" DataType="System.String"/>
<Column Name="总修复时间" DataType="System.String"/>
<Column Name="总停机时间" DataType="System.String"/>
<Column Name="故障现象" DataType="System.String"/>
<Column Name="故障原因" DataType="System.String"/>
<Column Name="维修内容" DataType="System.String"/>
<Column Name="配件" DataType="System.String"/>
<Column Name="人员" DataType="System.String"/>
<Column Name="是否需要再验证" DataType="System.String"/>
<Column Name="验证编号" DataType="System.String"/>
<Column Name="设备恢复确认" DataType="System.String"/>
<Column Name="申请部门确认/日期" DataType="System.String"/>
<Column Name="故障发生地点" DataType="System.String"/>
</TableDataSource>
</Dictionary>
<ReportPage Name="Page1" PaperHeight="295" LeftMargin="3" TopMargin="3" RightMargin="3" BottomMargin="3" FirstPageSource="15" OtherPagesSource="15" Guides="226.8,548.1,765.45,0.43,227.23,0,771.12,193.72,387.44,581.16,771.1,189.94,9.45,756">
<ReportTitleBand Name="ReportTitle1" Top="20" Width="771.12"/>
<PageHeaderBand Name="PageHeader1" Top="40" Width="771.12" Height="50.27" Guides="3,50.25,3.02,50.27">
<TextObject Name="Text1" Left="226.8" Top="3" Width="321.3" Height="47.25" Border.Lines="Left, Right, Bottom" Border.LeftLine.Color="Gray" Border.RightLine.Color="Gray" Border.BottomLine.Color="Gray" Text="Equipment Repair Form&#13;&#10;设备维修单" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt" TextFill.Color="Gray"/>
<TextObject Name="CellPageNo" Left="548.1" Top="3.02" Width="217.35" Height="47.25" Border.Lines="Bottom" Border.BottomLine.Color="Gray" Text="PP-060.07&#13;&#10;Rev版本:B&#13;&#10;Page页码 [Page] of [TotalPages]" Font="宋体, 10pt" TextFill.Color="Gray"/>
<TextObject Name="Text5" Left="0.43" Top="3" Width="226.8" Height="47.25" Border.Lines="Bottom" Border.BottomLine.Color="Gray" Text="Medtronic Cranial, Spinal,&#13;&#10;Orthopedics Technologies&#13;&#10;美敦力中国骨科及神外业务" Font="宋体, 10pt" TextFill.Color="Gray"/>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="5" TopMargin="5" RightMargin="5" BottomMargin="5" FirstPageSource="15" OtherPagesSource="15">
<ReportTitleBand Name="ReportTitle1" Width="756"/>
<PageHeaderBand Name="PageHeader1" Top="4" Width="756" Height="59.72">
<TextObject Name="Text1" Left="226.8" Top="3" Width="321.3" Height="56.7" Border.Lines="Left, Right, Bottom" Border.LeftLine.Color="Gray" Border.RightLine.Color="Gray" Border.BottomLine.Color="Gray" Text="Equipment Repair Form&#13;&#10;设备维修单" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TextObject Name="CellPageNo" Left="548.1" Top="3.02" Width="226.8" Height="56.7" Border.Lines="Bottom" Border.BottomLine.Color="Gray" Text="PP-060.07&#13;&#10;Rev版本:B&#13;&#10;Page页码 [Page] of [TotalPages]" Font="宋体, 10pt"/>
<TextObject Name="Text5" Left="0.43" Top="3" Width="226.8" Height="56.7" Border.Lines="Bottom" Border.BottomLine.Color="Gray" Text="Medtronic Cranial, Spinal,&#13;&#10;Orthopedics Technologies&#13;&#10;美敦力中国骨科及神外业务" Font="宋体, 10pt"/>
</PageHeaderBand>
<ColumnHeaderBand Name="ColumnHeader1" Top="110.27" Width="771.12" Height="37.8" CanShrink="true"/>
<DataBand Name="Data1" Top="168.07" Width="771.12" Height="869.4" CanGrow="true" Guides="0,869.4,51.14,102.28,153.42,255.7,204.56,357.98,306.84,409.12,460.26,511.4,562.54,613.68,664.82,715.96,767.1,818.24,869.38">
<TableObject Name="Table1" Width="771.12" Height="869.4" Dock="Fill" Border.Lines="All" Fill.Color="WhiteSmoke">
<TableColumn Name="Column1" Width="193.72"/>
<TableColumn Name="Column2" Width="193.72"/>
<TableColumn Name="Column3" Width="193.72"/>
<TableColumn Name="Column4" Width="189.94"/>
<TableRow Name="Row1" Height="51.14">
<TableCell Name="Cell1" Border.Lines="All" Text="Application Dep.&#13;&#10;申请部门&#13;&#10;" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell2" Border.Lines="All" VertAlign="Center" Font="宋体, 9pt"/>
<DataBand Name="Data1" Top="67.72" Width="756" Height="860.13" CanGrow="true">
<TableObject Name="Table1" Left="9.45" Top="18.9" Width="733.34" Height="822.47" Border.Lines="All">
<TableColumn Name="Column1" Width="169.16"/>
<TableColumn Name="Column2" Width="188.06"/>
<TableColumn Name="Column3" Width="188.06"/>
<TableColumn Name="Column4" Width="188.06"/>
<TableRow Name="Row1" Height="51.16">
<TableCell Name="Cell73" Text="Application Dep.&#13;&#10;申请部门" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell2" Border.Lines="All" Text="[MaintenanceInfo.申请部门]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell3" Text="Receiving Dep.&#13;&#10;接收部门" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell4" Border.Lines="All" Text="设备设施部" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
</TableRow>
<TableRow Name="Row2" Height="51.14">
<TableCell Name="Cell6" Border.Lines="All" Text="Equipment Name名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell7" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableRow Name="Row2" Height="51.16">
<TableCell Name="Cell6" Border.Lines="All" Text="Equipment Name名称[MaintenanceInfo.名称]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell7" Border.Lines="All" Text="Equipment ID设备编号[MaintenanceInfo.设备编号]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell8" Border.Lines="All" Text="Symptom distinction&#13;&#10;现象区分" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
<TableCell Name="Cell9" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell9" Border.Lines="All" Text="[MaintenanceInfo.现象区分]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
</TableRow>
<TableRow Name="Row3" Height="51.14">
<TableCell Name="Cell11" Border.Lines="All" Text="Where Failure Occurred故障发生地点" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
<TableRow Name="Row3" Height="51.16">
<TableCell Name="Cell11" Border.Lines="All" Text="Where Failure Occurred故障发生地点[MaintenanceInfo.故障发生地点]" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
<TableCell Name="Cell12" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell13" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell14" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row4" Height="51.14">
<TableCell Name="Cell16" Border.Lines="All" Text="ime of Failure故障发生时间" VertAlign="Center" Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
<TableRow Name="Row4" Height="51.16">
<TableCell Name="Cell16" Border.Lines="All" Text="Time of Failure故障发生时间[MaintenanceInfo.故障发生时间]" VertAlign="Center" Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
<TableCell Name="Cell17" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell18" Border.Lines="All" Text="Maintenance&#13;&#10;维修方式" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
<TableCell Name="Cell19" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell19" Border.Lines="All" Text="[MaintenanceInfo.维修方式]" HorzAlign="Center" VertAlign="Center" Font="宋体, 9pt" RowSpan="2"/>
</TableRow>
<TableRow Name="Row5" Height="51.14">
<TableRow Name="Row5" Height="32.26">
<TableCell Name="Cell21" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell22" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell23" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell24" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row6" Height="51.14">
<TableCell Name="Cell25" Border.Lines="All" Text="Was there product being processed/tested at the time of the equipment failure?&#13;&#10;故障发生时是否有产品在加工/测试在进行?&#13;&#10;" Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
<TableRow Name="Row6" Height="51.16">
<TableCell Name="Cell25" Border.Lines="All" Text="Was there product being processed/tested at the time of the equipment failure?&#13;&#10;故障发生时是否有产品在加工/测试在进行?&#13;&#10;[MaintenanceInfo.产品批号]" Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
<TableCell Name="Cell26" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell27" Border.Lines="All" Text="Repair Start Date&#13;&#10;修理开始日期&#13;&#10;" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell28" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell28" Border.Lines="All" Text="[MaintenanceInfo.修理开始日期]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
</TableRow>
<TableRow Name="Row7" Height="51.14">
<TableRow Name="Row7" Height="51.16">
<TableCell Name="Cell29" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell30" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell31" Border.Lines="All" Text="Repair Closed Date&#13;&#10;修理结束日期&#13;&#10;" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell32" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell32" Border.Lines="All" Text="[MaintenanceInfo.修理结束日期]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
</TableRow>
<TableRow Name="Row8" Height="51.14">
<TableRow Name="Row8" Height="41.71">
<TableCell Name="Cell33" Border.Lines="All" Text="Quality Assessment&#13;&#10;质量部评估&#13;&#10;" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell34" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell34" Border.Lines="All" Text="[MaintenanceInfo.质量部评估]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell35" Border.Lines="All" Text="Total Repair Time&#13;&#10;总修复时间&#13;&#10;" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
<TableCell Name="Cell36" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell36" Border.Lines="All" Text="[MaintenanceInfo.总修复时间]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
</TableRow>
<TableRow Name="Row9" Height="51.14">
<TableRow Name="Row9" Height="41.71">
<TableCell Name="Cell37" Border.Lines="All" Text="Engineering Assessment&#13;&#10;工程部评估&#13;&#10;" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell38" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell38" Border.Lines="All" Text="[MaintenanceInfo.工程部评估]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell39" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell40" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row10" Height="51.14">
<TableRow Name="Row10" Height="41.71">
<TableCell Name="Cell41" Border.Lines="All" Text="Microbiology Testing&#13;&#10;微生物实验室&#13;&#10;" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell42" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell42" Border.Lines="All" Text="N/A" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell43" Border.Lines="All" Text="Total Downtime&#13;&#10;总停机时间&#13;&#10;" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell44" Border.Lines="All" Text="[MaintenanceInfo.总停机时间]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" RowSpan="2"/>
</TableRow>
<TableRow Name="Row11" Height="51.14">
<TableRow Name="Row11" Height="41.71">
<TableCell Name="Cell45" Border.Lines="All" Text="Testing Lab&#13;&#10;力学实验室&#13;&#10;" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell46" Border.Lines="All" Text="N/A" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell47" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell48" Border.Lines="All" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row12" Height="51.14">
<TableCell Name="Cell49" Border.Lines="All" Text="Fault Symptoms 故障现象:" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row12" Height="51.16">
<TableCell Name="Cell49" Border.Lines="All" Text="Fault Symptoms 故障现象:[MaintenanceInfo.故障现象]" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell50" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell51" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell52" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row13" Height="51.14">
<TableCell Name="Cell53" Border.Lines="All" Text="Cause of failure 故障原因:" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row13" Height="51.16">
<TableCell Name="Cell53" Border.Lines="All" Text="Cause of failure 故障原因:[MaintenanceInfo.故障原因]" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell54" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell55" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell56" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row14" Height="51.14">
<TableCell Name="Cell57" Border.Lines="All" Text="Repairing Content 维修内容:" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row14" Height="51.16">
<TableCell Name="Cell57" Border.Lines="All" Text="Repairing Content 维修内容:[MaintenanceInfo.维修内容]" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell58" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell59" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell60" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row15" Height="51.14">
<TableCell Name="Cell61" Border.Lines="All" Text="Accessories 配件: &#13;&#10;&#13;&#10;Personnel 人员:" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row15" Height="51.16">
<TableCell Name="Cell61" Border.Lines="All" Text="Accessories 配件: [MaintenanceInfo.配件]&#13;&#10;&#13;&#10;Personnel 人员:[MaintenanceInfo.人员]" VertAlign="Center" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell62" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell63" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell64" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row16" Height="51.14">
<TableCell Name="Cell65" Border.Lines="All" Text="Whether need to Re-validation是否需要再验证" Padding="5, 5, 5, 5" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row16" Height="51.16">
<TableCell Name="Cell65" Border.Lines="All" Text="Whether need to Re-validation是否需要再验证&#13;&#10;[MaintenanceInfo.是否需要再验证]" VertAlign="Center" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell66" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell67" HorzAlign="Center" Font="宋体, 9pt"/>
<TableCell Name="Cell68" HorzAlign="Center" Font="宋体, 9pt"/>
</TableRow>
<TableRow Name="Row17" Height="51.14">
<TableCell Name="Cell69" Border.Lines="All" Text="Equipment Recovery Confirmation设备恢复确认&#13;&#10;&#13;&#10;Application Department Confirmation/Date申请部门确认/日期:" Padding="0, 0, 0, 0" Font="宋体, 10pt" ColSpan="4"/>
<TableRow Name="Row17" Height="60.61">
<TableCell Name="Cell69" Border.Lines="All" Text="Equipment Recovery Confirmation设备恢复确认[MaintenanceInfo.设备恢复确认]&#13;&#10;&#13;&#10;Application Department Confirmation/Date申请部门确认/日期:[MaintenanceInfo.申请部门确认/日期]" Padding="0, 0, 0, 0" VertAlign="Center" Font="宋体, 10pt" ColSpan="4"/>
<TableCell Name="Cell70" Font="宋体, 9pt"/>
<TableCell Name="Cell71" Font="宋体, 9pt"/>
<TableCell Name="Cell72" Font="宋体, 9pt"/>
</TableRow>
</TableObject>
</DataBand>
<ColumnFooterBand Name="ColumnFooter1" Top="1057.47" Width="771.12" Height="28.35" CanShrink="true"/>
<PageFooterBand Name="PageFooter1" Top="1105.82" Width="771.12" Height="37.8" Guides="0,28.35">
<TextObject Name="Text2" Left="9.45" Width="746.55" Height="28.35" CanShrink="true" GrowToBottom="true" CanBreak="false" Text="*Copies are uncontrolled unless otherwise identified复印件为非受控除非特别说明 *&#13;&#10;Before using this document, consult Windchill for the latest revision and effective date.使用文件前到Windchill中查询最新有效版本" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt" TextFill.Color="Gray"/>
<PageFooterBand Name="PageFooter1" Top="931.85" Width="756" Height="56.7">
<TextObject Name="Text2" Width="765.45" Height="56.7" Text="*Copies are uncontrolled unless otherwise identified复印件为非受控除非特别说明 *&#13;&#10;Before using this document, consult Windchill for the latest revision and effective date.使用文件前到Windchill中查询最新有效版本" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt" TextFill.Color="Gray"/>
</PageFooterBand>
</ReportPage>
</Report>

View File

@ -0,0 +1,145 @@

namespace DeviceRepairAndOptimization.Pages.Common
{
partial class dlgProgressBar
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(dlgProgressBar));
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
this.progressBarControl1 = new DevExpress.XtraEditors.ProgressBarControl();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.progressBarControl1.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).BeginInit();
this.SuspendLayout();
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.progressBarControl1);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(446, 0, 1103, 776);
this.layoutControl1.Root = this.Root;
this.layoutControl1.Size = new System.Drawing.Size(397, 102);
this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1";
//
// Root
//
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.Root.GroupStyle = DevExpress.Utils.GroupStyle.Light;
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.simpleLabelItem1,
this.layoutControlItem1});
this.Root.Name = "Root";
this.Root.Size = new System.Drawing.Size(397, 102);
this.Root.TextVisible = false;
//
// progressBarControl1
//
this.progressBarControl1.Location = new System.Drawing.Point(16, 59);
this.progressBarControl1.Name = "progressBarControl1";
this.progressBarControl1.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.2F);
this.progressBarControl1.Size = new System.Drawing.Size(365, 18);
this.progressBarControl1.StyleController = this.layoutControl1;
this.progressBarControl1.TabIndex = 4;
//
// layoutControlItem1
//
this.layoutControlItem1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem1.Control = this.progressBarControl1;
this.layoutControlItem1.Location = new System.Drawing.Point(0, 35);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(371, 43);
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem1.TextVisible = false;
//
// simpleLabelItem1
//
this.simpleLabelItem1.AllowHotTrack = false;
this.simpleLabelItem1.AppearanceItemCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.2F);
this.simpleLabelItem1.AppearanceItemCaption.Options.UseFont = true;
this.simpleLabelItem1.AppearanceItemCaption.Options.UseTextOptions = true;
this.simpleLabelItem1.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.simpleLabelItem1.AppearanceItemCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.simpleLabelItem1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.simpleLabelItem1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.simpleLabelItem1.Location = new System.Drawing.Point(0, 0);
this.simpleLabelItem1.MaxSize = new System.Drawing.Size(0, 35);
this.simpleLabelItem1.MinSize = new System.Drawing.Size(85, 28);
this.simpleLabelItem1.Name = "simpleLabelItem1";
this.simpleLabelItem1.Size = new System.Drawing.Size(371, 35);
this.simpleLabelItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.simpleLabelItem1.Text = "正在保存......";
this.simpleLabelItem1.TextSize = new System.Drawing.Size(84, 18);
//
// dlgProgressBar
//
this.Appearance.Options.UseFont = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(397, 102);
this.ControlBox = false;
this.Controls.Add(this.layoutControl1);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.2F);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.IconOptions.Image = ((System.Drawing.Image)(resources.GetObject("dlgProgressBar.IconOptions.Image")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "dlgProgressBar";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "提示";
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.progressBarControl1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup Root;
private DevExpress.XtraEditors.ProgressBarControl progressBarControl1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1;
}
}

View File

@ -0,0 +1,76 @@
using System;
using System.IO;
using System.Windows.Forms;
namespace DeviceRepairAndOptimization.Pages.Common
{
public partial class dlgProgressBar : DevExpress.XtraEditors.XtraForm
{
private string caption = "提示";
public string Caption
{
get { return caption; }
set { caption = value; Invalidate(); }
}
byte[] Datas;
string Path;
public dlgProgressBar(byte[] data, string path)
{
InitializeComponent();
Datas = data;
Path = path;
this.Load += DlgProgressBar_Load;
}
private void DlgProgressBar_Load(object sender, System.EventArgs e)
{
//创建一个文件流
using (FileStream fs = new FileStream(Path, FileMode.Create))
{
int totalBytes = Datas.Length;
int bufferSize = 4096; // 缓冲区大小,可以根据需要进行调整
int bytesWritten = 0;
while (bytesWritten < totalBytes)
{
int bytesToWrite = Math.Min(bufferSize, totalBytes - bytesWritten);
fs.Write(Datas, bytesWritten, bytesToWrite);
bytesWritten += bytesToWrite;
// 更新进度条
UpdateProgressBar(bytesWritten, totalBytes);
}
}
}
public void UpdateProgressBar(long bytesRead, long totalBytes)
{
if (bytesRead == totalBytes)
this.DialogResult = DialogResult.OK;
// 在UI线程上更新进度条
if (InvokeRequired)
{
this.Invoke((MethodInvoker)delegate
{
UpdateProgressBar(bytesRead, totalBytes);
});
return;
}
int progressPercentage = (int)((double)bytesRead / totalBytes * 100);
progressBarControl1.EditValue = progressPercentage;
progressBarControl1.PerformStep();
progressBarControl1.Update();
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
this.Text = Caption;
}
}
}

View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="dlgProgressBar.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAFnRFWHRUaXRsZQBTY2hlZHVs
ZXI7Q2xvY2s7C4qLowAAA0VJREFUOE89k1tIU3Ecx9UwMCmfetBevGyKU7z0oJvmDXVrq1nhi1iUIpiw
yi44CwzX1dCwpKvTNGaZ18rrdOX0zFzOeellS+1iDsIulhMxtchvv/8hPPCFA4fP53f5/48LAJe0tAM+
CoVSk5Iqs8UnJNqiosQXQ0JDA3x9fbdSvOLjEwPp+xWlcr9dqdxnk8kUmoSEJB/G8gIGX7x0GaOjY2hp
acWhQ4exe7fiMwGLLHv2pM1lZ+fg8eN6DA9bUKy5ALE4RrMhSEmR2azWUR4uLDyH6uoHGBsbh9O5SHGC
favUViE//zQqK7XgOA6RkTvtvIBadImLS7BXVNxCUdF5voLpzTTKGwzILdMh77oONxoNGBh/S6AJBQVn
UVysQbAoZJJYVyZw27UrvjY3N4+Hm4xWqKvaUWeywzy7BG5mCTWmSRQ97EFznwX6HgONeARhYeHPiPVg
gs20FC1rm1VWa9vBTX/D3DKgVqvx+y+wRhmf/YGShj70msdRcq2U7aCL2O1M4EFLsrKZWdusMoMZqFKp
ML8CTC4AQ1+B+uEP0D7rQ2PzU0gksTPE+jLBVrZptrCjpTqYHUtYXAP+kCDrSBZsP4HRecD0BWh/v4yy
R10YGDQjKip6hdhgJvBigoWFBajKH4H7tMRXn18F0tPTIZVKERMTi4jwcDx//ws3n+hhMHKIiIhcJVbE
BNtohAmLxYqKpheoHZziZ55yUuXvwOtvADcHGD4DupFZPOwworK6FiJRiINYARNskUrl2vt0vuyoiusM
mHD84GdmbRv/wy12J+52W9D28hWOnzgFoTBQT6w3E7jTVd2flZUz19/P4anRgrLmfjSMfET7u2W+7boR
B+7pR9DUY0LF7XsQSySLfn5+KmI9mcCV4pWcnHrn5Kkz6936XhjME6hpM6K8Xk9j9ULX0c9XZrBcroC/
v38zMTsobvxVppdNdJ07k5OlyMg4uH61pBQNTa0wmoZg6BugmWtwjNqmyutCoRCBwsAeYtw3/gX6mTJl
MjmSklI6o6MlKjrjVjGdMzsqtm2RSOQgUE+VC4OCgrqZxD8gIHNDIJfvFdAiM8nKxvGgbKewJ5gioggo
3hRPiluAQJBJMgEAl39H50n4SqxD1AAAAABJRU5ErkJggg==
</value>
</data>
</root>

View File

@ -93,7 +93,13 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
List<TreeListNode> treeListNodes = treeList1.GetAllCheckedNodes();
if ((treeListNodes?.Count ?? 0) > 0)
{
TreeListNode node = treeListNodes.FirstOrDefault();
TreeListNode node = treeListNodes.FirstOrDefault(x => x.HasChildren == false);
if (node == null)
{
XtraMessageBoxHelper.Warn("选中数据不能为空!");
return;
}
CurrentSelectModel = routes.FirstOrDefault(x => x.AutoID.ToString() == node.GetValue("AutoID").ToString());
if (CurrentSelectModel == null)
{

View File

@ -115,7 +115,7 @@ namespace DeviceRepairAndOptimization.Pages
tableLayoutPanel1.RowCount = 2;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Size = new System.Drawing.Size(1598, 916);
tableLayoutPanel1.Size = new System.Drawing.Size(1854, 678);
tableLayoutPanel1.TabIndex = 1;
//
// gridControl1
@ -128,7 +128,7 @@ namespace DeviceRepairAndOptimization.Pages
this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.Operations,
this.btn_DeviceOperations});
this.gridControl1.Size = new System.Drawing.Size(1592, 862);
this.gridControl1.Size = new System.Drawing.Size(1848, 624);
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
@ -163,6 +163,7 @@ namespace DeviceRepairAndOptimization.Pages
this.gridView1.OptionsView.ColumnAutoWidth = false;
this.gridView1.OptionsView.ShowGroupPanel = false;
this.gridView1.OptionsView.ShowHorizontalLines = DevExpress.Utils.DefaultBoolean.True;
this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView1_CustomColumnDisplayText);
//
// OperatingParameters
//
@ -393,7 +394,7 @@ namespace DeviceRepairAndOptimization.Pages
flowLayoutPanel1.Controls.Add(this.btn_Filter);
flowLayoutPanel1.Controls.Add(this.EditSearch);
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel1.Location = new System.Drawing.Point(1148, 0);
flowLayoutPanel1.Location = new System.Drawing.Point(1404, 0);
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(7);
@ -432,7 +433,7 @@ namespace DeviceRepairAndOptimization.Pages
stackPanel1.Location = new System.Drawing.Point(0, 0);
stackPanel1.Margin = new System.Windows.Forms.Padding(0);
stackPanel1.Name = "stackPanel1";
stackPanel1.Size = new System.Drawing.Size(1148, 48);
stackPanel1.Size = new System.Drawing.Size(1404, 48);
stackPanel1.TabIndex = 2;
//
// btn_Add
@ -455,7 +456,7 @@ namespace DeviceRepairAndOptimization.Pages
// page_DriveListInfo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1598, 916);
this.ClientSize = new System.Drawing.Size(1854, 678);
this.Controls.Add(tableLayoutPanel1);
this.Name = "page_DriveListInfo";
this.Text = "page_DriveListInfo";

View File

@ -57,7 +57,7 @@ namespace DeviceRepairAndOptimization.Pages
splashScreenManager1.ShowWaitForm();
List<View_DriveInfomationModel> lst = GetDatas();
gridControl1.DataSource = lst;
gridView1.BestFitColumns();
//gridView1.BestFitColumns();
splashScreenManager1.TryCloseWait();
}
catch (Exception ex)
@ -105,7 +105,7 @@ namespace DeviceRepairAndOptimization.Pages
//FlyoutDialog.Show(GlobalInfo._RootForm, _form, action, new FlyoutProperties() { Style = FlyoutStyle.Popup }, predicate);
break;
case "edit":
if (!GlobalInfo.HasRole("BIZ_DEVICELEDGER_EDIT"))
if (!GlobalInfo.HasRole("BIZ_DEVICELEDGER_EDIT"))
{
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
return;
@ -160,5 +160,21 @@ namespace DeviceRepairAndOptimization.Pages
XtraMessageBoxHelper.Error(ex.Message);
}
}
private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
{
if (e.Column.FieldName == "EquipmentStatus")
{
int status;
if (int.TryParse(e.Value+"", out status) && status>0)
{
e.DisplayText = "启用";
}
else
{
e.DisplayText = "停用";
}
}
}
}
}

View File

@ -1,17 +1,16 @@
using System;
using DevExpress.XtraBars.ToolbarForm;
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using DeviceRepair.Models;
using DeviceRepair.Models.Device;
using DeviceRepair.Models.Preserve;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraBars.ToolbarForm;
using DeviceRepair.Models;
using DeviceRepair.Models.Device;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraTreeList;
using DeviceRepair.Models.Preserve;
using DeviceRepair.Models.View;
namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
{
@ -194,7 +193,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
try
{
splashScreenManager1.ShowWaitForm();
APIResponseData apiResponseData = DeviceManager.Instance.GetDeviceTreeDatas("");
APIResponseData apiResponseData = DeviceManager.Instance.GetDeviceTreeDatas("", "KH");
if (apiResponseData.Code != 1)
throw new Exception(apiResponseData.Message);
@ -302,6 +301,13 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
});
}
if (subDatas.Count == 0)
{
this.DialogResult = DialogResult.OK;
splashScreenManager1.TryCloseWait();
return;
}
APIResponseData apiResponseData = FormManager.Instance.AssigningFormToDevices(subDatas);
if (apiResponseData.Code != 1)
throw new Exception(apiResponseData.Message);

View File

@ -105,6 +105,11 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
/// </summary>
private Cell CurrentCell;
/// <summary>
/// 异常处理的单元格
/// </summary>
private List<Cell> ExCurrentCell = new List<Cell>();
/// <summary>
/// 服务器时间
/// </summary>
@ -158,14 +163,18 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
Caption = "正文",
Items =
{
new DXMenuItem("正常",(s,e)=>{CurrentCell.Value = "√"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("紧固",(s,e)=>{CurrentCell.Value = "N"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("给油",(s,e)=>{CurrentCell.Value = "U"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("清洁",(s,e)=>{CurrentCell.Value = "C"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("修理",(s,e)=>{CurrentCell.Value = "R"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("调整",(s,e)=>{CurrentCell.Value = "T"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("替换",(s,e)=>{CurrentCell.Value = "H"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("有问题/异常",(s,e)=>{CurrentCell.Value = (CurrentFormModel.VersionCode == "FM-P0079.02" ? "X":"△"); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("正常",(s,e)=>{CurrentCell.Value = "√";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("紧固",(s,e)=>{CurrentCell.Value = "N";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("给油",(s,e)=>{CurrentCell.Value = "U";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("清洁",(s,e)=>{CurrentCell.Value = "C";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("修理",(s,e)=>{CurrentCell.Value = "R";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("调整",(s,e)=>{CurrentCell.Value = "T";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("替换",(s,e)=>{CurrentCell.Value = "H";ExCellSet(false); template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("有问题/异常",(s,e)=>{
CurrentCell.Value = (CurrentFormModel.VersionCode == "FM-P0079.02" ? "X":"△");
template.Content.WriteValue(CurrentCell);
ExCellSet(true);
} ),
new DXMenuItem("不适用或无生产",(s,e)=>{CurrentCell.Value = "N/A"; template.Content.WriteValue(CurrentCell);} ),
new DXMenuItem("清空",(s,e)=>{CurrentCell.Value = ""; template.Content.WriteValue(CurrentCell);} ),
}
@ -175,6 +184,20 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
}
}
void ExCellSet(bool isEx)
{
// 如果当前单元格已经存在且当前单元格不在ExCurrentCell中则将当前单元格添加到ExCurrentCell中
if (isEx && !ExCurrentCell.Contains(CurrentCell))
{
ExCurrentCell.Add(CurrentCell);
}
// 如果当前单元格不存在且当前单元格在ExCurrentCell中则将当前单元格从ExCurrentCell中移除
else if (!isEx && ExCurrentCell.Contains(CurrentCell))
{
ExCurrentCell.Remove(CurrentCell);
}
}
/// <summary>
/// 其他异常处理
/// </summary>
@ -300,7 +323,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
private void btn_Submit_Click(object sender, EventArgs e)
{
// PM内容 验证
List<SheetDataItem> verifyData = template.Content.Where(x => IsEditor(CurrentType).Contains(x.MaintenanceType) && IsEditorColumns(CurrentType) == x.MaintenanceTypeValue && x.Value == null)?.ToList();
List<SheetDataItem> verifyData = template.Content.Where(x => IsEditor(CurrentType).Contains(x.MaintenanceType) && IsEditorColumns(CurrentType, x) && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
if (verifyData != null && verifyData.Count > 0)
{
// 选定指定单元格
@ -311,7 +334,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
}
// 操作人 验证
verifyData = template.Operation.Where(x => IsEditor(CurrentType, false).Contains(x.MaintenanceType) && IsEditorColumns(x.MaintenanceType) == x.MaintenanceTypeValue && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
verifyData = template.Operation.Where(x => IsEditor(CurrentType, false).Contains(x.MaintenanceType) && IsEditorColumns(CurrentType, x) && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
if (verifyData != null && verifyData.Count > 0)
{
// 选定指定单元格
@ -322,7 +345,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
}
// 操作时间 验证
verifyData = template.OperationDate.Where(x => IsEditor(CurrentType, false).Contains(x.MaintenanceType) && IsEditorColumns(x.MaintenanceType) == x.MaintenanceTypeValue && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
verifyData = template.OperationDate.Where(x => IsEditor(CurrentType, false).Contains(x.MaintenanceType) && IsEditorColumns(CurrentType, x) && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
if (verifyData != null && verifyData.Count > 0)
{
// 选定指定单元格
@ -332,6 +355,20 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
return;
}
// 存在异常处理数据
verifyData = template.ExceptionDescription.Where(x => (IsEditor(CurrentType, false).Contains(x.MaintenanceType) || (CurrentFormModel.VersionCode == "FM-P0079.02" && x.MaintenanceType == EnumMaintenanceType.None)) && string.IsNullOrWhiteSpace(x.Value + ""))?.ToList();
if (ExCurrentCell != null && ExCurrentCell.Count > 0)
{
// 选定指定单元格
SheetDataItem item = verifyData.Where(x => ExCurrentCell.Any(s => s.RowIndex < x.RowIndex)).FirstOrDefault();
if (item != null)
{
ScrollToCellRow(item);
XtraMessageBoxHelper.Error($"当前报修存在异常数据,请填写其他异常处理内容!");
return;
}
}
if (MaintenanceAutoID == 0)
{
foreach (var item in template.DeviceSpecification)
@ -596,7 +633,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
x => x.ColumnIndex == CurrentCell.ColumnIndex
&& x.RowIndex == CurrentCell.RowIndex
&& ts.Contains(x.MaintenanceType)
&& (template.Year.Count == 0 || IsEditorColumns(x.MaintenanceType) == x.MaintenanceTypeValue)
&& IsEditorColumns(CurrentType, x)
);
}
else
@ -605,7 +642,7 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
x => x.ColumnIndex == CurrentCell.ColumnIndex
&& x.RowIndex == CurrentCell.RowIndex
&& IsEditor(CurrentType, false).Contains(x.MaintenanceType)
&& (template.Year.Count == 0 || IsEditorColumns(x.MaintenanceType) == x.MaintenanceTypeValue)
&& IsEditorColumns(CurrentType, x, true)
);
}
}
@ -714,6 +751,8 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
{
// 获取鼠标位置对应的单元格
Cell cell = spreadsheetControl1.GetCellFromPoint(new PointF(e1.X, e1.Y));
if (cell == null)
return;
// 判断是否为合并单元格
if (cell.IsMerged)
@ -1149,33 +1188,106 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
return ts;
}
private string IsEditorColumns(EnumMaintenanceType t)
// 半年的单元格限制
int SemianCol = 0;
private bool IsEditorColumns(EnumMaintenanceType t, SheetDataItem item, bool IgnoreAnnualValidate = false)
{
string ts = "";
switch (t)
if (t == EnumMaintenanceType.Annual || t == EnumMaintenanceType.OddAnnual || t == EnumMaintenanceType.EvenAnnual)
{
case EnumMaintenanceType.Annual:
case EnumMaintenanceType.OddAnnual:
case EnumMaintenanceType.EvenAnnual:
ts = "年";
break;
case EnumMaintenanceType.Monthly:
ts = CurrentDate.Month + "";
break;
case EnumMaintenanceType.Quarterly:
ts = ((CurrentDate.Month - 1) / 3 + 1) + "";
break;
case EnumMaintenanceType.Semian:
ts = ((CurrentDate.Month - 1) / 6 + 1) + "";
break;
case EnumMaintenanceType.None:
break;
default:
break;
if (item.MaintenanceType == EnumMaintenanceType.Annual)
{
// 年
return true;
}
else if ((CurrentDate.Year % 2 == 0 || IgnoreAnnualValidate) && item.MaintenanceType == EnumMaintenanceType.EvenAnnual)
{
// 偶数年
return true;
}
else if ((CurrentDate.Year % 2 == 1 || IgnoreAnnualValidate) && item.MaintenanceType == EnumMaintenanceType.OddAnnual)
{
// 奇数年
return true;
}
else if (item.MaintenanceType == EnumMaintenanceType.Quarterly && ((CurrentDate.Month - 1) / 3 + 1) + "" == item.MaintenanceTypeValue)
{
// 季度
return true;
}
else if (item.MaintenanceType == EnumMaintenanceType.Semian)
{
// 半年
return true;
}
else if (item.MaintenanceType == EnumMaintenanceType.Monthly && CurrentDate.Month + "" == item.MaintenanceTypeValue)
{
// 月
return true;
}
}
else if (t == EnumMaintenanceType.Monthly)
{
if (item.MaintenanceType == EnumMaintenanceType.Monthly && CurrentDate.Month + "" == item.MaintenanceTypeValue)
{
// 月
return true;
}
}
else if (EnumMaintenanceType.Quarterly == t)
{
if (item.MaintenanceType == EnumMaintenanceType.Quarterly && ((CurrentDate.Month - 1) / 3 + 1) + "" == item.MaintenanceTypeValue)
{
// 季度
return true;
}
else if (item.MaintenanceType == EnumMaintenanceType.Monthly && CurrentDate.Month + "" == item.MaintenanceTypeValue)
{
// 月
return true;
}
}
else if (EnumMaintenanceType.Semian == t)
{
if (SemianCol == 0)
SemianCol = template.Content.Min(x => x.ColumnIndex);
return ts;
if (((CurrentDate.Month - 1) / 6 + 1) + "" == "1" && SemianCol == item.ColumnIndex)
{
// 上半年
return true;
}
else if (((CurrentDate.Month - 1) / 6 + 1) + "" == "2" && (SemianCol + 1) == item.ColumnIndex)
{
// 下半年
return true;
}
// template.Content.Min(x=>x.ColumnIndex)
}
return false;
//switch (t)
//{
// case EnumMaintenanceType.Annual:
// case EnumMaintenanceType.OddAnnual:
// case EnumMaintenanceType.EvenAnnual:
// ts.Add("年");
// break;
// case EnumMaintenanceType.Monthly:
// ts.Add(CurrentDate.Month + "");
// break;
// case EnumMaintenanceType.Quarterly:
// ts.Add(((CurrentDate.Month - 1) / 3 + 1) + "");
// break;
// case EnumMaintenanceType.Semian:
// ts.Add(((CurrentDate.Month - 1) / 6 + 1) + "");
// break;
// case EnumMaintenanceType.None:
// break;
// default:
// break;
//}
//return ts;
}
private void be_atta_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)

View File

@ -136,7 +136,7 @@
this.layoutControlItem1.Location = new System.Drawing.Point(0, 293);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 4;
this.layoutControlItem1.Size = new System.Drawing.Size(457, 55);
this.layoutControlItem1.Size = new System.Drawing.Size(453, 51);
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem1.TextVisible = false;
//
@ -145,16 +145,16 @@
stackPanel1.Controls.Add(this.btn_Cancel);
stackPanel1.Controls.Add(this.btn_Submit);
stackPanel1.LayoutDirection = DevExpress.Utils.Layout.StackPanelLayoutDirection.RightToLeft;
stackPanel1.Location = new System.Drawing.Point(10, 303);
stackPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
stackPanel1.Location = new System.Drawing.Point(12, 305);
stackPanel1.Margin = new System.Windows.Forms.Padding(2);
stackPanel1.Name = "stackPanel1";
stackPanel1.Size = new System.Drawing.Size(453, 51);
stackPanel1.Size = new System.Drawing.Size(449, 47);
stackPanel1.TabIndex = 4;
//
// btn_Cancel
//
this.btn_Cancel.Location = new System.Drawing.Point(378, 13);
this.btn_Cancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_Cancel.Location = new System.Drawing.Point(374, 11);
this.btn_Cancel.Margin = new System.Windows.Forms.Padding(2);
this.btn_Cancel.Name = "btn_Cancel";
this.btn_Cancel.Size = new System.Drawing.Size(73, 24);
this.btn_Cancel.TabIndex = 0;
@ -163,8 +163,8 @@
//
// btn_Submit
//
this.btn_Submit.Location = new System.Drawing.Point(301, 13);
this.btn_Submit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_Submit.Location = new System.Drawing.Point(297, 11);
this.btn_Submit.Margin = new System.Windows.Forms.Padding(2);
this.btn_Submit.Name = "btn_Submit";
this.btn_Submit.Size = new System.Drawing.Size(73, 24);
this.btn_Submit.TabIndex = 1;
@ -176,17 +176,17 @@
this.layoutControlItem2.Control = panelControl1;
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(457, 167);
this.layoutControlItem2.Size = new System.Drawing.Size(453, 167);
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem2.TextVisible = false;
//
// panelControl1
//
panelControl1.Controls.Add(groupBox1);
panelControl1.Location = new System.Drawing.Point(10, 10);
panelControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
panelControl1.Location = new System.Drawing.Point(12, 12);
panelControl1.Margin = new System.Windows.Forms.Padding(2);
panelControl1.Name = "panelControl1";
panelControl1.Size = new System.Drawing.Size(453, 163);
panelControl1.Size = new System.Drawing.Size(449, 163);
panelControl1.TabIndex = 5;
//
// groupBox1
@ -194,10 +194,10 @@
groupBox1.Controls.Add(this.layoutControl2);
groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
groupBox1.Location = new System.Drawing.Point(2, 2);
groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
groupBox1.Margin = new System.Windows.Forms.Padding(2);
groupBox1.Name = "groupBox1";
groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
groupBox1.Size = new System.Drawing.Size(449, 159);
groupBox1.Padding = new System.Windows.Forms.Padding(2);
groupBox1.Size = new System.Drawing.Size(445, 159);
groupBox1.TabIndex = 0;
groupBox1.TabStop = false;
groupBox1.Text = "点检表信息";
@ -209,7 +209,7 @@
this.layoutControl2.Controls.Add(this.txt_Rev);
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl2.Location = new System.Drawing.Point(2, 16);
this.layoutControl2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.layoutControl2.Margin = new System.Windows.Forms.Padding(2);
this.layoutControl2.Name = "layoutControl2";
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
@ -219,44 +219,44 @@
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControl2.Root = this.layoutControlGroup1;
this.layoutControl2.Size = new System.Drawing.Size(445, 141);
this.layoutControl2.Size = new System.Drawing.Size(441, 141);
this.layoutControl2.TabIndex = 0;
this.layoutControl2.Text = "layoutControl2";
//
// txt_FormName
//
this.txt_FormName.Location = new System.Drawing.Point(67, 15);
this.txt_FormName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_FormName.Location = new System.Drawing.Point(72, 17);
this.txt_FormName.Margin = new System.Windows.Forms.Padding(2);
this.txt_FormName.Name = "txt_FormName";
this.txt_FormName.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_FormName.Properties.Appearance.Options.UseFont = true;
this.txt_FormName.Properties.ReadOnly = true;
this.txt_FormName.Size = new System.Drawing.Size(368, 26);
this.txt_FormName.Size = new System.Drawing.Size(357, 26);
this.txt_FormName.StyleController = this.layoutControl2;
this.txt_FormName.TabIndex = 6;
//
// txt_Number
//
this.txt_Number.Location = new System.Drawing.Point(67, 57);
this.txt_Number.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Number.Location = new System.Drawing.Point(72, 57);
this.txt_Number.Margin = new System.Windows.Forms.Padding(2);
this.txt_Number.Name = "txt_Number";
this.txt_Number.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Number.Properties.Appearance.Options.UseFont = true;
this.txt_Number.Properties.ReadOnly = true;
this.txt_Number.Size = new System.Drawing.Size(368, 26);
this.txt_Number.Size = new System.Drawing.Size(357, 26);
this.txt_Number.StyleController = this.layoutControl2;
this.txt_Number.TabIndex = 5;
//
// txt_Rev
//
this.txt_Rev.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.txt_Rev.Location = new System.Drawing.Point(67, 99);
this.txt_Rev.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Rev.Location = new System.Drawing.Point(72, 97);
this.txt_Rev.Margin = new System.Windows.Forms.Padding(2);
this.txt_Rev.Name = "txt_Rev";
this.txt_Rev.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Rev.Properties.Appearance.Options.UseFont = true;
this.txt_Rev.Properties.ReadOnly = true;
this.txt_Rev.Size = new System.Drawing.Size(368, 26);
this.txt_Rev.Size = new System.Drawing.Size(357, 26);
this.txt_Rev.StyleController = this.layoutControl2;
this.txt_Rev.TabIndex = 4;
//
@ -284,17 +284,17 @@
rowDefinition1,
rowDefinition2,
rowDefinition3});
this.layoutControlGroup1.Size = new System.Drawing.Size(445, 141);
this.layoutControlGroup1.Size = new System.Drawing.Size(441, 141);
this.layoutControlGroup1.TextVisible = false;
//
// 文档编号
//
this..ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this..Control = this.txt_Number;
this..Location = new System.Drawing.Point(0, 41);
this..Location = new System.Drawing.Point(0, 40);
this..Name = "文档编号";
this..OptionsTableLayoutItem.RowIndex = 1;
this..Size = new System.Drawing.Size(429, 42);
this..Size = new System.Drawing.Size(421, 40);
this..TextSize = new System.Drawing.Size(48, 15);
//
// 文档名称
@ -303,17 +303,17 @@
this..Control = this.txt_FormName;
this..Location = new System.Drawing.Point(0, 0);
this..Name = "文档名称";
this..Size = new System.Drawing.Size(429, 41);
this..Size = new System.Drawing.Size(421, 40);
this..TextSize = new System.Drawing.Size(48, 15);
//
// 版本
//
this..ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this..Control = this.txt_Rev;
this..Location = new System.Drawing.Point(0, 83);
this..Location = new System.Drawing.Point(0, 80);
this..Name = "版本";
this..OptionsTableLayoutItem.RowIndex = 2;
this..Size = new System.Drawing.Size(429, 42);
this..Size = new System.Drawing.Size(421, 41);
this..TextSize = new System.Drawing.Size(48, 15);
//
// 说明
@ -323,19 +323,19 @@
this..Location = new System.Drawing.Point(0, 251);
this..Name = "说明";
this..OptionsTableLayoutItem.RowIndex = 3;
this..Size = new System.Drawing.Size(457, 42);
this..Size = new System.Drawing.Size(453, 42);
this..TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this..TextSize = new System.Drawing.Size(96, 15);
this..TextToControlDistance = 5;
//
// txt_Remark
//
this.txt_Remark.Location = new System.Drawing.Point(111, 267);
this.txt_Remark.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Remark.Location = new System.Drawing.Point(113, 269);
this.txt_Remark.Margin = new System.Windows.Forms.Padding(2);
this.txt_Remark.Name = "txt_Remark";
this.txt_Remark.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Remark.Properties.Appearance.Options.UseFont = true;
this.txt_Remark.Size = new System.Drawing.Size(352, 26);
this.txt_Remark.Size = new System.Drawing.Size(348, 26);
this.txt_Remark.StyleController = this.layoutControl1;
this.txt_Remark.TabIndex = 7;
//
@ -348,7 +348,7 @@
this.layoutControl1.Controls.Add(this.radioGroup1);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.layoutControl1.Margin = new System.Windows.Forms.Padding(2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(939, 128, 812, 500);
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
@ -365,32 +365,33 @@
//
// txt_FilePath
//
this.txt_FilePath.Location = new System.Drawing.Point(111, 225);
this.txt_FilePath.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_FilePath.Location = new System.Drawing.Point(113, 227);
this.txt_FilePath.Margin = new System.Windows.Forms.Padding(2);
this.txt_FilePath.Name = "txt_FilePath";
this.txt_FilePath.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_FilePath.Properties.Appearance.Options.UseFont = true;
this.txt_FilePath.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txt_FilePath.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.txt_FilePath.Size = new System.Drawing.Size(352, 26);
this.txt_FilePath.Size = new System.Drawing.Size(348, 26);
this.txt_FilePath.StyleController = this.layoutControl1;
this.txt_FilePath.TabIndex = 6;
this.txt_FilePath.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.txt_FilePath_ButtonClick);
//
// radioGroup1
//
this.radioGroup1.EditValue = 1;
this.radioGroup1.Location = new System.Drawing.Point(111, 177);
this.radioGroup1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioGroup1.EditValue = "FM-P0047.03";
this.radioGroup1.Location = new System.Drawing.Point(113, 179);
this.radioGroup1.Margin = new System.Windows.Forms.Padding(2);
this.radioGroup1.Name = "radioGroup1";
this.radioGroup1.Properties.GlyphAlignment = DevExpress.Utils.HorzAlignment.Default;
this.radioGroup1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
new DevExpress.XtraEditors.Controls.RadioGroupItem("FM-P0047.03", "FM-P0047.03"),
new DevExpress.XtraEditors.Controls.RadioGroupItem("FM-P0079.02", "FM-P0079.02")});
this.radioGroup1.Size = new System.Drawing.Size(352, 38);
this.radioGroup1.Size = new System.Drawing.Size(348, 38);
this.radioGroup1.StyleController = this.layoutControl1;
this.radioGroup1.TabIndex = 8;
this.radioGroup1.SelectedIndexChanged += new System.EventHandler(this.radioGroup1_SelectedIndexChanged);
//
// 文件路径
//
@ -399,7 +400,7 @@
this..Location = new System.Drawing.Point(0, 209);
this..Name = "文件路径";
this..OptionsTableLayoutItem.RowIndex = 2;
this..Size = new System.Drawing.Size(457, 42);
this..Size = new System.Drawing.Size(453, 42);
this..TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this..TextSize = new System.Drawing.Size(96, 15);
this..TextToControlDistance = 5;
@ -410,7 +411,7 @@
this.layoutControlItem3.Location = new System.Drawing.Point(0, 167);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem3.Size = new System.Drawing.Size(457, 42);
this.layoutControlItem3.Size = new System.Drawing.Size(453, 42);
this.layoutControlItem3.Text = "文件版本";
this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 15);
@ -433,7 +434,7 @@
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.IconOptions.Image = global::DeviceRepairAndOptimization.Properties.Resources.edit_16x16;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "Page_FormVersionAdd";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Page_FormVersionAdd";

View File

@ -151,6 +151,9 @@ namespace DeviceRepairAndOptimization.Pages.FormVersion
private void txt_FilePath_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
string FilePath = string.Empty;
if (xtraOpenFileDialog1.ShowDialog() == DialogResult.OK)
{
// 将选择的文件路径显示在 ButtonEdit 控件中
@ -316,7 +319,7 @@ namespace DeviceRepairAndOptimization.Pages.FormVersion
throw new Exception("操作失败,点检表版本与选定的版本不一致!");
}
maintenance.VersionRev = patternToRemoveString(os[1], "Rev版本:(\\s).?").Trim();
maintenance.VersionRev = patternToRemoveString(os[1], "Rev版本:(\\s{0,})").Trim();
}
else
{
@ -337,5 +340,15 @@ namespace DeviceRepairAndOptimization.Pages.FormVersion
{
return Regex.Replace(inputText, patternToRemove, string.Empty);
}
private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e)
{
subData = null;
txt_FormName.Text = "";
txt_Number.Text = "";
txt_Rev.Text = "";
txt_Remark.Text = "";
txt_FilePath.Text = "";
}
}
}

View File

@ -30,27 +30,27 @@ namespace DeviceRepairAndOptimization.Pages
private void InitializeComponent()
{
System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions9 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject33 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject34 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject35 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject36 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions10 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject37 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject38 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject39 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject40 = new DevExpress.Utils.SerializableAppearanceObject();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions11 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject41 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject42 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject43 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject44 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.Layout.StackPanel stackPanel1;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(page_FormVersion));
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
@ -234,13 +234,13 @@ namespace DeviceRepairAndOptimization.Pages
// Operations
//
this.Operations.AutoHeight = false;
editorButtonImageOptions1.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
editorButtonImageOptions2.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
editorButtonImageOptions3.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
editorButtonImageOptions4.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
editorButtonImageOptions9.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
editorButtonImageOptions10.Location = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
this.Operations.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "编辑", 30, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default),
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "禁用 / 启用", 80, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default),
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绑定到设备", 100, true, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "编辑", 30, true, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default),
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "禁用 / 启用", 80, true, true, false, editorButtonImageOptions9, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject33, serializableAppearanceObject34, serializableAppearanceObject35, serializableAppearanceObject36, "", null, null, DevExpress.Utils.ToolTipAnchor.Default),
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绑定到设备", 100, true, true, false, editorButtonImageOptions10, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject37, serializableAppearanceObject38, serializableAppearanceObject39, serializableAppearanceObject40, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
this.Operations.Name = "Operations";
this.Operations.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
//
@ -272,9 +272,9 @@ namespace DeviceRepairAndOptimization.Pages
this.EditSearch.Properties.Appearance.Font = new System.Drawing.Font("Verdana", 10F);
this.EditSearch.Properties.Appearance.Options.UseFont = true;
this.EditSearch.Properties.AutoHeight = false;
editorButtonImageOptions4.SvgImageSize = new System.Drawing.Size(16, 16);
editorButtonImageOptions11.SvgImageSize = new System.Drawing.Size(16, 16);
this.EditSearch.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions11, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject41, serializableAppearanceObject42, serializableAppearanceObject43, serializableAppearanceObject44, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
this.EditSearch.Properties.NullValuePrompt = "输入文档名称/编号/说明 查询";
this.EditSearch.Size = new System.Drawing.Size(320, 26);
this.EditSearch.TabIndex = 5;

View File

@ -55,6 +55,10 @@ namespace DeviceRepairAndOptimization.Pages
if (apiResponseData.Code == 1)
{
Datas = JsonConvert.DeserializeObject<List<MaintenanceFormVersionInfo>>(apiResponseData.Data + "");
// 设置行号列宽度
SizeF size = this.CreateGraphics().MeasureString(Datas.Count.ToString(), this.Font);
gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 20;
}
}
catch (Exception ex)

View File

@ -129,6 +129,9 @@
<metadata name="stackPanel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="EditSearch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btn_Add.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -0,0 +1,507 @@

namespace DeviceRepairAndOptimization.Pages.Log
{
partial class page_UserLoginLog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(page_UserLoginLog));
DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition();
this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.btn_Query = new DevExpress.XtraEditors.SimpleButton();
this.txt_ClientName = new DevExpress.XtraEditors.TextEdit();
this.cbContentType = new DevExpress.XtraEditors.ComboBoxEdit();
this.txtUserCode = new DevExpress.XtraEditors.TextEdit();
this.dtEnd = new DevExpress.XtraEditors.TimeEdit();
this.dtStart = new DevExpress.XtraEditors.TimeEdit();
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlitemLabel1 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gcLoginCode = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcRealName = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcOperationType = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcOperationDate = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcOperationIP = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcOperationComputer = new DevExpress.XtraGrid.Columns.GridColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit();
this.splitContainerControl1.Panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit();
this.splitContainerControl1.Panel2.SuspendLayout();
this.splitContainerControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txt_ClientName.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbContentType.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtUserCode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlitemLabel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
this.SuspendLayout();
//
// splitContainerControl1
//
this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerControl1.Horizontal = false;
this.splitContainerControl1.Location = new System.Drawing.Point(0, 0);
this.splitContainerControl1.Name = "splitContainerControl1";
//
// splitContainerControl1.Panel1
//
this.splitContainerControl1.Panel1.Controls.Add(this.layoutControl1);
this.splitContainerControl1.Panel1.Text = "Panel1";
//
// splitContainerControl1.Panel2
//
this.splitContainerControl1.Panel2.Controls.Add(this.gridControl1);
this.splitContainerControl1.Panel2.Text = "Panel2";
this.splitContainerControl1.Size = new System.Drawing.Size(1598, 999);
this.splitContainerControl1.SplitterPosition = 146;
this.splitContainerControl1.TabIndex = 0;
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.simpleButton1);
this.layoutControl1.Controls.Add(this.btn_Query);
this.layoutControl1.Controls.Add(this.txt_ClientName);
this.layoutControl1.Controls.Add(this.cbContentType);
this.layoutControl1.Controls.Add(this.txtUserCode);
this.layoutControl1.Controls.Add(this.dtEnd);
this.layoutControl1.Controls.Add(this.dtStart);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.Options.UseBackColor = true;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.Options.UseFont = true;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.Options.UseTextOptions = true;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControl1.Root = this.Root;
this.layoutControl1.Size = new System.Drawing.Size(1598, 146);
this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1";
//
// simpleButton1
//
this.simpleButton1.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("simpleButton1.ImageOptions.Image")));
this.simpleButton1.Location = new System.Drawing.Point(1450, 54);
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.Size = new System.Drawing.Size(136, 36);
this.simpleButton1.StyleController = this.layoutControl1;
this.simpleButton1.TabIndex = 10;
this.simpleButton1.Text = "导出";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// btn_Query
//
this.btn_Query.Appearance.Font = new System.Drawing.Font("Tahoma", 12F);
this.btn_Query.Appearance.Options.UseFont = true;
this.btn_Query.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btn_Query.ImageOptions.SvgImage")));
this.btn_Query.Location = new System.Drawing.Point(1450, 12);
this.btn_Query.Name = "btn_Query";
this.btn_Query.Size = new System.Drawing.Size(136, 36);
this.btn_Query.StyleController = this.layoutControl1;
this.btn_Query.TabIndex = 9;
this.btn_Query.Text = "查询";
this.btn_Query.Click += new System.EventHandler(this.btn_Query_Click);
//
// txt_ClientName
//
this.txt_ClientName.Location = new System.Drawing.Point(120, 102);
this.txt_ClientName.Name = "txt_ClientName";
this.txt_ClientName.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F);
this.txt_ClientName.Properties.Appearance.Options.UseFont = true;
this.txt_ClientName.Properties.MaxLength = 200;
this.txt_ClientName.Size = new System.Drawing.Size(607, 26);
this.txt_ClientName.StyleController = this.layoutControl1;
this.txt_ClientName.TabIndex = 8;
//
// cbContentType
//
this.cbContentType.EditValue = "全部";
this.cbContentType.Location = new System.Drawing.Point(839, 60);
this.cbContentType.Name = "cbContentType";
this.cbContentType.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F);
this.cbContentType.Properties.Appearance.Options.UseFont = true;
this.cbContentType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cbContentType.Properties.Items.AddRange(new object[] {
"全部",
"登录",
"登出"});
this.cbContentType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.cbContentType.Size = new System.Drawing.Size(607, 26);
this.cbContentType.StyleController = this.layoutControl1;
this.cbContentType.TabIndex = 7;
//
// txtUserCode
//
this.txtUserCode.Location = new System.Drawing.Point(120, 60);
this.txtUserCode.Name = "txtUserCode";
this.txtUserCode.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F);
this.txtUserCode.Properties.Appearance.Options.UseFont = true;
this.txtUserCode.Properties.MaxLength = 50;
this.txtUserCode.Size = new System.Drawing.Size(607, 26);
this.txtUserCode.StyleController = this.layoutControl1;
this.txtUserCode.TabIndex = 6;
//
// dtEnd
//
this.dtEnd.EditValue = null;
this.dtEnd.Location = new System.Drawing.Point(839, 18);
this.dtEnd.Name = "dtEnd";
this.dtEnd.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dtEnd.Properties.Appearance.Options.UseFont = true;
this.dtEnd.Properties.BeepOnError = false;
this.dtEnd.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dtEnd.Properties.DisplayFormat.FormatString = "G";
this.dtEnd.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dtEnd.Properties.EditFormat.FormatString = "G";
this.dtEnd.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dtEnd.Properties.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.Default;
this.dtEnd.Properties.MaskSettings.Set("mask", "G");
this.dtEnd.Properties.TimeEditStyle = DevExpress.XtraEditors.Repository.TimeEditStyle.TouchUI;
this.dtEnd.Size = new System.Drawing.Size(607, 26);
this.dtEnd.StyleController = this.layoutControl1;
this.dtEnd.TabIndex = 5;
//
// dtStart
//
this.dtStart.EditValue = null;
this.dtStart.Location = new System.Drawing.Point(120, 18);
this.dtStart.Name = "dtStart";
this.dtStart.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dtStart.Properties.Appearance.Options.UseFont = true;
this.dtStart.Properties.BeepOnError = false;
this.dtStart.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dtStart.Properties.DisplayFormat.FormatString = "G";
this.dtStart.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dtStart.Properties.EditFormat.FormatString = "G";
this.dtStart.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dtStart.Properties.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.Default;
this.dtStart.Properties.MaskSettings.Set("mask", "G");
this.dtStart.Properties.TimeEditStyle = DevExpress.XtraEditors.Repository.TimeEditStyle.TouchUI;
this.dtStart.Size = new System.Drawing.Size(607, 26);
this.dtStart.StyleController = this.layoutControl1;
this.dtStart.TabIndex = 4;
//
// Root
//
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.Root.GroupBordersVisible = false;
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.layoutControlitemLabel1,
this.layoutControlItem2,
this.layoutControlItem3,
this.layoutControlItem4,
this.layoutControlItem5,
this.layoutControlItem6});
this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.Root.Name = "Root";
columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition1.Width = 40D;
columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition2.Width = 40D;
columnDefinition3.SizeType = System.Windows.Forms.SizeType.Absolute;
columnDefinition3.Width = 140D;
this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
columnDefinition1,
columnDefinition2,
columnDefinition3});
rowDefinition1.Height = 100D;
rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
rowDefinition2.Height = 100D;
rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
rowDefinition3.Height = 100D;
rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
rowDefinition1,
rowDefinition2,
rowDefinition3});
this.Root.Size = new System.Drawing.Size(1598, 146);
this.Root.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 12F);
this.layoutControlItem1.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem1.Control = this.dtEnd;
this.layoutControlItem1.Location = new System.Drawing.Point(719, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.OptionsTableLayoutItem.ColumnIndex = 1;
this.layoutControlItem1.Size = new System.Drawing.Size(719, 42);
this.layoutControlItem1.Text = "截至时间:";
this.layoutControlItem1.TextSize = new System.Drawing.Size(96, 19);
//
// layoutControlitemLabel1
//
this.layoutControlitemLabel1.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 12F);
this.layoutControlitemLabel1.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlitemLabel1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlitemLabel1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlitemLabel1.Control = this.dtStart;
this.layoutControlitemLabel1.Location = new System.Drawing.Point(0, 0);
this.layoutControlitemLabel1.Name = "layoutControlitemLabel1";
this.layoutControlitemLabel1.Size = new System.Drawing.Size(719, 42);
this.layoutControlitemLabel1.Text = "开始时间:";
this.layoutControlitemLabel1.TextSize = new System.Drawing.Size(96, 19);
//
// layoutControlItem2
//
this.layoutControlItem2.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 12F);
this.layoutControlItem2.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem2.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem2.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem2.Control = this.txtUserCode;
this.layoutControlItem2.Location = new System.Drawing.Point(0, 42);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem2.Size = new System.Drawing.Size(719, 42);
this.layoutControlItem2.Text = "用户编号:";
this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 19);
//
// layoutControlItem3
//
this.layoutControlItem3.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 12F);
this.layoutControlItem3.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem3.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem3.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem3.Control = this.cbContentType;
this.layoutControlItem3.Location = new System.Drawing.Point(719, 42);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 1;
this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem3.Size = new System.Drawing.Size(719, 42);
this.layoutControlItem3.Text = "类型选择:";
this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 19);
//
// layoutControlItem4
//
this.layoutControlItem4.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 12F);
this.layoutControlItem4.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem4.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem4.Control = this.txt_ClientName;
this.layoutControlItem4.Location = new System.Drawing.Point(0, 84);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.OptionsTableLayoutItem.RowIndex = 2;
this.layoutControlItem4.Size = new System.Drawing.Size(719, 42);
this.layoutControlItem4.Text = "客户端名称:";
this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 19);
//
// layoutControlItem5
//
this.layoutControlItem5.Control = this.btn_Query;
this.layoutControlItem5.Location = new System.Drawing.Point(1438, 0);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.OptionsTableLayoutItem.ColumnIndex = 2;
this.layoutControlItem5.Size = new System.Drawing.Size(140, 42);
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem5.TextVisible = false;
//
// layoutControlItem6
//
this.layoutControlItem6.Control = this.simpleButton1;
this.layoutControlItem6.Location = new System.Drawing.Point(1438, 42);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.OptionsTableLayoutItem.ColumnIndex = 2;
this.layoutControlItem6.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem6.Size = new System.Drawing.Size(140, 42);
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem6.TextVisible = false;
//
// gridControl1
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.Font = new System.Drawing.Font("Tahoma", 12F);
this.gridControl1.Location = new System.Drawing.Point(0, 0);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Name = "gridControl1";
this.gridControl1.Size = new System.Drawing.Size(1598, 843);
this.gridControl1.TabIndex = 0;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
//
// gridView1
//
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gcLoginCode,
this.gcRealName,
this.gcOperationType,
this.gcOperationDate,
this.gcOperationIP,
this.gcOperationComputer});
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsView.ColumnAutoWidth = false;
this.gridView1.OptionsView.RowAutoHeight = true;
this.gridView1.OptionsView.ShowFooter = true;
this.gridView1.OptionsView.ShowGroupPanel = false;
//
// gcLoginCode
//
this.gcLoginCode.Caption = "用户账号";
this.gcLoginCode.FieldName = "LoginCode";
this.gcLoginCode.Name = "gcLoginCode";
this.gcLoginCode.Visible = true;
this.gcLoginCode.VisibleIndex = 0;
//
// gcRealName
//
this.gcRealName.Caption = "用户名称";
this.gcRealName.FieldName = "RealName";
this.gcRealName.Name = "gcRealName";
this.gcRealName.Visible = true;
this.gcRealName.VisibleIndex = 1;
//
// gcOperationType
//
this.gcOperationType.Caption = "类型";
this.gcOperationType.FieldName = "OperationType";
this.gcOperationType.Name = "gcOperationType";
this.gcOperationType.Visible = true;
this.gcOperationType.VisibleIndex = 2;
//
// gcOperationDate
//
this.gcOperationDate.Caption = "时间";
this.gcOperationDate.FieldName = "OperationDate";
this.gcOperationDate.Name = "gcOperationDate";
this.gcOperationDate.Visible = true;
this.gcOperationDate.VisibleIndex = 3;
//
// gcOperationIP
//
this.gcOperationIP.Caption = "客户端IP";
this.gcOperationIP.FieldName = "OperationIP";
this.gcOperationIP.Name = "gcOperationIP";
this.gcOperationIP.Visible = true;
this.gcOperationIP.VisibleIndex = 4;
//
// gcOperationComputer
//
this.gcOperationComputer.Caption = "客户端";
this.gcOperationComputer.FieldName = "OperationComputer";
this.gcOperationComputer.Name = "gcOperationComputer";
this.gcOperationComputer.Visible = true;
this.gcOperationComputer.VisibleIndex = 5;
//
// page_UserLoginLog
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1598, 999);
this.Controls.Add(this.splitContainerControl1);
this.Font = new System.Drawing.Font("宋体", 11.2F);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "page_UserLoginLog";
this.Text = "page_UserLoginLog";
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit();
this.splitContainerControl1.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit();
this.splitContainerControl1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit();
this.splitContainerControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txt_ClientName.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbContentType.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtUserCode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlitemLabel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup Root;
private DevExpress.XtraEditors.TimeEdit dtStart;
private DevExpress.XtraEditors.TimeEdit dtEnd;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlitemLabel1;
private DevExpress.XtraEditors.ComboBoxEdit cbContentType;
private DevExpress.XtraEditors.TextEdit txtUserCode;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
private DevExpress.XtraEditors.TextEdit txt_ClientName;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraEditors.SimpleButton btn_Query;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraEditors.SimpleButton simpleButton1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraGrid.GridControl gridControl1;
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
private DevExpress.XtraGrid.Columns.GridColumn gcLoginCode;
private DevExpress.XtraGrid.Columns.GridColumn gcRealName;
private DevExpress.XtraGrid.Columns.GridColumn gcOperationType;
private DevExpress.XtraGrid.Columns.GridColumn gcOperationDate;
private DevExpress.XtraGrid.Columns.GridColumn gcOperationIP;
private DevExpress.XtraGrid.Columns.GridColumn gcOperationComputer;
}
}

View File

@ -0,0 +1,145 @@
using DeviceRepair.Models;
using DeviceRepair.Models.History;
using DeviceRepair.Models.Logs;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace DeviceRepairAndOptimization.Pages.Log
{
public partial class page_UserLoginLog : FormBase
{
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartDate
{
get
{
if (dtStart.EditValue == null)
dtStart.EditValue = DateTime.Today.AddMonths(-1);
return Convert.ToDateTime(dtStart.EditValue);
}
}
/// <summary>
/// 截至时间
/// </summary>
public DateTime EndDate
{
get
{
if (dtEnd.EditValue == null)
dtEnd.EditValue = DateTime.Today.AddDays(1).AddMilliseconds(-1);
return Convert.ToDateTime(dtEnd.EditValue);
}
}
/// <summary>
/// 用户编号
/// </summary>
public string UserCode
{
get
{
return (txtUserCode.EditValue + "").Trim();
}
}
/// <summary>
/// 操作类型
/// </summary>
public string ContentType
{
get
{
if (cbContentType.EditValue + "" == "全部")
return "";
return cbContentType.EditValue + "";
}
}
/// <summary>
/// 客户端名称
/// </summary>
public string ClientName
{
get
{
return (txt_ClientName.EditValue + "").Trim();
}
}
public OperationFilterModel operationFilterModel
{
get
{
return new OperationFilterModel
{
sDate = StartDate,
eDate = EndDate,
LoginCode = UserCode,
OperationType = ContentType,
ClientName = ClientName
};
}
}
public page_UserLoginLog()
{
InitializeComponent();
}
private void btn_Query_Click(object sender, EventArgs e)
{
try
{
APIResponseData result = OperationManager.Instance.UserLoginContent(operationFilterModel);
if (result.Code == -1)
{
XtraMessageBoxHelper.Error(result.Message);
return;
}
List<UserLogin> Datas = result.ToDeserializeObject<List<UserLogin>>();
gridControl1.DataSource = Datas;
// 设置行号列宽度
SizeF size = this.CreateGraphics().MeasureString(Datas.Count.ToString(), this.Font);
gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 20;
}
catch (Exception ex)
{
XtraMessageBoxHelper.Error(ex.Message);
}
}
private void simpleButton1_Click(object sender, EventArgs e)
{
try
{
if (gridView1.DataRowCount == 0)
{
throw new Exception("当前没有数据可供操作!");
}
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Title = "导出Excel";
saveFileDialog.Filter = "Excel文件(*.xlsx)|*.xlsx";
DialogResult dialogResult = saveFileDialog.ShowDialog(this);
if (dialogResult == DialogResult.OK)
{
DevExpress.XtraPrinting.XlsxExportOptionsEx options = new DevExpress.XtraPrinting.XlsxExportOptionsEx();
options.ExportType = DevExpress.Export.ExportType.WYSIWYG;
gridControl1.ExportToXlsx(saveFileDialog.FileName.ToString(), options);
XtraMessageBoxHelper.Info("导出成功!");
}
}
catch (Exception ex)
{
XtraMessageBoxHelper.Error(ex.Message);
}
}
}
}

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="simpleButton1.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
RU5ErkJggg==
</value>
</data>
<assembly alias="DevExpress.Data.v20.2" name="DevExpress.Data.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="btn_Query.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v20.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIwLjIsIFZlcnNpb249MjAuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACoDAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku
WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4
N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk
aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTI5LjcsMjcuM0wy
MiwxOS42bC0wLjEtMC4xYzEuMy0xLjgsMi4xLTQuMSwyLjEtNi41YzAtNi4xLTQuOS0xMS0xMS0xMVMy
LDYuOSwyLDEzczQuOSwxMSwxMSwxMSAgYzIuNCwwLDQuNy0wLjgsNi41LTIuMWMwLDAsMCwwLjEsMC4x
LDAuMWw3LjcsNy43YzAuMywwLjMsMC45LDAuMywxLjIsMGwxLjItMS4yQzMwLjEsMjguMiwzMC4xLDI3
LjYsMjkuNywyNy4zeiBNNCwxM2MwLTUsNC05LDktOSAgczksNCw5LDlzLTQsOS05LDlTNCwxOCw0LDEz
eiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw==
</value>
</data>
</root>

View File

@ -81,6 +81,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
this.splashScreenManager1 = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::DeviceRepairAndOptimization.frmWaiting), true, true);
this.dxValidationProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXValidationProvider(this.components);
this.dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
((System.ComponentModel.ISupportInitialize)(this.toolbarFormControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.toolbarFormManager1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.de_EndDate.Properties.CalendarTimeProperties)).BeginInit();
@ -113,6 +114,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dxValidationProvider1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit();
this.SuspendLayout();
//
// toolbarFormControl1
@ -666,6 +668,10 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
//
this.splashScreenManager1.ClosingDelay = 500;
//
// dxErrorProvider1
//
this.dxErrorProvider1.ContainerControl = this;
//
// pageMaintainEdit
//
this.Appearance.Options.UseFont = true;
@ -720,6 +726,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dxValidationProvider1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -763,5 +770,6 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
private DevExpress.XtraEditors.DXErrorProvider.DXValidationProvider dxValidationProvider1;
private DevExpress.XtraEditors.RadioGroup ckbIsDown;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1;
}
}

View File

@ -258,7 +258,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
/// <param name="e"></param>
private void btn_AccessoriesEdit_Click(object sender, EventArgs e)
{
using (dlgAccessoriesEdit dlg = new dlgAccessoriesEdit(CurrentRequestForm?.MaintaionItems?.AccessoriesItems))
using (dlgAccessoriesEdit dlg = new dlgAccessoriesEdit(Accessories))
{
if (dlg.ShowDialog() == DialogResult.OK)
{
@ -345,6 +345,33 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
throw new Exception($"修理结束时间在修理开始时间之后!");
}
// 故障原因
if (string.IsNullOrWhiteSpace(MaintainCause))
{
dxErrorProvider1.SetError(txtCause, $"字段:故障原因 不能为空");
return;
}
// 维修内容
if (string.IsNullOrWhiteSpace(MaintainContent))
{
dxErrorProvider1.SetError(txtContent, $"字段:维修内容 不能为空");
return;
}
// 理由 | 验证编码
if (NeedValidate && string.IsNullOrWhiteSpace(ValidateNo))
{
dxErrorProvider1.SetError(txtNo, $"字段:验证编码 不能为空");
return;
}
else if (!NeedValidate && string.IsNullOrWhiteSpace(MaintaionReason))
{
dxErrorProvider1.SetError(txtReason, $"字段:理由 不能为空");
return;
}
DeviceWarrantyRequestMaintaionView Entity = new DeviceWarrantyRequestMaintaionView
{
AccessoriesItems = Accessories,

View File

@ -257,4 +257,7 @@
<metadata name="dxValidationProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>391, 17</value>
</metadata>
<metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>573, 17</value>
</metadata>
</root>

View File

@ -129,10 +129,10 @@
stackPanel1.Controls.Add(this.de_StartDate);
stackPanel1.Controls.Add(this.labelControl36);
stackPanel1.Controls.Add(this.de_EndDate);
stackPanel1.Location = new System.Drawing.Point(108, 34);
stackPanel1.Location = new System.Drawing.Point(129, 34);
stackPanel1.Margin = new System.Windows.Forms.Padding(0);
stackPanel1.Name = "stackPanel1";
stackPanel1.Size = new System.Drawing.Size(525, 29);
stackPanel1.Size = new System.Drawing.Size(504, 29);
stackPanel1.TabIndex = 5;
//
// de_StartDate
@ -277,6 +277,7 @@
//
this.barBtn_ExportWord.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
this.barBtn_ExportWord.Caption = "导出Word";
this.barBtn_ExportWord.Enabled = false;
this.barBtn_ExportWord.Id = 0;
this.barBtn_ExportWord.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barBtn_ExportWord.ImageOptions.Image")));
this.barBtn_ExportWord.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barBtn_ExportWord.ImageOptions.LargeImage")));
@ -289,6 +290,7 @@
//
this.barBtn_Print.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
this.barBtn_Print.Caption = "打印";
this.barBtn_Print.Enabled = false;
this.barBtn_Print.Id = 1;
this.barBtn_Print.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barBtn_Print.ImageOptions.Image")));
this.barBtn_Print.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barBtn_Print.ImageOptions.LargeImage")));
@ -301,8 +303,8 @@
this.barBtnExcel.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
this.barBtnExcel.Caption = "导出Excel";
this.barBtnExcel.Id = 2;
this.barBtnExcel.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem3.ImageOptions.Image")));
this.barBtnExcel.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem3.ImageOptions.LargeImage")));
this.barBtnExcel.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barBtnExcel.ImageOptions.Image")));
this.barBtnExcel.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barBtnExcel.ImageOptions.LargeImage")));
this.barBtnExcel.Name = "barBtnExcel";
this.barBtnExcel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
this.barBtnExcel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnExcel_ItemClick);
@ -344,7 +346,7 @@
//
// cbbIsDown
//
this.cbbIsDown.Location = new System.Drawing.Point(733, 3);
this.cbbIsDown.Location = new System.Drawing.Point(754, 3);
this.cbbIsDown.MenuManager = this.barManager1;
this.cbbIsDown.Name = "cbbIsDown";
this.cbbIsDown.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
@ -353,7 +355,7 @@
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cbbIsDown.Properties.DropDownRows = 3;
this.cbbIsDown.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.cbbIsDown.Size = new System.Drawing.Size(454, 26);
this.cbbIsDown.Size = new System.Drawing.Size(433, 26);
this.cbbIsDown.StyleController = this.layoutControl5;
this.cbbIsDown.TabIndex = 9;
//
@ -436,18 +438,18 @@
//
// txt_DeviceID
//
this.txt_DeviceID.Location = new System.Drawing.Point(108, 2);
this.txt_DeviceID.Location = new System.Drawing.Point(129, 2);
this.txt_DeviceID.MenuManager = this.barManager1;
this.txt_DeviceID.Name = "txt_DeviceID";
this.txt_DeviceID.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
this.txt_DeviceID.Properties.Appearance.Options.UseFont = true;
this.txt_DeviceID.Size = new System.Drawing.Size(525, 26);
this.txt_DeviceID.Size = new System.Drawing.Size(504, 26);
this.txt_DeviceID.StyleController = this.layoutControl5;
this.txt_DeviceID.TabIndex = 8;
//
// cb_Status
//
this.cb_Status.Location = new System.Drawing.Point(733, 34);
this.cb_Status.Location = new System.Drawing.Point(754, 34);
this.cb_Status.MenuManager = this.barManager1;
this.cb_Status.Name = "cb_Status";
this.cb_Status.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
@ -459,7 +461,7 @@
this.cb_Status.Properties.DropDownRows = 4;
this.cb_Status.Properties.NullText = "";
this.cb_Status.Properties.PopupSizeable = false;
this.cb_Status.Size = new System.Drawing.Size(454, 26);
this.cb_Status.Size = new System.Drawing.Size(433, 26);
this.cb_Status.StyleController = this.layoutControl5;
this.cb_Status.TabIndex = 6;
//
@ -520,7 +522,7 @@
this.layoutControlItem43.Size = new System.Drawing.Size(554, 33);
this.layoutControlItem43.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem43.Text = "维修单状态:";
this.layoutControlItem43.TextSize = new System.Drawing.Size(84, 15);
this.layoutControlItem43.TextSize = new System.Drawing.Size(105, 20);
//
// layoutControlItem42
//
@ -533,7 +535,7 @@
this.layoutControlItem42.Size = new System.Drawing.Size(625, 33);
this.layoutControlItem42.Text = "申请时间:";
this.layoutControlItem42.TextLocation = DevExpress.Utils.Locations.Left;
this.layoutControlItem42.TextSize = new System.Drawing.Size(84, 15);
this.layoutControlItem42.TextSize = new System.Drawing.Size(105, 20);
//
// layoutControlItem2
//
@ -544,7 +546,7 @@
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(625, 32);
this.layoutControlItem2.Text = "设备编号:";
this.layoutControlItem2.TextSize = new System.Drawing.Size(84, 15);
this.layoutControlItem2.TextSize = new System.Drawing.Size(105, 20);
//
// layoutControlItem3
//
@ -558,7 +560,7 @@
this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 1;
this.layoutControlItem3.Size = new System.Drawing.Size(554, 32);
this.layoutControlItem3.Text = "设备停机状态:";
this.layoutControlItem3.TextSize = new System.Drawing.Size(84, 15);
this.layoutControlItem3.TextSize = new System.Drawing.Size(105, 20);
//
// splitContainerControl1
//
@ -616,6 +618,7 @@
this.gridView1.RowCellClick += new DevExpress.XtraGrid.Views.Grid.RowCellClickEventHandler(this.gridView1_RowCellClick);
this.gridView1.CustomDrawColumnHeader += new DevExpress.XtraGrid.Views.Grid.ColumnHeaderCustomDrawEventHandler(this.gridView1_CustomDrawColumnHeader);
this.gridView1.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(this.gridView1_CustomDrawRowIndicator);
this.gridView1.SelectionChanged += new DevExpress.Data.SelectionChangedEventHandler(this.gridView1_SelectionChanged);
this.gridView1.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(this.gridView1_FocusedRowChanged);
//
// gcAutoID

View File

@ -1,16 +1,17 @@
using DevExpress.XtraBars.ToolbarForm;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Grid;
using DeviceRepair.Models;
using DeviceRepair.Models.Common;
using DeviceRepair.Models.DeviceRepair.ExportView;
using DeviceRepair.Utils;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
@ -195,13 +196,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
}
}
SizeF size = this.CreateGraphics().MeasureString((DataSource.Count).ToString(), gridView1.Appearance.ViewCaption.Font);
gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 25;
gridControl1.DataSource = null;
gridControl1.DataSource = DataSource.ToDataTable();
gridView1.BestFitColumns();
//gridView1.BestFitColumns();
splashScreenManager1.TryCloseWait();
}
catch (Exception ex)
@ -216,7 +216,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
/// 行选择模式,且全部只读
/// </summary>
/// <param name="view"></param>
void GridViewInitialize(DevExpress.XtraGrid.Views.Grid.GridView view)
void GridViewInitialize(GridView view)
{
gridView1.OptionsMenu.EnableColumnMenu = false;
@ -268,17 +268,17 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
/// <param name="e"></param>
private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
e.Handled = true;
return;
}
//if (e.Button == MouseButtons.Right)
//{
// e.Handled = true;
// return;
//}
if (e.Column.Caption == "Selection")
{
if (this.m_SelectedCurrentRowIndex == e.RowHandle && this.gridView1.IsRowSelected(e.RowHandle))
this.gridView1.UnselectRow(e.RowHandle);
}
//if (e.Column.Caption == "Selection")
//{
// if (this.m_SelectedCurrentRowIndex == e.RowHandle && this.gridView1.IsRowSelected(e.RowHandle))
// this.gridView1.UnselectRow(e.RowHandle);
//}
}
/// <summary>
@ -338,6 +338,8 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
barBtn_Print.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
barBtn_ExportWord.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
barBtn_Print.Refresh();
barBtn_ExportWord.Refresh();
#region
@ -349,16 +351,16 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
#endregion
#region
if (gridView1.SelectedRowsCount > 0)
{
for (int i = 0; i < this.gridView1.RowCount; i++)
{
if (this.gridView1.IsRowSelected(i) && this.gridView1.FocusedRowHandle.ToString().Equals(i.ToString()) == false)
{
this.gridView1.UnselectRow(i);
}
}
}
//if (gridView1.SelectedRowsCount > 0)
//{
// for (int i = 0; i < this.gridView1.RowCount; i++)
// {
// if (this.gridView1.IsRowSelected(i) && this.gridView1.FocusedRowHandle.ToString().Equals(i.ToString()) == false)
// {
// this.gridView1.UnselectRow(i);
// }
// }
//}
this.gridView1.SelectRow(e.FocusedRowHandle);
#endregion
@ -374,11 +376,26 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
{
if (!WaitIsShowBefore)
splashScreenManager1.CloseWaitForm();
gridView1.FocusedRowChanged += gridView1_FocusedRowChanged;
//gridView1.FocusedRowChanged += gridView1_FocusedRowChanged;
XtraMessageBoxHelper.Error(ex.Message);
}
}
private void gridView1_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
{
GridView view = sender as GridView;
view.BeginSelection();
if (e.Action == CollectionChangeAction.Add && view.GetSelectedRows().Length > 1)
view.ClearSelection();
if (e.Action == CollectionChangeAction.Refresh)
view.SelectRow(view.FocusedRowHandle);
if (e.Action == CollectionChangeAction.Remove & view.GetSelectedRows().Length == 0)
view.SelectRow(view.FocusedRowHandle);
//
view.EndSelection();
}
/// <summary>
/// 查询数据
/// </summary>
@ -641,6 +658,11 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
dr["工程部评估"] = $"{QEItem.Description} - {QEItem.CreatorName}";
}
}
else
{
dr["质量部评估"] = "N/A";
dr["工程部评估"] = "N/A";
}
DateTime FormSubDate = CurrentObjectInfo.CreatOn.Value;
TimeSpan timeDifference = CurrentObjectInfo.MaintaionItems.MaintainEndTime - CurrentObjectInfo.MaintaionItems.MaintainStartTime;
@ -700,81 +722,6 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
return table;
}
/// <summary>
/// 导出Word
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_Export_Click(object sender, EventArgs e)
{
try
{
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_EXPORT"))
{
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
return;
}
using (FolderBrowserDialog folderDialog = new FolderBrowserDialog())
{
folderDialog.Description = "请选择保存文件的路径:";
folderDialog.ShowNewFolderButton = true;
DialogResult result = folderDialog.ShowDialog();
if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderDialog.SelectedPath))
{
string selectedPath = folderDialog.SelectedPath;
if (CurrentObjectInfo == null)
{
throw new Exception("获取对象失败,请重试!");
}
DataTable table = SubassembliesCurrentData();
FastReport.Report report = new FastReport.Report();
var vLabelDir = Path.Combine(Application.StartupPath, "Labels");
//判断文件夹是否存在
if (!Directory.Exists(vLabelDir))
{
throw new Exception("缺少待打印的标签模板目录!");
}
//路径拼接模板文件名
var vFileName = Path.Combine(vLabelDir, "DeviceMaintenance.frx");
//判断模板文件是否存在
if (!File.Exists(vFileName))
{
throw new Exception("缺少待打印的标签模板文件!");
}
report.Load(vFileName);
report.DoublePass = true;
DataSet dsDatas = new DataSet();
dsDatas.Tables.Add(table);
report.RegisterData(dsDatas, "MaintenanceInfo");
string filePath = Path.Combine(selectedPath, ("维修单" + CurrentObjectInfo.AutoID + ".docx"));
if (report.Prepare())
{
FastReport.Export.OoXML.Word2007Export export = new FastReport.Export.OoXML.Word2007Export();
report.MaxPages = 1;
export.CurPage = 1;
report.Export(export, filePath);
}
report.Dispose();
}
}
}
catch (Exception ex)
{
XtraMessageBoxHelper.Error(ex.Message);
}
}
/// <summary>
/// 打印
/// </summary>
@ -793,7 +740,9 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
if (CurrentObjectInfo == null)
{
throw new Exception("获取对象失败,请重试!");
barBtn_Print.Enabled = false;
barBtn_Print.Refresh();
throw new Exception("请选择要打印的维修单!");
}
DataTable table = SubassembliesCurrentData();
@ -853,6 +802,13 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
return;
}
if (CurrentObjectInfo == null)
{
barBtn_ExportWord.Enabled = false;
barBtn_ExportWord.Refresh();
throw new Exception("请选择要导出的维修单!");
}
using (FolderBrowserDialog folderDialog = new FolderBrowserDialog())
{
folderDialog.Description = "请选择保存文件的路径:";
@ -863,12 +819,6 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderDialog.SelectedPath))
{
string selectedPath = folderDialog.SelectedPath;
if (CurrentObjectInfo == null)
{
throw new Exception("获取对象失败,请重试!");
}
DataTable table = SubassembliesCurrentData();
FastReport.Report report = new FastReport.Report();
@ -904,6 +854,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
report.Export(export, filePath);
}
report.Dispose();
XtraMessageBoxHelper.Info($"导出成功!");
}
}
}
@ -940,11 +891,8 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
}
}
}
//typeof(MaintainOrderView).GetProperties()[0].GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false).FirstOrDefault()
//typeof(MaintainOrderView).GetProperties()[0].Name
splashScreenManager1.TryCloseWait();
XtraSaveFileDialog xofd = new XtraSaveFileDialog()
{
Filter = "xlsx file*.xlsx|*.xlsx"
@ -960,15 +908,10 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
byte[] btRtn = Export(dataTable);
//创建一个文件流
using (FileStream fs = new FileStream(xofd.FileName, FileMode.Create))
{
Common.dlgProgressBar view = new Common.dlgProgressBar(btRtn, xofd.FileName);
view.ShowDialog();
//将byte数组写入文件中
fs.Write(btRtn, 0, btRtn.Length);
//所有流类型都要关闭流,否则会出现内存泄露问题
fs.Close();
}
XtraMessageBoxHelper.Info("操作成功!");
}
}
catch (Exception ex)
@ -980,63 +923,100 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
byte[] Export(DataTable dataTable)
{
IWorkbook workbook = new XSSFWorkbook();
string sheetName = string.IsNullOrEmpty(dataTable.TableName) ? "Sheet1" : dataTable.TableName;
ISheet sheet = workbook.CreateSheet(sheetName);
// 创建表头
IRow headerRow = sheet.CreateRow(0);
// 表头样式
#region
ICellStyle style = workbook.CreateCellStyle();
//style.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
//style.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
//style.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
//style.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
style.WrapText = true;//设置换行这个要先设置
style.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;//居中
style.VerticalAlignment = VerticalAlignment.Center;//水平居中
//HSSFPalette palette = new HSSFPalette();
//palette.SetColorAtIndex((short)1, 217, 217, 217);
//var v1 = palette.FindColor(217, 217, 217);
//colorStyle.FillForegroundColor = v1.GetIndex();
style.FillPattern = FillPattern.SolidForeground;
style.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.Grey25Percent.Index;
////设置字体
//IFont font = workbook.CreateFont();
//font.FontHeightInPoints = 10;
//font.FontName = "黑体";
//style.SetFont(font);
#endregion
for (int i = 0; i < dataTable.Columns.Count; i++)
try
{
headerRow.CreateCell(i).SetCellValue(dataTable.Columns[i].ColumnName);
headerRow.GetCell(i).CellStyle = style;
}
IWorkbook workbook = new XSSFWorkbook();
string sheetName = string.IsNullOrEmpty(dataTable.TableName) ? "Sheet1" : dataTable.TableName;
ISheet sheet = workbook.CreateSheet(sheetName);
// 填充数据
for (int i = 0; i < dataTable.Rows.Count; i++)
{
IRow dataRow = sheet.CreateRow(i + 1);
for (int j = 0; j < dataTable.Columns.Count; j++)
// 创建表头
IRow headerRow = sheet.CreateRow(0);
// 表头样式
#region
ICellStyle style = workbook.CreateCellStyle();
style.WrapText = true;//设置换行这个要先设置
style.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;//居中
style.VerticalAlignment = VerticalAlignment.Center;//水平居中
//HSSFPalette palette = new HSSFPalette();
//palette.SetColorAtIndex((short)1, 217, 217, 217);
//var v1 = palette.FindColor(217, 217, 217);
//colorStyle.FillForegroundColor = v1.GetIndex();
style.FillPattern = FillPattern.SolidForeground;
style.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.Grey25Percent.Index;
ICellStyle cellStyle = workbook.CreateCellStyle();
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;//居中
cellStyle.VerticalAlignment = VerticalAlignment.Center;//水平居中
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
////设置字体
//IFont font = workbook.CreateFont();
//font.FontHeightInPoints = 10;
//font.FontName = "黑体";
//style.SetFont(font);
#endregion
for (int i = 0; i < dataTable.Columns.Count; i++)
{
dataRow.CreateCell(j).SetCellValue(dataTable.Rows[i][j].ToString());
headerRow.CreateCell(i).SetCellValue(dataTable.Columns[i].ColumnName);
headerRow.GetCell(i).CellStyle = style;
headerRow.GetCell(i).CellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Medium;
headerRow.GetCell(i).CellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Medium;
headerRow.GetCell(i).CellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Medium;
headerRow.GetCell(i).CellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Medium;
}
// 填充数据
for (int i = 0; i < dataTable.Rows.Count; i++)
{
IRow dataRow = sheet.CreateRow(i + 1);
for (int j = 0; j < dataTable.Columns.Count; j++)
{
dataRow.CreateCell(j).SetCellValue(dataTable.Rows[i][j].ToString());
ICellStyle styleContent = workbook.CreateCellStyle();
styleContent.CloneStyleFrom(cellStyle);
dataRow.GetCell(j).CellStyle = styleContent;
// 第一列
if (j == 0)
dataRow.GetCell(j).CellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Medium;
else if (j == dataTable.Columns.Count - 1)
{
// 最后一列
dataRow.GetCell(j).CellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Medium;
}
if (i == dataTable.Rows.Count - 1)
dataRow.GetCell(j).CellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Medium;
}
}
for (int i = 0; i < dataTable.Columns.Count; i++)
{
sheet.AutoSizeColumn(i);
}
// 转换为byte[]
using (MemoryStream stream = new MemoryStream())
{
workbook.Write(stream);
return stream.ToArray();
}
}
// 转换为byte[]
using (MemoryStream stream = new MemoryStream())
catch (Exception ex)
{
workbook.Write(stream);
return stream.ToArray();
throw new Exception($"生成EXCEL出错{ex.Message}");
}
}
}
}

View File

@ -416,7 +416,7 @@
HfNhGQlLqn4/eNq+jQX/BRbqweZ/Pa0K/+6HvEAAAAAASUVORK5CYII=
</value>
</data>
<data name="barButtonItem3.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="barBtnExcel.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAB90RVh0VGl0
bGUARXhwb3J0O1hzbHQ7RXhwb3J0VG9Yc2x0OxPWe5sAAAJlSURBVDhPXZPLbxJhFMWHZ6s2av3TlEIp
@ -433,7 +433,7 @@
AElFTkSuQmCC
</value>
</data>
<data name="barButtonItem3.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="barBtnExcel.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAB90RVh0VGl0
bGUARXhwb3J0O1hzbHQ7RXhwb3J0VG9Yc2x0OxPWe5sAAAh7SURBVFhHxZd5VJTXGcaHYY2pEpMmPTan

View File

@ -79,7 +79,7 @@
tableLayoutPanel1.RowCount = 2;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Size = new System.Drawing.Size(1854, 916);
tableLayoutPanel1.Size = new System.Drawing.Size(1854, 678);
tableLayoutPanel1.TabIndex = 0;
tableLayoutPanel1.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanel1_Paint);
//
@ -123,9 +123,10 @@
this.tvDevices.OptionsSelection.KeepSelectedOnClick = false;
this.tvDevices.OptionsView.AutoWidth = false;
this.tvDevices.OptionsView.BestFitNodes = DevExpress.XtraTreeList.TreeListBestFitNodes.All;
this.tvDevices.Size = new System.Drawing.Size(1846, 860);
this.tvDevices.Size = new System.Drawing.Size(1846, 622);
this.tvDevices.TabIndex = 13;
this.tvDevices.TreeLevelWidth = 23;
this.tvDevices.CustomColumnDisplayText += new DevExpress.XtraTreeList.CustomColumnDisplayTextEventHandler(this.tvDevices_CustomColumnDisplayText);
//
// colAutoID
//
@ -318,7 +319,7 @@
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(1854, 916);
this.ClientSize = new System.Drawing.Size(1854, 678);
this.Controls.Add(tableLayoutPanel1);
this.Name = "page_DriveTypeTree";
this.Text = "page_DriveTypeTree";

View File

@ -72,5 +72,21 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
XtraMessageBoxHelper.Error(ex.Message);
}
}
private void tvDevices_CustomColumnDisplayText(object sender, DevExpress.XtraTreeList.CustomColumnDisplayTextEventArgs e)
{
if (e.Column.FieldName == "EquipmentStatus")
{
int status;
if (int.TryParse(e.Value + "", out status) && status > 0)
{
e.DisplayText = "启用";
}
else
{
e.DisplayText = "停用";
}
}
}
}
}

View File

@ -6,6 +6,7 @@ using DeviceRepairAndOptimization.Pages.DriveMaintenance;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
@ -103,8 +104,11 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
XtraMessageBox.Show(result.Message, "出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
gridControl1.DataSource = result.Data;
List<View_MaintenanceRecordList> Datas = result.ToDeserializeObject<List<View_MaintenanceRecordList>>();
gridControl1.DataSource = Datas;
// 设置行号列宽度
SizeF size = this.CreateGraphics().MeasureString(Datas.Count.ToString(), this.Font);
gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 20;
}
/// <summary>
@ -128,7 +132,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
return;
}
View_MaintenanceRecordList model = JsonConvert.DeserializeObject<View_MaintenanceRecordList>(gridView1.GetRow(SelectedRows[0]) + "");
View_MaintenanceRecordList model = gridView1.GetRow(SelectedRows[0]) as View_MaintenanceRecordList;
page_MaintenancePdfView view = new page_MaintenancePdfView("详情", new int[] { model.AutoID });
view.ShowDialog();
}
@ -159,7 +163,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
return;
}
View_MaintenanceRecordList model = JsonConvert.DeserializeObject<View_MaintenanceRecordList>(gridView1.GetRow(SelectedRows[0]) + "");
View_MaintenanceRecordList model = gridView1.GetRow(SelectedRows[0]) as View_MaintenanceRecordList;
page_MaintenancePdfView view = new page_MaintenancePdfView("打印", new int[] { model.AutoID }, true);
view.ShowDialog();
}
@ -192,7 +196,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
List<int> ids = new List<int>();
foreach (int item in SelectedRows)
{
View_MaintenanceRecordList model = JsonConvert.DeserializeObject<View_MaintenanceRecordList>(gridView1.GetRow(item) + "");
View_MaintenanceRecordList model = gridView1.GetRow(item) as View_MaintenanceRecordList;
ids.Add(model.AutoID);
}
@ -226,7 +230,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintenance
return;
}
View_MaintenanceRecordList model = JsonConvert.DeserializeObject<View_MaintenanceRecordList>(gridView1.GetRow(SelectedRows[0]) + "");
View_MaintenanceRecordList model = gridView1.GetRow(SelectedRows[0]) as View_MaintenanceRecordList;
APIResponseData apiResponseData = DeviceManager.Instance.GetModelByEquipmentID(model.EquipmentNo);
if (!apiResponseData.IsSuccess)

View File

@ -41,6 +41,31 @@ namespace DeviceRepairAndOptimization.Pages.Plan
// 关闭列头右键菜单
gridView1.OptionsMenu.EnableColumnMenu = false;
BindData();
// 自增长行号
gridView1.CustomDrawRowIndicator += (s, e) =>
{
if (e.Info.IsRowIndicator && e.RowHandle >= 0)
{
e.Info.DisplayText = (e.RowHandle + 1).ToString();
e.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
e.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
SizeF size = e.Graphics.MeasureString((e.RowHandle + 1).ToString(), e.Appearance.Font);
}
};
}
catch (Exception ex)
{
XtraMessageBoxHelper.Error(ex.Message);
this.Close();
}
}
void BindData()
{
try
{
APIResponseData apiResponseData = Biz.PlanManager.Instance.GetDeviceInformationPlans(CurrentYear, CurrentEquipmentID);
if (!apiResponseData.IsSuccess)
throw new Exception(apiResponseData.Message);
@ -58,18 +83,6 @@ namespace DeviceRepairAndOptimization.Pages.Plan
gridView1.IndicatorWidth = 50;
gridControl1.DataSource = CurrentData.Plans;
gridView1.BestFitColumns();
// 自增长行号
gridView1.CustomDrawRowIndicator += (s, e) =>
{
if (e.Info.IsRowIndicator && e.RowHandle >= 0)
{
e.Info.DisplayText = (e.RowHandle + 1).ToString();
e.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
e.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
SizeF size = e.Graphics.MeasureString((e.RowHandle + 1).ToString(), e.Appearance.Font);
}
};
}
catch (Exception ex)
{
@ -155,6 +168,12 @@ namespace DeviceRepairAndOptimization.Pages.Plan
if (view.ShowDialog() == DialogResult.OK)
{
XtraMessageBoxHelper.Info("操作成功!");
foreach (Form form in Application.OpenForms)
{
if (form.GetType() == typeof(page_MaintenancePlan))
(new Action(((page_MaintenancePlan)form).InitializeGridData)).Invoke();
}
BindData();
}
else
{

View File

@ -31,11 +31,11 @@ namespace DeviceRepairAndOptimization.Pages
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(page_MaintenancePlan));
System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
@ -99,16 +99,16 @@ namespace DeviceRepairAndOptimization.Pages
flowLayoutPanel1.Controls.Add(this.EditSearch);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel1.Location = new System.Drawing.Point(1241, 0);
flowLayoutPanel1.Location = new System.Drawing.Point(1070, 0);
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new System.Drawing.Size(613, 48);
flowLayoutPanel1.Size = new System.Drawing.Size(528, 48);
flowLayoutPanel1.TabIndex = 1;
//
// btn_Filter
//
this.btn_Filter.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btn_Filter.Location = new System.Drawing.Point(553, 9);
this.btn_Filter.Location = new System.Drawing.Point(468, 9);
this.btn_Filter.Name = "btn_Filter";
this.btn_Filter.Size = new System.Drawing.Size(57, 26);
this.btn_Filter.TabIndex = 10;
@ -117,15 +117,15 @@ namespace DeviceRepairAndOptimization.Pages
//
// EditSearch
//
this.EditSearch.Location = new System.Drawing.Point(245, 7);
this.EditSearch.Location = new System.Drawing.Point(160, 7);
this.EditSearch.Margin = new System.Windows.Forms.Padding(5, 7, 5, 7);
this.EditSearch.Name = "EditSearch";
this.EditSearch.Properties.Appearance.Font = new System.Drawing.Font("Verdana", 10F);
this.EditSearch.Properties.Appearance.Options.UseFont = true;
this.EditSearch.Properties.AutoHeight = false;
editorButtonImageOptions2.SvgImageSize = new System.Drawing.Size(16, 16);
editorButtonImageOptions1.SvgImageSize = new System.Drawing.Size(16, 16);
this.EditSearch.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
this.EditSearch.Properties.NullValuePrompt = "输入设备编号或设备类型查询";
this.EditSearch.Size = new System.Drawing.Size(300, 31);
this.EditSearch.TabIndex = 9;
@ -230,18 +230,18 @@ namespace DeviceRepairAndOptimization.Pages
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel2.Controls.Add(this.EditYear, 1, 0);
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel2.Location = new System.Drawing.Point(614, 3);
tableLayoutPanel2.Location = new System.Drawing.Point(530, 3);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel2.Size = new System.Drawing.Size(624, 42);
tableLayoutPanel2.Size = new System.Drawing.Size(537, 42);
tableLayoutPanel2.TabIndex = 4;
//
// EditYear
//
this.EditYear.Dock = System.Windows.Forms.DockStyle.Fill;
this.EditYear.EditValue = null;
this.EditYear.Location = new System.Drawing.Point(190, 3);
this.EditYear.Location = new System.Drawing.Point(146, 3);
this.EditYear.Name = "EditYear";
this.EditYear.Properties.AutoHeight = false;
this.EditYear.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@ -265,7 +265,7 @@ namespace DeviceRepairAndOptimization.Pages
this.tb_pnl_Content.RowCount = 2;
this.tb_pnl_Content.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tb_pnl_Content.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tb_pnl_Content.Size = new System.Drawing.Size(1854, 947);
this.tb_pnl_Content.Size = new System.Drawing.Size(1598, 947);
this.tb_pnl_Content.TabIndex = 0;
//
// panel1
@ -276,7 +276,7 @@ namespace DeviceRepairAndOptimization.Pages
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1854, 48);
this.panel1.Size = new System.Drawing.Size(1598, 48);
this.panel1.TabIndex = 0;
//
// tableLayoutPanel1
@ -294,7 +294,7 @@ namespace DeviceRepairAndOptimization.Pages
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1854, 48);
this.tableLayoutPanel1.Size = new System.Drawing.Size(1598, 48);
this.tableLayoutPanel1.TabIndex = 1;
//
// gridControl
@ -303,7 +303,7 @@ namespace DeviceRepairAndOptimization.Pages
this.gridControl.Location = new System.Drawing.Point(3, 51);
this.gridControl.MainView = this.gridView1;
this.gridControl.Name = "gridControl";
this.gridControl.Size = new System.Drawing.Size(1848, 893);
this.gridControl.Size = new System.Drawing.Size(1592, 893);
this.gridControl.TabIndex = 1;
this.gridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
@ -543,7 +543,7 @@ namespace DeviceRepairAndOptimization.Pages
// page_MaintenancePlan
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1854, 947);
this.ClientSize = new System.Drawing.Size(1598, 947);
this.Controls.Add(this.tb_pnl_Content);
this.DoubleBuffered = true;
this.Name = "page_MaintenancePlan";

View File

@ -80,20 +80,24 @@ namespace DeviceRepairAndOptimization.Pages
/// <summary>
/// 初始化加载数据
/// </summary>
void InitializeGridData()
public void InitializeGridData()
{
// 获取维修数据
Datas = PlanManager.Instance.GetDatas();
int Years = EditYear.Text.IsNullOrWhiteSpace() ? DateTime.Today.Year : Convert.ToInt32(EditYear.Text);
// 如果搜索框为空,则将数据源设置为当前年份的维修数据
if (EditSearch.Text.IsNullOrWhiteSpace())
{
gridControl.DataSource = Datas.Where(x => x.MaintenanceYear == Years)?.ToList();
}
// 否则将数据源设置为当前年份的维修数据并且设备ID或名称包含搜索框的内容
else
{
gridControl.DataSource = Datas.Where(x => x.MaintenanceYear == Years && (x.DisplayEquipmentID == EditSearch.Text || x.EquipmentName.Contains(EditSearch.Text)))?.ToList();
}
// 绑定行点击事件
gridView1.RowCellClick += GridView1_RowCellClick;
}
@ -147,23 +151,28 @@ namespace DeviceRepairAndOptimization.Pages
{
try
{
// 判断当前账号是否具有此操作的权限
if (!GlobalInfo.HasRole("BIZ_PLAN_IMPORT"))
{
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
return;
}
// 打开对话框
using (page_PlanExcelImport dia = new page_PlanExcelImport())
{
if (dia.ShowDialog() == DialogResult.OK)
{
// 初始化表格数据
Invoke(new Action(() => { InitializeGridData(); }));
XtraMessageBoxHelper.Info("操作成功!");
}
}
}
// 捕获异常
catch (Exception ex)
{
// 初始化表格数据
Invoke(new Action(() => { InitializeGridData(); }));
XtraMessageBoxHelper.Error(ex.Message);
}
@ -418,7 +427,7 @@ namespace DeviceRepairAndOptimization.Pages
if (CurrentModel == null)
throw new Exception("请选中要操作的设备数据行!");
(new pageDevicePlans(CurrentModel.EquipmentID,CurrentModel.MaintenanceYear)).ShowDialog();
(new pageDevicePlans(CurrentModel.EquipmentID, CurrentModel.MaintenanceYear)).ShowDialog();
}
catch (Exception ex)

View File

@ -123,9 +123,6 @@
<metadata name="EditSearch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EditSearch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="flowLayoutPanel2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>

View File

@ -78,10 +78,26 @@ namespace DeviceRepairAndOptimization.Pages.Plan
void DataBind()
{
foreach (EditorButton item in txt_EquipmentID.Properties.Buttons)
APIResponseData r = PlanManager.Instance.GetPlanRecordProgress(DataSource.EquipmentID, DataSource.MaintenanceYear);
if (r.IsSuccess)
{
item.Enabled = false;
List<PlanProgress> progList = r.ToDeserializeObject<List<PlanProgress>>();
if (progList != null && progList.Count > 0)
{
foreach (PlanProgress item in progList)
{
Control con = controlLst.FirstOrDefault(x => string.Equals(x.Properties.Tag + "", item.PlanMonth + ""));
if (con != null)
con.Enabled = false;
}
}
}
//foreach (EditorButton item in txt_EquipmentID.Properties.Buttons)
//{
// item.Enabled = false;
//}
txt_EquipmentID.Text = DataSource.DisplayEquipmentID;
txt_DeviceName.Text = DataSource.EquipmentName;
ck_Jan.SelectedItem = DataSource.Jan;
@ -197,7 +213,7 @@ namespace DeviceRepairAndOptimization.Pages.Plan
try
{
APIResponseData apiResponseData = DeviceManager.Instance.GetModelByEquipmentID(txt_EquipmentID.Text.Trim());
APIResponseData apiResponseData = DeviceManager.Instance.GetPMDeviceInfoModelByEquipmentID(txt_EquipmentID.Text.Trim());
if (!apiResponseData.IsSuccess)
throw new Exception(apiResponseData.Message);
DeviceInformationInfo dim = apiResponseData.ToDeserializeObject<DeviceInformationInfo>();
@ -212,6 +228,8 @@ namespace DeviceRepairAndOptimization.Pages.Plan
}
else
{
// List<AnnualMaintenancePlan> vps = PlanManager.Instance.GetDatas();
// AnnualMaintenancePlan vp = vps.FirstOrDefault(x => x.MaintenanceYear == DataSource.MaintenanceYear && x.EquipmentID == dim.AutoID);
AnnualMaintenancePlan vp = PlanManager.Instance.GetPlanByEquipmentPkAndYear(DataSource.MaintenanceYear, dim.AutoID);
if (vp != null)
{

View File

@ -168,7 +168,7 @@ namespace DeviceRepairAndOptimization.Pages.Plan
? EditYear.Text
: DateTime.Today.Year + "");
APIResponseData apiResponseData = DeviceManager.Instance.GetQuery("");
APIResponseData apiResponseData = DeviceManager.Instance.GetQueryKH("");
if (!apiResponseData.IsSuccess)
throw new Exception(apiResponseData.Message);
@ -254,9 +254,17 @@ namespace DeviceRepairAndOptimization.Pages.Plan
{
if (cell.CellType == CellType.Numeric && DateUtil.IsCellDateFormatted(cell))
{
// 将单元格值转换为日期
DateTime dateValue = cell.DateCellValue;
newRow[colIndex] = dateValue;
try
{
// 将单元格值转换为日期
DateTime dateValue = cell.DateCellValue;
newRow[colIndex] = dateValue;
}
catch
{
logs.AppendLine($"行{rowIndex}出现错误输入的【新PM起始月份】非日期格式");
hasError = true;
}
}
else
{

View File

@ -34,7 +34,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1598, 999);
this.ClientSize = new System.Drawing.Size(0, 0);
this.Name = "page_DocReader";
this.Text = "page_DocReader";
this.ResumeLayout(false);

View File

@ -172,6 +172,12 @@ namespace DeviceRepairAndOptimization.Pages
{
ItemIgore(item);
XtraMessageBoxHelper.Info("操作成功!");
foreach (Form form in Application.OpenForms)
{
if (form.GetType() == typeof(page_MaintenancePlan))
(new Action(((page_MaintenancePlan)form).InitializeGridData)).Invoke();
}
}
else if (dr == DialogResult.Abort)
{

View File

@ -53,7 +53,7 @@ namespace DeviceRepairAndOptimization.Pages
this.richEditControl1.MenuManager = this.barManager1;
this.richEditControl1.Name = "richEditControl1";
this.richEditControl1.ShowCaretInReadOnly = false;
this.richEditControl1.Size = new System.Drawing.Size(1598, 916);
this.richEditControl1.Size = new System.Drawing.Size(0, 0);
this.richEditControl1.TabIndex = 0;
this.richEditControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.richEditControl1_MouseClick);
//
@ -77,15 +77,15 @@ namespace DeviceRepairAndOptimization.Pages
this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.barDockControlTop.Location = new System.Drawing.Point(0, 0);
this.barDockControlTop.Manager = this.barManager1;
this.barDockControlTop.Size = new System.Drawing.Size(1598, 0);
this.barDockControlTop.Size = new System.Drawing.Size(0, 0);
//
// barDockControlBottom
//
this.barDockControlBottom.CausesValidation = false;
this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.barDockControlBottom.Location = new System.Drawing.Point(0, 916);
this.barDockControlBottom.Location = new System.Drawing.Point(0, 0);
this.barDockControlBottom.Manager = this.barManager1;
this.barDockControlBottom.Size = new System.Drawing.Size(1598, 0);
this.barDockControlBottom.Size = new System.Drawing.Size(0, 0);
//
// barDockControlLeft
//
@ -93,15 +93,15 @@ namespace DeviceRepairAndOptimization.Pages
this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.barDockControlLeft.Location = new System.Drawing.Point(0, 0);
this.barDockControlLeft.Manager = this.barManager1;
this.barDockControlLeft.Size = new System.Drawing.Size(0, 916);
this.barDockControlLeft.Size = new System.Drawing.Size(0, 0);
//
// barDockControlRight
//
this.barDockControlRight.CausesValidation = false;
this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.barDockControlRight.Location = new System.Drawing.Point(1598, 0);
this.barDockControlRight.Location = new System.Drawing.Point(0, 0);
this.barDockControlRight.Manager = this.barManager1;
this.barDockControlRight.Size = new System.Drawing.Size(0, 916);
this.barDockControlRight.Size = new System.Drawing.Size(0, 0);
//
// btn_Ok
//
@ -145,7 +145,7 @@ namespace DeviceRepairAndOptimization.Pages
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1598, 916);
this.ClientSize = new System.Drawing.Size(0, 0);
this.Controls.Add(this.richEditControl1);
this.Controls.Add(this.barDockControlLeft);
this.Controls.Add(this.barDockControlRight);

View File

@ -33,8 +33,6 @@ namespace DeviceRepairAndOptimization
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new page_DriveMaintenance());
#region , config中的数据库连接字符串 &
if (args != null && args.Length > 0)
{

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.1.14")]
[assembly: AssemblyFileVersion("2.0.1.14")]
[assembly: AssemblyVersion("5.0.0.5")]
[assembly: AssemblyFileVersion("5.0.0.5")]

View File

@ -1,21 +1,22 @@
DevExpress.XtraEditors.TreeListLookUpEdit, DevExpress.XtraTreeList.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraDataLayout.DataLayoutControl, DevExpress.XtraLayout.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TreeListLookUpEdit, DevExpress.XtraTreeList.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v20.2, Version=20.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@ -187,6 +187,8 @@
/// </summary>
public const string GetDeviceQuery = "Api/Device/GetQuery";
public const string GetDeviceQueryKH = "Api/Device/GetQueryKH";
/// <summary>
/// 获取树形结构
/// </summary>
@ -202,6 +204,11 @@
/// </summary>
public const string GetDeviceDataByAutoID = "Api/Device/GetDataByAutoID";
/// <summary>
/// 根据设备ID获取PM的设备信息
/// </summary>
public const string GetPMDeviceInfoModelByEquipmentID = "Api/Device/GetPMDeviceInfoModelByEquipmentID";
#endregion
#region
@ -384,5 +391,14 @@
#endregion
#region
/// <summary>
/// 用户登录登出日志
/// </summary>
public const string UserLoginContent = "Api/Operation/UserLoginContent";
#endregion
}
}

View File

@ -37,7 +37,7 @@ namespace DeviceRepairAndOptimization
private void FrmLogin_Load(object sender, EventArgs e)
{
AutoUpdate();
lblVersion.Text = $"Ver 5.0";
lblVersion.Text = $"Ver {GetAppVersion()}";
}
#region

View File

@ -29,6 +29,7 @@ namespace DeviceRepairAndOptimization
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_Launch));
this.btn_UserManager = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem5 = new DevExpress.XtraBars.BarButtonItem();
@ -64,6 +65,13 @@ namespace DeviceRepairAndOptimization
this.barButtonItem9 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem10 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem11 = new DevExpress.XtraBars.BarButtonItem();
this.btnSystemSetting = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem12 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem13 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem14 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem15 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem16 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem17 = new DevExpress.XtraBars.BarButtonItem();
this.page_Main = new DevExpress.XtraBars.Ribbon.RibbonPage();
this.pg_Main = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
@ -76,21 +84,24 @@ namespace DeviceRepairAndOptimization
this.ribbonPageGroup5 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPage3 = new DevExpress.XtraBars.Ribbon.RibbonPage();
this.ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPage5 = new DevExpress.XtraBars.Ribbon.RibbonPage();
this.rbpage_Logs = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPage4 = new DevExpress.XtraBars.Ribbon.RibbonPage();
this.ribbonPageGroup8 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonPageGroup11 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.repositoryItemHypertextLabel1 = new DevExpress.XtraEditors.Repository.RepositoryItemHypertextLabel();
this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
this.ribbonStatusBar = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
this.pnl_Content = new DevExpress.XtraEditors.PanelControl();
this.splashScreenManager1 = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::DeviceRepairAndOptimization.frmWaiting), true, true);
this.ribbonPageGroup11 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.btnSystemSetting = new DevExpress.XtraBars.BarButtonItem();
this.pmLogUser = new DevExpress.XtraBars.PopupMenu(this.components);
((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemHypertextLabel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pnl_Content)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pmLogUser)).BeginInit();
this.SuspendLayout();
//
// btn_UserManager
@ -167,9 +178,15 @@ namespace DeviceRepairAndOptimization
this.barButtonItem9,
this.barButtonItem10,
this.barButtonItem11,
this.btnSystemSetting});
this.btnSystemSetting,
this.barButtonItem12,
this.barButtonItem13,
this.barButtonItem14,
this.barButtonItem15,
this.barButtonItem16,
this.barButtonItem17});
this.ribbonControl.Location = new System.Drawing.Point(0, 0);
this.ribbonControl.MaxItemId = 66;
this.ribbonControl.MaxItemId = 73;
this.ribbonControl.Name = "ribbonControl";
this.ribbonControl.OptionsMenuMinWidth = 385;
this.ribbonControl.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
@ -177,6 +194,7 @@ namespace DeviceRepairAndOptimization
this.ribbonPage1,
this.ribbonPage2,
this.ribbonPage3,
this.ribbonPage5,
this.ribbonPage4});
this.ribbonControl.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemHypertextLabel1,
@ -294,6 +312,7 @@ namespace DeviceRepairAndOptimization
this.btn_RepairRecord.Id = 43;
this.btn_RepairRecord.ImageOptions.SvgImage = global::DeviceRepairAndOptimization.Properties.Resources.customizegrid;
this.btn_RepairRecord.Name = "btn_RepairRecord";
this.btn_RepairRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
this.btn_RepairRecord.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btn_RepairRecord_ItemClick);
//
// btn_PlanCount
@ -425,6 +444,55 @@ namespace DeviceRepairAndOptimization
this.barButtonItem11.Id = 62;
this.barButtonItem11.Name = "barButtonItem11";
//
// btnSystemSetting
//
this.btnSystemSetting.Caption = "系统设置";
this.btnSystemSetting.Id = 65;
this.btnSystemSetting.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSystemSetting.ImageOptions.Image")));
this.btnSystemSetting.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("btnSystemSetting.ImageOptions.LargeImage")));
this.btnSystemSetting.Name = "btnSystemSetting";
this.btnSystemSetting.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnSystemSetting_ItemClick);
//
// barButtonItem12
//
this.barButtonItem12.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.DropDown;
this.barButtonItem12.Caption = "用户";
this.barButtonItem12.DropDownControl = this.pmLogUser;
this.barButtonItem12.Id = 67;
this.barButtonItem12.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem12.ImageOptions.SvgImage")));
this.barButtonItem12.Name = "barButtonItem12";
//
// barButtonItem13
//
this.barButtonItem13.Caption = "用户登录登出历史";
this.barButtonItem13.Id = 68;
this.barButtonItem13.Name = "barButtonItem13";
this.barButtonItem13.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem13_ItemClick);
//
// barButtonItem14
//
this.barButtonItem14.Caption = "用户密码修改历史";
this.barButtonItem14.Id = 69;
this.barButtonItem14.Name = "barButtonItem14";
//
// barButtonItem15
//
this.barButtonItem15.Caption = "用户锁定解锁历史";
this.barButtonItem15.Id = 70;
this.barButtonItem15.Name = "barButtonItem15";
//
// barButtonItem16
//
this.barButtonItem16.Caption = "用户密码错误录入历史";
this.barButtonItem16.Id = 71;
this.barButtonItem16.Name = "barButtonItem16";
//
// barButtonItem17
//
this.barButtonItem17.Caption = "用户信息历史";
this.barButtonItem17.Id = 72;
this.barButtonItem17.Name = "barButtonItem17";
//
// page_Main
//
this.page_Main.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
@ -461,6 +529,7 @@ namespace DeviceRepairAndOptimization
this.ribbonPageGroup10});
this.ribbonPage1.Name = "ribbonPage1";
this.ribbonPage1.Text = "AM 保养管理";
this.ribbonPage1.Visible = false;
//
// ribbonPageGroup6
//
@ -501,6 +570,7 @@ namespace DeviceRepairAndOptimization
this.ribbonPageGroup4});
this.ribbonPage3.Name = "ribbonPage3";
this.ribbonPage3.Text = "报表数据";
this.ribbonPage3.Visible = false;
//
// ribbonPageGroup4
//
@ -509,6 +579,19 @@ namespace DeviceRepairAndOptimization
this.ribbonPageGroup4.Name = "ribbonPageGroup4";
this.ribbonPageGroup4.Text = "数据报表";
//
// ribbonPage5
//
this.ribbonPage5.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
this.rbpage_Logs});
this.ribbonPage5.Name = "ribbonPage5";
this.ribbonPage5.Text = "系统日志";
//
// rbpage_Logs
//
this.rbpage_Logs.ItemLinks.Add(this.barButtonItem12);
this.rbpage_Logs.Name = "rbpage_Logs";
this.rbpage_Logs.Text = "数据日志";
//
// ribbonPage4
//
this.ribbonPage4.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
@ -538,6 +621,12 @@ namespace DeviceRepairAndOptimization
this.ribbonPageGroup3.Name = "ribbonPageGroup3";
this.ribbonPageGroup3.Text = "用户数据";
//
// ribbonPageGroup11
//
this.ribbonPageGroup11.ItemLinks.Add(this.btnSystemSetting);
this.ribbonPageGroup11.Name = "ribbonPageGroup11";
this.ribbonPageGroup11.Text = "系统设置";
//
// repositoryItemHypertextLabel1
//
this.repositoryItemHypertextLabel1.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
@ -574,20 +663,15 @@ namespace DeviceRepairAndOptimization
//
this.splashScreenManager1.ClosingDelay = 500;
//
// ribbonPageGroup11
// pmLogUser
//
this.ribbonPageGroup11.ItemLinks.Add(this.btnSystemSetting);
this.ribbonPageGroup11.Name = "ribbonPageGroup11";
this.ribbonPageGroup11.Text = "系统设置";
//
// btnSystemSetting
//
this.btnSystemSetting.Caption = "系统设置";
this.btnSystemSetting.Id = 65;
this.btnSystemSetting.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem12.ImageOptions.Image")));
this.btnSystemSetting.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem12.ImageOptions.LargeImage")));
this.btnSystemSetting.Name = "btnSystemSetting";
this.btnSystemSetting.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnSystemSetting_ItemClick);
this.pmLogUser.ItemLinks.Add(this.barButtonItem13);
this.pmLogUser.ItemLinks.Add(this.barButtonItem14);
this.pmLogUser.ItemLinks.Add(this.barButtonItem15);
this.pmLogUser.ItemLinks.Add(this.barButtonItem16);
this.pmLogUser.ItemLinks.Add(this.barButtonItem17);
this.pmLogUser.Name = "pmLogUser";
this.pmLogUser.Ribbon = this.ribbonControl;
//
// frm_Launch
//
@ -610,6 +694,7 @@ namespace DeviceRepairAndOptimization
((System.ComponentModel.ISupportInitialize)(this.repositoryItemHypertextLabel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pnl_Content)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pmLogUser)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -673,5 +758,14 @@ namespace DeviceRepairAndOptimization
private DevExpress.XtraBars.BarButtonItem barButtonItem11;
private DevExpress.XtraBars.BarButtonItem btnSystemSetting;
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup11;
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage5;
private DevExpress.XtraBars.Ribbon.RibbonPageGroup rbpage_Logs;
private DevExpress.XtraBars.BarButtonItem barButtonItem12;
private DevExpress.XtraBars.BarButtonItem barButtonItem13;
private DevExpress.XtraBars.BarButtonItem barButtonItem14;
private DevExpress.XtraBars.BarButtonItem barButtonItem15;
private DevExpress.XtraBars.BarButtonItem barButtonItem16;
private DevExpress.XtraBars.BarButtonItem barButtonItem17;
private DevExpress.XtraBars.PopupMenu pmLogUser;
}
}

View File

@ -5,6 +5,7 @@ using DeviceRepair.Models.Common;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
using DeviceRepairAndOptimization.Pages;
using DeviceRepairAndOptimization.Pages.Log;
using DeviceRepairAndOptimization.Pages.Maintenance;
using DeviceRepairAndOptimization.Pages.Users;
using Newtonsoft.Json;
@ -355,6 +356,7 @@ namespace DeviceRepairAndOptimization
btn_Report01.Down = false;
btn_RepairRecord.Down = false;
btnSystemSetting.Down = false;
barButtonItem12.Down = false;
if (CurrentMenu != null)
{
@ -579,5 +581,31 @@ namespace DeviceRepairAndOptimization
XtraMessageBoxHelper.Error(ex.Message);
}
}
/// <summary>
/// 用户登录登出日志
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void barButtonItem13_ItemClick(object sender, ItemClickEventArgs e)
{
try
{
if (!GlobalInfo.HasRole("LOGS_USERLOGIN"))
{
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
return;
}
pnl_Content.ShowInPanel<page_UserLoginLog>();
CurrentMenu = btnSystemSetting;
SetButtonDown();
}
catch (Exception ex)
{
SetButtonDown();
XtraMessageBoxHelper.Error(ex.Message);
}
}
}
}

View File

@ -960,66 +960,99 @@
T8b7/XCa++SfYzx6ji0+TvBM8H7ggpfB6zUUxspgn/viAVPMYcP/AGBDyOsdZH9HAAAAAElFTkSuQmCC
</value>
</data>
<data name="barButtonItem12.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btnSystemSetting.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
<data name="barButtonItem12.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btnSystemSetting.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
kvS/xKwwzH8ALBnyGAPyeiwAAAAASUVORK5CYII=
</value>
</data>
<metadata name="pmLogUser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>205, 17</value>
</metadata>
<data name="barButtonItem12.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v20.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIwLjIsIFZlcnNpb249MjAuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAEYFAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iVmVydGljYWxfQXhpc19Mb2dfU2NhbGUiIHN0eWxlPSJlbmFibGUtYmFj
a2dyb3VuZDpuZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tm
aWxsOiM3MjcyNzI7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5zdDB7b3BhY2l0eTowLjU7fQo8L3N0
eWxlPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8cmVjdCB4PSI0IiB5PSIyNiIgd2lkdGg9IjI2IiBo
ZWlnaHQ9IjIiIHJ4PSIwIiByeT0iMCIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQogIDxwb2x5Z29u
IHBvaW50cz0iNCwyIDQsNCAyLDQgMiw2IDQsNiA0LDggMiw4IDIsMTAgNCwxMCA0LDEyIDIsMTIgMiwx
NCA0LDE0IDQsMTYgMiwxNiAyLDE4IDQsMTggNCwyMCAyLDIwIDIsMjIgICA0LDIyIDQsMjQgMiwyNCAy
LDI2IDQsMjYgNCwyOCA2LDI4IDYsMiAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPHBhdGggZD0iTTE0LjYs
MTBIMTBWMmgxLjd2Ni41aDIuOVYxMHogTTE4LjYsMTBjLTEuMSwwLTItMC40LTIuNy0xLjFjLTAuNy0w
LjctMS0xLjctMS0yLjhjMC0xLjIsMC40LTIuMiwxLjEtMyAgQzE2LjYsMi40LDE3LjYsMiwxOC43LDJj
MS4xLDAsMiwwLjQsMi43LDEuMXMxLDEuNywxLDIuOWMwLDEuMi0wLjQsMi4yLTEuMSwyLjlTMTkuNywx
MCwxOC42LDEweiBNMTguNywzLjVjLTAuNiwwLTEuMSwwLjItMS40LDAuNyAgYy0wLjQsMC41LTAuNSwx
LjEtMC41LDEuOGMwLDAuOCwwLjIsMS40LDAuNSwxLjhjMC40LDAuNCwwLjgsMC43LDEuNCwwLjdjMC42
LDAsMS4xLTAuMiwxLjQtMC43czAuNS0xLDAuNS0xLjggIGMwLTAuOC0wLjItMS40LTAuNS0xLjlDMTku
NywzLjcsMTkuMywzLjUsMTguNywzLjV6IE0zMCw5LjNjLTAuOCwwLjQtMS43LDAuNy0yLjgsMC43QzI2
LDEwLDI1LDkuNywyNC4zLDlzLTEuMS0xLjYtMS4xLTIuOCAgYzAtMS4yLDAuNC0yLjIsMS4yLTNTMjYu
MiwyLDI3LjUsMmMwLjgsMCwxLjUsMC4xLDIuMiwwLjNWNGMtMC42LTAuMy0xLjMtMC41LTIuMi0wLjVj
LTAuNywwLTEuMywwLjItMS44LDAuN0MyNS4zLDQuNiwyNSw1LjMsMjUsNiAgYzAsMC44LDAuMiwxLjQs
MC42LDEuOHMxLDAuNywxLjYsMC43YzAuNCwwLDAuNy0wLjEsMS0wLjJWNi44aC0xLjVWNS41SDMwVjku
M3oiIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw==
</value>
</data>
<data name="frm_Launch.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v20.2" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -69,7 +69,12 @@ namespace TsSFCDeivceClient
/// </summary>
DateTime Filter_Start_Date
{
get { return Convert.ToDateTime(de_StartDate.EditValue); }
get
{
if (Convert.ToDateTime(de_StartDate.EditValue) == DateTime.MinValue)
de_StartDate.EditValue = DateTime.Today.AddMonths(-1);
return Convert.ToDateTime(de_StartDate.EditValue);
}
}
/// <summary>
@ -77,7 +82,12 @@ namespace TsSFCDeivceClient
/// </summary>
DateTime Filter_End_Date
{
get { return Convert.ToDateTime(de_EndDate.EditValue); }
get
{
if (Convert.ToDateTime(de_EndDate.EditValue) == DateTime.MinValue)
de_EndDate.EditValue = DateTime.Today;
return Convert.ToDateTime(de_EndDate.EditValue);
}
}
#endregion
@ -151,7 +161,7 @@ namespace TsSFCDeivceClient
de_StartDate.EditValue = DateTime.Today.AddMonths(-1);
de_EndDate.EditValue = DateTime.Today;
de_EndDate.EditValue = DateTime.Today.AddDays(1).AddMilliseconds(-1);
InitializeGridViewStyle();
splashScreenManager1.CloseWaitForm();
@ -244,6 +254,14 @@ namespace TsSFCDeivceClient
gridControl1.BeginUpdate();
gridControl1.DataSource = null;
gridControl1.DataSource = table;
if (table != null && table.Rows.Count > 0)
{
// 设置行号列宽度
SizeF size = this.CreateGraphics().MeasureString(table.Rows.Count.ToString(), this.Font);
gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 20;
}
gridControl1.RefreshDataSource();
gridControl1.EndUpdate();
//gridView1.BestFitColumns();
@ -277,7 +295,6 @@ namespace TsSFCDeivceClient
e.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
SizeF size = e.Graphics.MeasureString((e.RowHandle + 1).ToString(), e.Appearance.Font);
BeginInvoke(new MethodInvoker(delegate { gridView1.IndicatorWidth = Convert.ToInt32(size.Width) + 20; }));
}
};
@ -352,15 +369,15 @@ namespace TsSFCDeivceClient
{
if (Item.EvaluatorItems != null)
{
if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "PE") && EmployeeType == 1)
{
PE = true;
}
if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "QE") && EmployeeType == 0)
{
QE = true;
}
if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "PE") && EmployeeType == 1)
{
PE = true;
}
}
}
@ -375,12 +392,12 @@ namespace TsSFCDeivceClient
this.Invoke(new Action(() =>
{
btn_Assessment_PE.Enabled = PE;
btn_Assessment_PE.Refresh();
btn_Assessment_QE.Enabled = QE;
btn_Assessment_QE.Refresh();
btn_Assessment_PE.Enabled = PE;
btn_Assessment_PE.Refresh();
btnResumptionConfirm.Enabled = RestorationConfirmation;
btnResumptionConfirm.Refresh();
}));
@ -498,7 +515,7 @@ namespace TsSFCDeivceClient
DeviceWarrantyEvaluatorInfo info = new DeviceWarrantyEvaluatorInfo
{
Description = Description + "",
EvaluatorCode = "PE",
EvaluatorCode = "QE",
FormID = Item.AutoID,
};
@ -560,7 +577,7 @@ namespace TsSFCDeivceClient
DeviceWarrantyEvaluatorInfo info = new DeviceWarrantyEvaluatorInfo
{
Description = Description.ToString(),
EvaluatorCode = "QE",
EvaluatorCode = "PE",
FormID = Item.AutoID,
};

View File

@ -31,15 +31,15 @@ namespace TsSFCDeivceClient
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(pageDeviceMaintenanceFormView));
DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition4 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition5 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition6 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition();
DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition();
this.stackPanel2 = new DevExpress.Utils.Layout.StackPanel();
this.btn_Query = new DevExpress.XtraEditors.SimpleButton();
this.btn_Assessment_PE = new DevExpress.XtraEditors.SimpleButton();
this.btn_Assessment_QE = new DevExpress.XtraEditors.SimpleButton();
this.btn_Assessment_PE = new DevExpress.XtraEditors.SimpleButton();
this.btnResumptionConfirm = new DevExpress.XtraEditors.SimpleButton();
this.toolbarFormControl1 = new DevExpress.XtraBars.ToolbarForm.ToolbarFormControl();
this.toolbarFormManager1 = new DevExpress.XtraBars.ToolbarForm.ToolbarFormManager(this.components);
@ -58,10 +58,10 @@ namespace TsSFCDeivceClient
this.gcLocationName = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcCreatOn = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcInProductionText = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorPE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorTimePE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorQE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorTimeQE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorPE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEvaluatorTimePE = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcFormStatusText = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcCreatorName = new DevExpress.XtraGrid.Columns.GridColumn();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
@ -108,8 +108,8 @@ namespace TsSFCDeivceClient
// stackPanel2
//
this.stackPanel2.Controls.Add(this.btn_Query);
this.stackPanel2.Controls.Add(this.btn_Assessment_PE);
this.stackPanel2.Controls.Add(this.btn_Assessment_QE);
this.stackPanel2.Controls.Add(this.btn_Assessment_PE);
this.stackPanel2.Controls.Add(this.btnResumptionConfirm);
this.stackPanel2.Location = new System.Drawing.Point(867, 2);
this.stackPanel2.Name = "stackPanel2";
@ -132,22 +132,6 @@ namespace TsSFCDeivceClient
this.btn_Query.Text = "查询";
this.btn_Query.Click += new System.EventHandler(this.btn_Query_Click);
//
// btn_Assessment_PE
//
this.btn_Assessment_PE.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
this.btn_Assessment_PE.Appearance.Options.UseFont = true;
this.btn_Assessment_PE.Appearance.Options.UseTextOptions = true;
this.btn_Assessment_PE.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.btn_Assessment_PE.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.btn_Assessment_PE.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btn_Assessment_PE.ImageOptions.Image")));
this.btn_Assessment_PE.Location = new System.Drawing.Point(115, 7);
this.btn_Assessment_PE.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.btn_Assessment_PE.Name = "btn_Assessment_PE";
this.btn_Assessment_PE.Size = new System.Drawing.Size(120, 44);
this.btn_Assessment_PE.TabIndex = 2;
this.btn_Assessment_PE.Text = "质量部评估";
this.btn_Assessment_PE.Click += new System.EventHandler(this.btn_Assessment_PE_Click);
//
// btn_Assessment_QE
//
this.btn_Assessment_QE.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
@ -156,13 +140,29 @@ namespace TsSFCDeivceClient
this.btn_Assessment_QE.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.btn_Assessment_QE.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.btn_Assessment_QE.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btn_Assessment_QE.ImageOptions.Image")));
this.btn_Assessment_QE.Location = new System.Drawing.Point(251, 7);
this.btn_Assessment_QE.Location = new System.Drawing.Point(115, 7);
this.btn_Assessment_QE.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.btn_Assessment_QE.Name = "btn_Assessment_QE";
this.btn_Assessment_QE.Size = new System.Drawing.Size(120, 44);
this.btn_Assessment_QE.TabIndex = 3;
this.btn_Assessment_QE.Text = "工程部评估";
this.btn_Assessment_QE.Click += new System.EventHandler(this.btn_Assessment_QE_Click);
this.btn_Assessment_QE.TabIndex = 2;
this.btn_Assessment_QE.Text = "质量部评估";
this.btn_Assessment_QE.Click += new System.EventHandler(this.btn_Assessment_PE_Click);
//
// btn_Assessment_PE
//
this.btn_Assessment_PE.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
this.btn_Assessment_PE.Appearance.Options.UseFont = true;
this.btn_Assessment_PE.Appearance.Options.UseTextOptions = true;
this.btn_Assessment_PE.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.btn_Assessment_PE.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.btn_Assessment_PE.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btn_Assessment_PE.ImageOptions.Image")));
this.btn_Assessment_PE.Location = new System.Drawing.Point(251, 7);
this.btn_Assessment_PE.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.btn_Assessment_PE.Name = "btn_Assessment_PE";
this.btn_Assessment_PE.Size = new System.Drawing.Size(120, 44);
this.btn_Assessment_PE.TabIndex = 3;
this.btn_Assessment_PE.Text = "工程部评估";
this.btn_Assessment_PE.Click += new System.EventHandler(this.btn_Assessment_QE_Click);
//
// btnResumptionConfirm
//
@ -288,10 +288,10 @@ namespace TsSFCDeivceClient
this.gcLocationName,
this.gcCreatOn,
this.gcInProductionText,
this.gcEvaluatorPE,
this.gcEvaluatorTimePE,
this.gcEvaluatorQE,
this.gcEvaluatorTimeQE,
this.gcEvaluatorPE,
this.gcEvaluatorTimePE,
this.gcFormStatusText,
this.gcCreatorName});
this.gridView1.DetailHeight = 467;
@ -374,50 +374,50 @@ namespace TsSFCDeivceClient
this.gcInProductionText.VisibleIndex = 6;
this.gcInProductionText.Width = 96;
//
// gcEvaluatorPE
//
this.gcEvaluatorPE.Caption = "质量部评估评估人";
this.gcEvaluatorPE.FieldName = "EvaluatorPE";
this.gcEvaluatorPE.MinWidth = 26;
this.gcEvaluatorPE.Name = "gcEvaluatorPE";
this.gcEvaluatorPE.Visible = true;
this.gcEvaluatorPE.VisibleIndex = 8;
this.gcEvaluatorPE.Width = 96;
//
// gcEvaluatorTimePE
//
this.gcEvaluatorTimePE.Caption = "质量部评估评估时间";
this.gcEvaluatorTimePE.DisplayFormat.FormatString = "G";
this.gcEvaluatorTimePE.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gcEvaluatorTimePE.FieldName = "EvaluatorTimePE";
this.gcEvaluatorTimePE.MinWidth = 26;
this.gcEvaluatorTimePE.Name = "gcEvaluatorTimePE";
this.gcEvaluatorTimePE.Visible = true;
this.gcEvaluatorTimePE.VisibleIndex = 7;
this.gcEvaluatorTimePE.Width = 96;
//
// gcEvaluatorQE
//
this.gcEvaluatorQE.Caption = "工程部评估评估人";
this.gcEvaluatorQE.Caption = "质量部评估评估人";
this.gcEvaluatorQE.FieldName = "EvaluatorQE";
this.gcEvaluatorQE.MinWidth = 26;
this.gcEvaluatorQE.Name = "gcEvaluatorQE";
this.gcEvaluatorQE.Visible = true;
this.gcEvaluatorQE.VisibleIndex = 10;
this.gcEvaluatorQE.VisibleIndex = 8;
this.gcEvaluatorQE.Width = 96;
//
// gcEvaluatorTimeQE
//
this.gcEvaluatorTimeQE.Caption = "工程部评估评估时间";
this.gcEvaluatorTimeQE.Caption = "质量部评估评估时间";
this.gcEvaluatorTimeQE.DisplayFormat.FormatString = "G";
this.gcEvaluatorTimeQE.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gcEvaluatorTimeQE.FieldName = "EvaluatorTimeQE";
this.gcEvaluatorTimeQE.MinWidth = 26;
this.gcEvaluatorTimeQE.Name = "gcEvaluatorTimeQE";
this.gcEvaluatorTimeQE.Visible = true;
this.gcEvaluatorTimeQE.VisibleIndex = 9;
this.gcEvaluatorTimeQE.VisibleIndex = 7;
this.gcEvaluatorTimeQE.Width = 96;
//
// gcEvaluatorPE
//
this.gcEvaluatorPE.Caption = "工程部评估评估人";
this.gcEvaluatorPE.FieldName = "EvaluatorPE";
this.gcEvaluatorPE.MinWidth = 26;
this.gcEvaluatorPE.Name = "gcEvaluatorPE";
this.gcEvaluatorPE.Visible = true;
this.gcEvaluatorPE.VisibleIndex = 10;
this.gcEvaluatorPE.Width = 96;
//
// gcEvaluatorTimePE
//
this.gcEvaluatorTimePE.Caption = "工程部评估评估时间";
this.gcEvaluatorTimePE.DisplayFormat.FormatString = "G";
this.gcEvaluatorTimePE.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gcEvaluatorTimePE.FieldName = "EvaluatorTimePE";
this.gcEvaluatorTimePE.MinWidth = 26;
this.gcEvaluatorTimePE.Name = "gcEvaluatorTimePE";
this.gcEvaluatorTimePE.Visible = true;
this.gcEvaluatorTimePE.VisibleIndex = 9;
this.gcEvaluatorTimePE.Width = 96;
//
// gcFormStatusText
//
this.gcFormStatusText.Caption = "状态";
@ -560,23 +560,23 @@ namespace TsSFCDeivceClient
this.layoutControlItem5});
this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.Root.Name = "Root";
columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition1.Width = 30D;
columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition2.Width = 30D;
columnDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition3.Width = 40D;
columnDefinition4.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition4.Width = 30D;
columnDefinition5.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition5.Width = 30D;
columnDefinition6.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition6.Width = 40D;
this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
columnDefinition1,
columnDefinition2,
columnDefinition3});
rowDefinition1.Height = 100D;
rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
rowDefinition2.Height = 100D;
rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition4,
columnDefinition5,
columnDefinition6});
rowDefinition3.Height = 100D;
rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
rowDefinition4.Height = 100D;
rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent;
this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
rowDefinition1,
rowDefinition2});
rowDefinition3,
rowDefinition4});
this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
this.Root.Size = new System.Drawing.Size(1442, 62);
this.Root.TextVisible = false;
@ -735,10 +735,10 @@ namespace TsSFCDeivceClient
private DevExpress.XtraGrid.Columns.GridColumn gcLocationName;
private DevExpress.XtraGrid.Columns.GridColumn gcCreatOn;
private DevExpress.XtraGrid.Columns.GridColumn gcInProductionText;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorPE;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorTimePE;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorQE;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorTimeQE;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorPE;
private DevExpress.XtraGrid.Columns.GridColumn gcEvaluatorTimePE;
private DevExpress.XtraGrid.Columns.GridColumn gcFormStatusText;
private DevExpress.XtraGrid.Columns.GridColumn gcCreatorName;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
@ -757,8 +757,8 @@ namespace TsSFCDeivceClient
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraEditors.SimpleButton btn_Query;
private DevExpress.Utils.Layout.StackPanel stackPanel2;
private DevExpress.XtraEditors.SimpleButton btn_Assessment_PE;
private DevExpress.XtraEditors.SimpleButton btn_Assessment_QE;
private DevExpress.XtraEditors.SimpleButton btn_Assessment_PE;
private DevExpress.XtraEditors.SimpleButton btnResumptionConfirm;
}
}

View File

@ -165,7 +165,7 @@
V1hF2JXd93OcN5b7H1cpDdS8q/oNAAAAAElFTkSuQmCC
</value>
</data>
<data name="btn_Assessment_PE.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btn_Assessment_QE.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACF0RVh0VGl0
bGUAQXBwbHk7T0s7Q2hlY2s7QmFycztSaWJib247ZGPIaAAACrBJREFUWEeVVwtQlccZXdu82jyaNmNr
@ -217,7 +217,7 @@
g8c8x+84Rh3/P5oQ/wKtHXLtkLLsUQAAAABJRU5ErkJggg==
</value>
</data>
<data name="btn_Assessment_QE.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btn_Assessment_PE.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACF0RVh0VGl0
bGUAQXBwbHk7T0s7Q2hlY2s7QmFycztSaWJib247ZGPIaAAACrBJREFUWEeVVwtQlccZXdu82jyaNmNr