From 6dff69fdd49c0058741efeaaf285e7b1da7385d2 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期四, 10 十月 2024 16:45:35 +0800 Subject: [PATCH] 新增厂商管理 --- Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowSeries.cs | 0 Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer_Instance.cs | 59 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpTypeSeriesMap.cs | 0 Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleMain.cs | 0 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkSeries.cs | 0 Dto/Yw.Dto.Division.Core/UpdateDivisionInput.cs | 5 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMainAndPartMap.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer_Instance.cs | 85 + Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.cs | 95 + Dto/Yw.Dto.Division.Core/DivisionDto.cs | 6 Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineMain.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/99-dbfirst/IAssetsDbFirstHelper.cs | 0 Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowMain.cs | 0 Service/HStation.Service.Assets.Core/02-model/01-AdaptingManage/AdaptingManage.cs | 0 Service/HStation.Service.Assets.Core/04-dal/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs | 11 BLL/HStation.BLL.Assets.Core/04-bll/99-dbfirst/XhsDbFirstHelper.cs | 0 Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer_Instance.cs | 62 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroupAndMainMap.cs | 0 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroup.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/10-Manufacturer/Manufacturer.cs | 219 ++ Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkMain.cs | 0 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpType.cs | 0 Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroup.cs | 0 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMain.cs | 0 Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpTypeSeriesMap.cs | 0 Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/09-Manufacturer/Manufacturer.cs | 108 + WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.designer.cs | 340 ++++ Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer.cs | 228 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.cs | 62 Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveMain.cs | 0 Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkSeries.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.designer.cs | 203 ++ Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/UpdateManufacturerMappingInput.cs | 34 Service/HStation.Service.Assets.Core/01-entity/10-ManufacturerMapping/ManufacturerMapping.cs | 66 Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs | 0 Service/HStation.Service.Assets.Core/04-dal/02-postgresql/11-ManufacturerMapping/ManufacturerMapping.cs | 18 BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping.cs | 123 + Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkMain.cs | 0 Service/Yw.Service.Division.Core/01-entity/Division.cs | 12 Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/ManufacturerMappingDto.cs | 41 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.resx | 120 + BLL/HStation.BLL.Assets.Core/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs | 11 Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroupAndMainMap.cs | 0 Service/HStation.Service.Assets.Core/04-dal/03-sqlite/10-Manufacturer/Manufacturer.cs | 18 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpSeries.cs | 0 Vmo/Yw.Vmo.Division.Core/DivisionVmo.cs | 6 Dto/Yw.Dto.Division.Core/AddDivisionInput.cs | 5 Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Cache/ManufacturerCacheHelper.cs | 71 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpType.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/11-ManufacturerMapping/ManufacturerMapping.cs | 202 ++ Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowMain.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.designer.cs | 303 +++ Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/AddManufacturerMappingInput.cs | 40 Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Cache/ManufacturerCacheHelper.cs | 71 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user | 12 Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleMain.cs | 0 Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPartMain.cs | 0 Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer.cs | 242 ++ Service/HStation.Service.Assets.Core/04-dal/03-sqlite/11-ManufacturerMapping/ManufacturerMapping.cs | 18 Service/HStation.Service.Assets.Core/01-entity/01-AdaptingManage/AdaptingManage.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.resx | 123 + BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer.cs | 132 + Service/HStation.Service.Assets.Core/04-dal/02-postgresql/10-Manufacturer/Manufacturer.cs | 19 Service/Yw.Service.Division.Core/02-model/Division.cs | 8 Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineMain.cs | 0 Vmo/HStation.Vmo.Assets.Core/11-ManufacturerMapping/ManufacturerMapping.cs | 44 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroup.cs | 0 Service/HStation.Service.Assets.Core/02-model/10-ManufacturerMapping/ManufacturerMapping.cs | 67 Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.designer.cs | 332 +++ Desktop/HStation.Desktop.Xhs.Core/MainForm.cs | 18 Service/HStation.Service.Assets.Core/01-entity/09-Manufacturer/Manufacturer.cs | 108 + Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPropContent.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.cs | 83 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMain.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/10-IManufacturer/IManufacturer.cs | 16 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.cs | 234 ++ Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroup.cs | 0 Vmo/HStation.Vmo.Assets.Core/10-Manufacturer/Manufacturer.cs | 84 WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.resx | 123 + WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.resx | 339 +++ WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacurerViewModel.cs | 107 + Dto/HStation.Dto.Assets.Core/09-Manufacturer/AddManufacturerInput.cs | 70 Service/HStation.Service.Assets.Core/04-dal/01-interface/10-IManufacturer/IManufacturer.cs | 11 Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroupAndMainMap.cs | 0 Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMainAndPartMap.cs | 0 Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs | 2 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroupAndMainMap.cs | 0 Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkMain.cs | 0 Service/HStation.Service.Assets.Core/00-core/eAdaptingType - 复制.cs | 31 Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineCoarseCoefficient.cs | 0 Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPropContent.cs | 0 Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkMain.cs | 0 Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj | 8 Dto/HStation.Dto.Assets.Core/09-Manufacturer/ManufacturerDto.cs | 72 Dto/HStation.Dto.Assets.Core/09-Manufacturer/UpdateManufacturerInput.cs | 58 Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkSeries.cs | 0 Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveMain.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.ManufacurerViewModel.datasource | 10 Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveSeries.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/99-dbfirst/XhsDbFirstHelper.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping_Instance.cs | 85 + Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPartMain.cs | 0 110 files changed, 5,075 insertions(+), 5 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/10-IManufacturer/IManufacturer.cs b/BLL/HStation.BLL.Assets.Core/01-interface/10-IManufacturer/IManufacturer.cs new file mode 100644 index 0000000..0935daf --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/10-IManufacturer/IManufacturer.cs @@ -0,0 +1,16 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// + /// </summary> + public interface IManufacturer : IBaseCAL<AddManufacturerInput, UpdateManufacturerInput, ManufacturerDto> + { + /// <summary> + /// 鏇存柊鐘舵�� + /// </summary> + /// <returns></returns> + public Task<bool> UpdateUseStatus(long ID, int status); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs new file mode 100644 index 0000000..00f6716 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// + /// </summary> + public interface IManufacturerMapping : IBaseCAL<AddManufacturerMappingInput, UpdateManufacturerMappingInput, ManufacturerMappingDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/10-dbfirst/IAssetsDbFirstHelper.cs b/BLL/HStation.BLL.Assets.Core/01-interface/99-dbfirst/IAssetsDbFirstHelper.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/10-dbfirst/IAssetsDbFirstHelper.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/99-dbfirst/IAssetsDbFirstHelper.cs diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/10-Manufacturer/Manufacturer.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..6fe0e69 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,219 @@ +锘縰sing System.Collections.Generic; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class Manufacturer : IManufacturer + { + private readonly HStation.Service.Manufacturer _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<ManufacturerDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new ManufacturerDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<ManufacturerDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new ManufacturerDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<ManufacturerDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new ManufacturerDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddManufacturerInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddManufacturerInput, Model.Manufacturer>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddManufacturerInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddManufacturerInput, Model.Manufacturer>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddManufacturerInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateManufacturerInput input) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + + var rhs = new Model.Manufacturer(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateManufacturerInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateManufacturerInput, Model.Manufacturer>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 鏇存柊浣跨敤鐘舵�� + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int status) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{ID} 鏁版嵁涓嶅瓨鍦�"); + } + var bol = _service.UpdateUseStatus(ID, status); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateManufacturerInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Update + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByID(ID, out string msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); + } + return true; + }); + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鍒犻櫎鍏ㄩ儴 + /// </summary> + /// <returns></returns> + public async Task<bool> DeleteAll() + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/11-ManufacturerMapping/ManufacturerMapping.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/11-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..cc3ad29 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/11-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,202 @@ +锘縰sing System.Collections.Generic; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class ManufacturerMapping : IManufacturerMapping + { + private readonly HStation.Service.ManufacturerMapping _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<ManufacturerMappingDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new ManufacturerMappingDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<ManufacturerMappingDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new ManufacturerMappingDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<ManufacturerMappingDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new ManufacturerMappingDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddManufacturerMappingInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddManufacturerMappingInput, Model.ManufacturerMapping>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddManufacturerMappingInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddManufacturerMappingInput, Model.ManufacturerMapping>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddManufacturerMappingInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateManufacturerMappingInput input) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + + var rhs = new Model.ManufacturerMapping(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateManufacturerMappingInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateManufacturerMappingInput, Model.ManufacturerMapping>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateManufacturerMappingInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Update + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByID(ID, out string msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); + } + return true; + }); + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鍒犻櫎鍏ㄩ儴 + /// </summary> + /// <returns></returns> + public async Task<bool> DeleteAll() + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/10-dbfirst/XhsDbFirstHelper.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/99-dbfirst/XhsDbFirstHelper.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/03-localclient/10-dbfirst/XhsDbFirstHelper.cs rename to BLL/HStation.BLL.Assets.Core/03-localclient/99-dbfirst/XhsDbFirstHelper.cs diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer.cs b/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..6b7368b --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,132 @@ +锘縰sing HStation.Vmo; +using Yw.BLL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public partial class Manufacturer + { + private readonly HStation.CAL.IManufacturer _cal = CALCreateHelper.CreateCAL<HStation.CAL.IManufacturer>(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<ManufacturerVmo>> GetAll() + { + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<ManufacturerVmo> GetByID(long ID) + { + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<ManufacturerVmo>> GetByIds(List<long> Ids) + { + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(ManufacturerVmo vmo) + { + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<ManufacturerVmo> vmoList) + { + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(ManufacturerVmo vmo) + { + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; + } + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> UpdateUseStatus(long ID, int status) + { + var bol = await _cal.UpdateUseStatus(ID, status); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<ManufacturerVmo> vmoList) + { + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; + } + + #endregion Update + + #region Delete + + /// <summary> + /// 鍏ㄩ儴鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteAll() + { + var bol = await _cal.DeleteAll(); + return bol; + } + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) + { + var bol = await _cal.DeleteByID(ID); + return bol; + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByIds(List<long> Ids) + { + var bol = await _cal.DeleteByIds(Ids); + return bol; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer_Instance.cs new file mode 100644 index 0000000..82d2fca --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/10-Manufacturer/Manufacturer_Instance.cs @@ -0,0 +1,85 @@ +锘縰sing AutoMapper; + +namespace HStation.BLL +{ + public partial class Manufacturer + { + //dto to vmo + internal static HStation.Vmo.ManufacturerVmo Dto2Vmo(ManufacturerDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.Assets.ManufacturerDto, HStation.Vmo.ManufacturerVmo>() + ).CreateMapper(); + var vmo = mapper.Map<ManufacturerDto, HStation.Vmo.ManufacturerVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.ManufacturerVmo> Dto2Vmos(List<ManufacturerDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<ManufacturerDto, HStation.Vmo.ManufacturerVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<ManufacturerDto>, List<HStation.Vmo.ManufacturerVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.Assets.AddManufacturerInput Vmo2AddDto(HStation.Vmo.ManufacturerVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.AddManufacturerInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.AddManufacturerInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.Assets.AddManufacturerInput> Vmo2AddDtos(List<HStation.Vmo.ManufacturerVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.AddManufacturerInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.ManufacturerVmo>, List<HStation.Dto.Assets.AddManufacturerInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.Assets.UpdateManufacturerInput Vmo2UpdateDto(HStation.Vmo.ManufacturerVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.UpdateManufacturerInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.UpdateManufacturerInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.Assets.UpdateManufacturerInput> Vmo2UpdateDtos(List<HStation.Vmo.ManufacturerVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerVmo, HStation.Dto.Assets.UpdateManufacturerInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.ManufacturerVmo>, List<HStation.Dto.Assets.UpdateManufacturerInput>>(vmoList); + return dtoList; + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping.cs b/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..1feeb96 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,123 @@ +锘縰sing HStation.Vmo; +using Yw.BLL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public partial class ManufacturerMapping + { + private readonly HStation.CAL.IManufacturerMapping _cal = CALCreateHelper.CreateCAL<HStation.CAL.IManufacturerMapping>(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<ManufacturerMappingVmo>> GetAll() + { + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<ManufacturerMappingVmo> GetByID(long ID) + { + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<ManufacturerMappingVmo>> GetByIds(List<long> Ids) + { + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(ManufacturerMappingVmo vmo) + { + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<ManufacturerMappingVmo> vmoList) + { + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(ManufacturerMappingVmo vmo) + { + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<ManufacturerMappingVmo> vmoList) + { + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; + } + + #endregion Update + + #region Delete + + /// <summary> + /// 鍏ㄩ儴鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteAll() + { + var bol = await _cal.DeleteAll(); + return bol; + } + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) + { + var bol = await _cal.DeleteByID(ID); + return bol; + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByIds(List<long> Ids) + { + var bol = await _cal.DeleteByIds(Ids); + return bol; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping_Instance.cs new file mode 100644 index 0000000..037d63f --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/11-ManufacturerMapping/ManufacturerMapping_Instance.cs @@ -0,0 +1,85 @@ +锘縰sing AutoMapper; + +namespace HStation.BLL +{ + public partial class ManufacturerMapping + { + //dto to vmo + internal static HStation.Vmo.ManufacturerMappingVmo Dto2Vmo(ManufacturerMappingDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.Assets.ManufacturerMappingDto, HStation.Vmo.ManufacturerMappingVmo>() + ).CreateMapper(); + var vmo = mapper.Map<ManufacturerMappingDto, HStation.Vmo.ManufacturerMappingVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.ManufacturerMappingVmo> Dto2Vmos(List<ManufacturerMappingDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<ManufacturerMappingDto, HStation.Vmo.ManufacturerMappingVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<ManufacturerMappingDto>, List<HStation.Vmo.ManufacturerMappingVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.Assets.AddManufacturerMappingInput Vmo2AddDto(HStation.Vmo.ManufacturerMappingVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.ManufacturerMappingDto>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.AddManufacturerMappingInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.Assets.AddManufacturerMappingInput> Vmo2AddDtos(List<HStation.Vmo.ManufacturerMappingVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.AddManufacturerMappingInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.ManufacturerMappingVmo>, List<HStation.Dto.Assets.AddManufacturerMappingInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.Assets.UpdateManufacturerMappingInput Vmo2UpdateDto(HStation.Vmo.ManufacturerMappingVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.UpdateManufacturerMappingInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.UpdateManufacturerMappingInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.Assets.UpdateManufacturerMappingInput> Vmo2UpdateDtos(List<HStation.Vmo.ManufacturerMappingVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ManufacturerMappingVmo, HStation.Dto.Assets.UpdateManufacturerMappingInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.ManufacturerMappingVmo>, List<HStation.Dto.Assets.UpdateManufacturerMappingInput>>(vmoList); + return dtoList; + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/10-dbfirst/XhsDbFirstHelper.cs b/BLL/HStation.BLL.Assets.Core/04-bll/99-dbfirst/XhsDbFirstHelper.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/04-bll/10-dbfirst/XhsDbFirstHelper.cs rename to BLL/HStation.BLL.Assets.Core/04-bll/99-dbfirst/XhsDbFirstHelper.cs diff --git a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs index 0168c59..5d27ac2 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs +++ b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs @@ -335,6 +335,24 @@ } } }, + new TilePeekItem(){ + Caption="厂商管理", + SvgImage=svgImg32Model[9], + SvgImageSize=new Size(24,24), + Click=()=>{ + this.flyoutPanel1.HideBeakForm(); + var guid=new PageGuid(){ + Modular="Asstes", + MoudingType=eMoudingType.Tab, + Function="ManufacturerMainPanel", + }; + if(!IsExistPage(guid,true)) + { + var page=new ManufacturerMainPanel(); + CreatePage(page,guid); + } + } + }, new TilePeekItem(){ Caption="管道管理", SvgImage=svgImg32Model[9], diff --git a/Dto/HStation.Dto.Assets.Core/09-Manufacturer/AddManufacturerInput.cs b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/AddManufacturerInput.cs new file mode 100644 index 0000000..cc3f08b --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/AddManufacturerInput.cs @@ -0,0 +1,70 @@ +锘縰sing HStation.Assets; +using System.ComponentModel.DataAnnotations; +using Yw.Model; + +namespace HStation.Dto.Assets +{ + public class AddManufacturerInput + { + public AddManufacturerInput() + { } + + public AddManufacturerInput(Model.Manufacturer rhs) + { + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/09-Manufacturer/ManufacturerDto.cs b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/ManufacturerDto.cs new file mode 100644 index 0000000..aec579a --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/ManufacturerDto.cs @@ -0,0 +1,72 @@ +锘縰sing HStation.Assets; +using System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class ManufacturerDto + { + public ManufacturerDto() + { } + + public ManufacturerDto(Model.Manufacturer rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/09-Manufacturer/UpdateManufacturerInput.cs b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/UpdateManufacturerInput.cs new file mode 100644 index 0000000..d7bc9dc --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/09-Manufacturer/UpdateManufacturerInput.cs @@ -0,0 +1,58 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdateManufacturerInput + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/AddManufacturerMappingInput.cs b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/AddManufacturerMappingInput.cs new file mode 100644 index 0000000..d874b31 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/AddManufacturerMappingInput.cs @@ -0,0 +1,40 @@ +锘縰sing HStation.Assets; +using System.ComponentModel.DataAnnotations; +using Yw.Model; + +namespace HStation.Dto.Assets +{ + public class AddManufacturerMappingInput + { + public AddManufacturerMappingInput() + { } + + public AddManufacturerMappingInput(Model.ManufacturerMapping rhs) + { + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public eAsstesType AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/ManufacturerMappingDto.cs b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/ManufacturerMappingDto.cs new file mode 100644 index 0000000..d76d2cf --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/ManufacturerMappingDto.cs @@ -0,0 +1,41 @@ +锘縰sing HStation.Assets; + +namespace HStation.Dto.Assets +{ + public class ManufacturerMappingDto + { + public ManufacturerMappingDto() + { } + + public ManufacturerMappingDto(Model.ManufacturerMapping rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + public long ID { get; set; } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public eAsstesType AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/UpdateManufacturerMappingInput.cs b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/UpdateManufacturerMappingInput.cs new file mode 100644 index 0000000..ba44bc5 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/10-ManufacturerMapping/UpdateManufacturerMappingInput.cs @@ -0,0 +1,34 @@ +锘縰sing HStation.Assets; +using System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdateManufacturerMappingInput + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public eAsstesType AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/Yw.Dto.Division.Core/AddDivisionInput.cs b/Dto/Yw.Dto.Division.Core/AddDivisionInput.cs index acb0277..da4c3fe 100644 --- a/Dto/Yw.Dto.Division.Core/AddDivisionInput.cs +++ b/Dto/Yw.Dto.Division.Core/AddDivisionInput.cs @@ -8,6 +8,11 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> public List<long> ParentIds { get; set; } diff --git a/Dto/Yw.Dto.Division.Core/DivisionDto.cs b/Dto/Yw.Dto.Division.Core/DivisionDto.cs index d6f6064..b0e137b 100644 --- a/Dto/Yw.Dto.Division.Core/DivisionDto.cs +++ b/Dto/Yw.Dto.Division.Core/DivisionDto.cs @@ -17,6 +17,7 @@ this.TagName = rhs.TagName; this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; + this.CountryCode = rhs.CountryCode; this.Description = rhs.Description; } @@ -28,6 +29,11 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> public List<long> ParentIds { get; set; } diff --git a/Dto/Yw.Dto.Division.Core/UpdateDivisionInput.cs b/Dto/Yw.Dto.Division.Core/UpdateDivisionInput.cs index 08f40de..7b5a002 100644 --- a/Dto/Yw.Dto.Division.Core/UpdateDivisionInput.cs +++ b/Dto/Yw.Dto.Division.Core/UpdateDivisionInput.cs @@ -16,6 +16,11 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> public List<long> ParentIds { get; set; } diff --git "a/Service/HStation.Service.Assets.Core/00-core/eAdaptingType - \345\244\215\345\210\266.cs" "b/Service/HStation.Service.Assets.Core/00-core/eAdaptingType - \345\244\215\345\210\266.cs" new file mode 100644 index 0000000..7df9eff --- /dev/null +++ "b/Service/HStation.Service.Assets.Core/00-core/eAdaptingType - \345\244\215\345\210\266.cs" @@ -0,0 +1,31 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Assets +{ + public enum eAsstesType + { + /// <summary> + /// 寮ご + /// </summary> + [Display(Name = "寮ご")] + Elbow = 0, + + /// <summary> + /// 涓夐�� + /// </summary> + [Display(Name = "涓夐��")] + Tee = 1, + + /// <summary> + /// 鍥涢�� + /// </summary> + [Display(Name = "鍥涢��")] + Cross = 2, + + /// <summary> + /// 姘存车 + /// </summary> + [Display(Name = "姘存车")] + Pump = 3, + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/01-entity/AdaptingManage/AdaptingManage.cs b/Service/HStation.Service.Assets.Core/01-entity/01-AdaptingManage/AdaptingManage.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/AdaptingManage/AdaptingManage.cs rename to Service/HStation.Service.Assets.Core/01-entity/01-AdaptingManage/AdaptingManage.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ElbowManage/ElbowMain.cs b/Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ElbowManage/ElbowMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ElbowManage/ElbowSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ElbowManage/ElbowSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/02-ElbowManage/ElbowSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/FourLinkManage/FourLinkMain.cs b/Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/FourLinkManage/FourLinkMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/FourLinkManage/FourLinkSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/FourLinkManage/FourLinkSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/03-FourLinkManage/FourLinkSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/NozzleManage/NozzleMain.cs b/Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/NozzleManage/NozzleMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/NozzleManage/NozzleSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/NozzleManage/NozzleSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/04-NozzleManage/NozzleSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineCoarseCoefficient.cs b/Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineCoarseCoefficient.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineCoarseCoefficient.cs rename to Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineCoarseCoefficient.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineMain.cs b/Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PipeLineRoughnessCoefficient/PipeLineSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpGroup.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroup.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpGroup.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroup.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroupAndMainMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpGroupAndMainMap.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpMain.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMainAndPartMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpMainAndPartMap.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpMainAndPartMap.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpPartMain.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPartMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpPartMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPartMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpPropContent.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPropContent.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpPropContent.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpPropContent.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpType.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpType.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpType.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpType.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpTypeSeriesMap.cs b/Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpTypeSeriesMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/PumpMainManage/PumpTypeSeriesMap.cs rename to Service/HStation.Service.Assets.Core/01-entity/06-PumpMainManage/PumpTypeSeriesMap.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ThreeLinkManage/ThreeLinkMain.cs b/Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ThreeLinkManage/ThreeLinkMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ThreeLinkManage/ThreeLinkSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ThreeLinkManage/ThreeLinkSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/07-ThreeLinkManage/ThreeLinkSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveGroup.cs b/Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroup.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveGroup.cs rename to Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroup.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroupAndMainMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveGroupAndMainMap.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveMain.cs b/Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveMain.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/08-ValveManage/ValveSeries.cs diff --git a/Service/HStation.Service.Assets.Core/01-entity/09-Manufacturer/Manufacturer.cs b/Service/HStation.Service.Assets.Core/01-entity/09-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..65eff73 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/01-entity/09-Manufacturer/Manufacturer.cs @@ -0,0 +1,108 @@ +锘縰sing System.ComponentModel.DataAnnotations; +using Yw.Entity; + +namespace HStation.Entity +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class Manufacturer : BaseEntity, IFlags, ITagName, ISorter, IUseStatus, System.ICloneable + { + public Manufacturer() + { } + + public Manufacturer(Manufacturer rhs) : base(rhs) + { + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public void Reset(Manufacturer rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + [Display(Name = "鑱旂郴浜�")] + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + [Display(Name = "鑱旂郴鐢佃瘽")] + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + [Display(Name = "鍦板潃")] + public string Address { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + [Display(Name = "鏍囩")] + public string Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + [Display(Name = "鏍囩鍚嶇О")] + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + [Display(Name = "浣跨敤鐘舵��")] + public int UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public Manufacturer Clone() + { + return (Manufacturer)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/01-entity/10-ManufacturerMapping/ManufacturerMapping.cs b/Service/HStation.Service.Assets.Core/01-entity/10-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..37c69f5 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/01-entity/10-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,66 @@ +锘縰sing System.ComponentModel.DataAnnotations; +using Yw.Entity; + +namespace HStation.Entity +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class ManufacturerMapping : BaseEntity, System.ICloneable + { + public ManufacturerMapping() + { } + + public ManufacturerMapping(ManufacturerMapping rhs) : base(rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + public void Reset(ManufacturerMapping rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public int AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public Manufacturer Clone() + { + return (Manufacturer)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/02-model/AdaptingManage/AdaptingManage.cs b/Service/HStation.Service.Assets.Core/02-model/01-AdaptingManage/AdaptingManage.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/AdaptingManage/AdaptingManage.cs rename to Service/HStation.Service.Assets.Core/02-model/01-AdaptingManage/AdaptingManage.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ElbowManage/ElbowMain.cs b/Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ElbowManage/ElbowMain.cs rename to Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ElbowManage/ElbowSeries.cs b/Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ElbowManage/ElbowSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/02-ElbowManage/ElbowSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/FourLinkManage/FourLinkMain.cs b/Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/FourLinkManage/FourLinkMain.cs rename to Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/FourLinkManage/FourLinkSeries.cs b/Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/FourLinkManage/FourLinkSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/03-FourLinkManage/FourLinkSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/NozzleManage/NozzleMain.cs b/Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/NozzleManage/NozzleMain.cs rename to Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/NozzleManage/NozzleSeries.cs b/Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/NozzleManage/NozzleSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/04-NozzleManage/NozzleSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineMain.cs b/Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineMain.cs rename to Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs b/Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs rename to Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineRoughnessCoefficient.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineSeries.cs b/Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PipeLineRoughnessCoefficient/PipeLineSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/05-PipeLineRoughnessCoefficient/PipeLineSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpGroup.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroup.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpGroup.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroup.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroupAndMainMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpGroupAndMainMap.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpMain.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpMain.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMainAndPartMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpMainAndPartMap.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpMainAndPartMap.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpPartMain.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPartMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpPartMain.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPartMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpPropContent.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPropContent.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpPropContent.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpPropContent.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpSeries.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpType.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpType.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpType.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpType.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpTypeSeriesMap.cs b/Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpTypeSeriesMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/PumpMainManage/PumpTypeSeriesMap.cs rename to Service/HStation.Service.Assets.Core/02-model/06-PumpMainManage/PumpTypeSeriesMap.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ThreeLinkManage/ThreeLinkMain.cs b/Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ThreeLinkManage/ThreeLinkMain.cs rename to Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ThreeLinkManage/ThreeLinkSeries.cs b/Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ThreeLinkManage/ThreeLinkSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/07-ThreeLinkManage/ThreeLinkSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveGroup.cs b/Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroup.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveGroup.cs rename to Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroup.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroupAndMainMap.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveGroupAndMainMap.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveMain.cs b/Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveMain.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveMain.cs rename to Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveMain.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveSeries.cs b/Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveSeries.cs similarity index 100% rename from Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveSeries.cs rename to Service/HStation.Service.Assets.Core/02-model/08-ValveManage/ValveSeries.cs diff --git a/Service/HStation.Service.Assets.Core/02-model/09-Manufacturer/Manufacturer.cs b/Service/HStation.Service.Assets.Core/02-model/09-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..0de618b --- /dev/null +++ b/Service/HStation.Service.Assets.Core/02-model/09-Manufacturer/Manufacturer.cs @@ -0,0 +1,108 @@ +锘縰sing System.ComponentModel.DataAnnotations; +using Yw.Model; + +namespace HStation.Model +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class Manufacturer : BaseModel, ISorter, ITagName, IFlags, System.ICloneable + { + public Manufacturer() + { } + + public Manufacturer(Manufacturer rhs) : base(rhs) + { + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public void Reset(Manufacturer rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + [Display(Name = "鑱旂郴浜�")] + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + [Display(Name = "鑱旂郴鐢佃瘽")] + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + [Display(Name = "鍦板潃")] + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + [Display(Name = "鏍囩鍒楄〃")] + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + [Display(Name = "鏍囩鍚嶇О")] + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + [Display(Name = "浣跨敤鐘舵��")] + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public Manufacturer Clone() + { + return (Manufacturer)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/02-model/10-ManufacturerMapping/ManufacturerMapping.cs b/Service/HStation.Service.Assets.Core/02-model/10-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..e59a023 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/02-model/10-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,67 @@ +锘縰sing HStation.Assets; +using System.ComponentModel.DataAnnotations; +using Yw.Entity; +using Yw.Model; + +namespace HStation.Model +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class ManufacturerMapping : BaseModel, System.ICloneable + { + public ManufacturerMapping() + { } + + public ManufacturerMapping(ManufacturerMapping rhs) : base(rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + public void Reset(ManufacturerMapping rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public eAsstesType AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public Manufacturer Clone() + { + return (Manufacturer)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/10-IManufacturer/IManufacturer.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/10-IManufacturer/IManufacturer.cs new file mode 100644 index 0000000..5268186 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/01-interface/10-IManufacturer/IManufacturer.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.DAL; + +namespace HStation.DAL +{ + /// <summary> + /// + /// </summary> + public interface IManufacturer : IBaseDAL<Entity.Manufacturer>, IUpdateSorter, IUpdateUseStatus + { + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs new file mode 100644 index 0000000..1fc7e93 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/01-interface/11-IManufacturerMapping/IManufacturerMapping.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.DAL; + +namespace HStation.DAL +{ + /// <summary> + /// + /// </summary> + public interface IManufacturerMapping : IBaseDAL<Entity.ManufacturerMapping> + { + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/10-Manufacturer/Manufacturer.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..1e0ca65 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,19 @@ +锘縰sing Yw.DAL; +using Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class Manufacturer : BaseDAL_Flags_TagName_Sorter_UseStatus<Entity.Manufacturer>, IManufacturer + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.PostgreSqlConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/11-ManufacturerMapping/ManufacturerMapping.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/11-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..635bcb9 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/11-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class ManufacturerMapping : BaseDAL<Entity.ManufacturerMapping>, IManufacturerMapping + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.PostgreSqlConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/10-Manufacturer/Manufacturer.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..888997d --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.SQLite; + +namespace HStation.DAL.SQLite +{ + /// <summary> + /// + /// </summary> + public partial class Manufacturer : BaseDAL_Flags_TagName_Sorter_UseStatus<Entity.Manufacturer>, IManufacturer + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.SQLiteConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/11-ManufacturerMapping/ManufacturerMapping.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/11-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..215a340 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/11-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.SQLite; + +namespace HStation.DAL.SQLite +{ + /// <summary> + /// + /// </summary> + public partial class ManufacturerMapping : BaseDAL<Entity.ManufacturerMapping>, IManufacturerMapping + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.SQLiteConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs b/Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs index 8e7fc4e..5472001 100644 --- a/Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs +++ b/Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs @@ -61,6 +61,8 @@ typeof(Entity.PipeLineSeries), typeof(Entity.NozzleMain), typeof(Entity.NozzleSeries), + typeof(Entity.Manufacturer), + typeof(Entity.ManufacturerMapping), typeof(Entity.AdaptingManage), typeof(Entity.PipeLineRoughnessCoefficient), typeof(Entity.PumpTypeSeriesMap), diff --git a/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Cache/ManufacturerCacheHelper.cs b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Cache/ManufacturerCacheHelper.cs new file mode 100644 index 0000000..5b230cf --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Cache/ManufacturerCacheHelper.cs @@ -0,0 +1,71 @@ +锘縩amespace HStation.Service +{ + /// <summary> + /// PumpType + /// 缂撳瓨杈呭姪绫� + /// </summary> + internal class ManufacturerCacheHelper + { + private const string _contentKey = "Manufacturer"; + + internal static string GetCacheKey() + { + return CacheHelper.GetCacheKey(_contentKey); + } + + /// <summary> + /// 璁剧疆缂撳瓨 + /// </summary> + public static void Set(List<Model.Manufacturer> list, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 鑾峰彇缂撳瓨 + /// </summary> + /// <returns></returns> + public static List<Model.Manufacturer> Get() + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.Get<List<Model.Manufacturer>>(cacheKey); + } + + /// <summary> + /// 鑾峰彇璁剧疆缂撳瓨 + /// </summary> + public static List<Model.Manufacturer> GetSet(Func<List<Model.Manufacturer>> func, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 绉婚櫎缂撳瓨 + /// </summary> + public static void Remove() + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Remove(cacheKey); + } + + /// <summary> + /// 鍙戝竷 + /// </summary> + public static void Publish(string key) + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Set(key, cacheKey); + } + + /// <summary> + /// 瑙﹀彂 + /// </summary> + public static void Trigger() + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Trigger(cacheKey); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer.cs b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..13eb061 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,242 @@ +锘縩amespace HStation.Service +{ + /// <summary> + /// + /// </summary> + public partial class Manufacturer + { + #region Cache + + //鑾峰彇缂撳瓨 + private static List<Model.Manufacturer> GetCache() + { + var all = ManufacturerCacheHelper.GetSet(() => + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var entity_list = dal.GetAll(); + var model_list = Entity2Models(entity_list); + if (model_list == null) + { + model_list = new List<Model.Manufacturer>(); + } + return model_list; + }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); + return all; + } + + //閫氳繃 ID 鏇存柊缂撳瓨 + private static void UpdateCache(long ID) + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var entity_ds = dal.GetByID(ID); + var model_ds = Entity2Model(entity_ds); + var all = GetCache(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + all.Add(model_ds); + } + else + { + model.Reset(model_ds); + } + PumpSeriesCacheHelper.Trigger(); + } + + //閫氳繃 Ids 鏇存柊缂撳瓨 + private static void UpdateCache(List<long> Ids) + { + if (Ids == null || Ids.Count < 1) + { + return; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var entity_list = dal.GetByIds(Ids); + var model_list = Entity2Models(entity_list); + var all = GetCache(); + all.RemoveAll(x => Ids.Contains(x.ID)); + if (model_list != null && model_list.Count > 0) + { + all.AddRange(model_list); + } + PumpSeriesCacheHelper.Trigger(); + } + + //绉婚櫎缂撳瓨 + private static void RemoveCache(long ID) + { + var all = GetCache(); + all.RemoveAll(x => x.ID == ID); + PumpSeriesCacheHelper.Trigger(); + } + + /// <summary> + /// 鍙戝竷缂撳瓨 + /// </summary> + public static void PublishCache(string key) + { + PumpSeriesCacheHelper.Publish(key); + } + + #endregion Cache + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public List<Model.Manufacturer> GetAll() + { + var all = GetCache(); + return all; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public Model.Manufacturer GetByID(long ID) + { + var all = GetAll(); + return all.Find(x => x.ID == ID); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<Model.Manufacturer> GetByIds(List<long> Ids) + { + if (Ids == null || Ids.Count < 1) + { + return default; + } + var all = GetAll(); + return all.Where(x => Ids.Contains(x.ID)).ToList(); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉℃暟鎹� + /// </summary> + public long Insert(Model.Manufacturer model) + { + if (model == null) + { + return default; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var entity = Model2Entity(model); + var id = dal.Insert(entity); + if (id > 0) + { + UpdateCache(id); + } + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public bool Inserts(List<Model.Manufacturer> list) + { + if (list == null || list.Count < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var entity_list = Model2Entities(list); + var ids = dal.InsertsR(entity_list); + if (ids != null && ids.Count > 0) + { + UpdateCache(ids); + return true; + } + return false; + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public bool Update(Model.Manufacturer model) + { + if (model == null) + { + return false; + } + var entity = Model2Entity(model); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var bol = dal.Update(entity); + if (bol) + { + UpdateCache(model.ID); + } + return bol; + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public bool UpdateUseStatus(long id, int useStatus) + { + if (id < 1) + return false; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var bol = dal.UpdateUseStatus(id, useStatus); + if (bol) + { + UpdateCache(id); + } + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public bool Updates(List<Model.Manufacturer> list) + { + if (list == null || list.Count < 1) + { + return false; + } + if (list.Exists(x => x.ID < 1)) + { + return false; + } + var entity_list = Model2Entities(list); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var bol = dal.Updates(entity_list); + if (bol) + { + UpdateCache(list.Select(x => x.ID).ToList()); + } + return bol; + } + + #endregion Update + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public bool DeleteByID(long ID, out string Msg) + { + Msg = string.Empty; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturer>(); + var bol = dal.DeleteByID(ID); + if (bol) + { + RemoveCache(ID); + } + return bol; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer_Instance.cs b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer_Instance.cs new file mode 100644 index 0000000..2ebeb80 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/10-Manufacturer/Manufacturer_Instance.cs @@ -0,0 +1,62 @@ +锘縩amespace HStation.Service +{ + public partial class Manufacturer + { + //Entity to GetModel + internal static Model.Manufacturer Entity2Model(Entity.Manufacturer entity) + { + if (entity == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.Manufacturer, Model.Manufacturer>() + .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) + + ).CreateMapper(); + var model = mapper.Map<Entity.Manufacturer, Model.Manufacturer>(entity); + return model; + } + + //Entities to GetModels + internal static List<Model.Manufacturer> Entity2Models(List<Entity.Manufacturer> entities) + { + if (entities == null || entities.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.Manufacturer, Model.Manufacturer>() + .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) + ).CreateMapper(); + var models = mapper.Map<List<Entity.Manufacturer>, List<Model.Manufacturer>>(entities); + return models; + } + + //Model to Entity + internal static Entity.Manufacturer Model2Entity(Model.Manufacturer model) + { + if (model == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.Manufacturer, Entity.Manufacturer>() + ).CreateMapper(); + var entity = mapper.Map<Model.Manufacturer, Entity.Manufacturer>(model); + return entity; + } + + //Models to Entities + internal static List<Entity.Manufacturer> Model2Entities(List<Model.Manufacturer> models) + { + if (models == null || models.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.Manufacturer, Entity.Manufacturer>() + ).CreateMapper(); + var entities = mapper.Map<List<Model.Manufacturer>, List<Entity.Manufacturer>>(models); + return entities; + } + + //Model to Entity + internal static void Model2Entity(Model.Manufacturer model, Entity.Manufacturer entity) + { + if (model == null || entity == null) + return; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.Manufacturer, Entity.Manufacturer>() + ).CreateMapper(); + mapper.Map(model, entity); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Cache/ManufacturerCacheHelper.cs b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Cache/ManufacturerCacheHelper.cs new file mode 100644 index 0000000..e768ae3 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Cache/ManufacturerCacheHelper.cs @@ -0,0 +1,71 @@ +锘縩amespace HStation.Service +{ + /// <summary> + /// PumpType + /// 缂撳瓨杈呭姪绫� + /// </summary> + internal class ManufacturerMappingCacheHelper + { + private const string _contentKey = "ManufacturerMapping"; + + internal static string GetCacheKey() + { + return CacheHelper.GetCacheKey(_contentKey); + } + + /// <summary> + /// 璁剧疆缂撳瓨 + /// </summary> + public static void Set(List<Model.ManufacturerMapping> list, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 鑾峰彇缂撳瓨 + /// </summary> + /// <returns></returns> + public static List<Model.ManufacturerMapping> Get() + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.Get<List<Model.ManufacturerMapping>>(cacheKey); + } + + /// <summary> + /// 鑾峰彇璁剧疆缂撳瓨 + /// </summary> + public static List<Model.ManufacturerMapping> GetSet(Func<List<Model.ManufacturerMapping>> func, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 绉婚櫎缂撳瓨 + /// </summary> + public static void Remove() + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Remove(cacheKey); + } + + /// <summary> + /// 鍙戝竷 + /// </summary> + public static void Publish(string key) + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Set(key, cacheKey); + } + + /// <summary> + /// 瑙﹀彂 + /// </summary> + public static void Trigger() + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Trigger(cacheKey); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer.cs b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer.cs new file mode 100644 index 0000000..cb56b47 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer.cs @@ -0,0 +1,228 @@ +锘縰sing HStation.Assets; + +namespace HStation.Service +{ + /// <summary> + /// + /// </summary> + public partial class ManufacturerMapping + { + #region Cache + + //鑾峰彇缂撳瓨 + private static List<Model.ManufacturerMapping> GetCache() + { + var all = ManufacturerMappingCacheHelper.GetSet(() => + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var entity_list = dal.GetAll(); + var model_list = Entity2Models(entity_list); + if (model_list == null) + { + model_list = new List<Model.ManufacturerMapping>(); + } + return model_list; + }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); + return all; + } + + //閫氳繃 ID 鏇存柊缂撳瓨 + private static void UpdateCache(long ID) + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var entity_ds = dal.GetByID(ID); + var model_ds = Entity2Model(entity_ds); + var all = GetCache(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + all.Add(model_ds); + } + else + { + model.Reset(model_ds); + } + PumpSeriesCacheHelper.Trigger(); + } + + //閫氳繃 Ids 鏇存柊缂撳瓨 + private static void UpdateCache(List<long> Ids) + { + if (Ids == null || Ids.Count < 1) + { + return; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var entity_list = dal.GetByIds(Ids); + var model_list = Entity2Models(entity_list); + var all = GetCache(); + all.RemoveAll(x => Ids.Contains(x.ID)); + if (model_list != null && model_list.Count > 0) + { + all.AddRange(model_list); + } + PumpSeriesCacheHelper.Trigger(); + } + + //绉婚櫎缂撳瓨 + private static void RemoveCache(long ID) + { + var all = GetCache(); + all.RemoveAll(x => x.ID == ID); + PumpSeriesCacheHelper.Trigger(); + } + + /// <summary> + /// 鍙戝竷缂撳瓨 + /// </summary> + public static void PublishCache(string key) + { + PumpSeriesCacheHelper.Publish(key); + } + + #endregion Cache + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public List<Model.ManufacturerMapping> GetAll() + { + var all = GetCache(); + return all; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public Model.ManufacturerMapping GetByID(long ID) + { + var all = GetAll(); + return all.Find(x => x.ID == ID); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<Model.ManufacturerMapping> GetByIds(List<long> Ids) + { + if (Ids == null || Ids.Count < 1) + { + return default; + } + var all = GetAll(); + return all.Where(x => Ids.Contains(x.ID)).ToList(); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉℃暟鎹� + /// </summary> + public long Insert(Model.ManufacturerMapping model) + { + if (model == null) + { + return default; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var entity = Model2Entity(model); + var id = dal.Insert(entity); + if (id > 0) + { + UpdateCache(id); + } + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public bool Inserts(List<Model.ManufacturerMapping> list) + { + if (list == null || list.Count < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var entity_list = Model2Entities(list); + var ids = dal.InsertsR(entity_list); + if (ids != null && ids.Count > 0) + { + UpdateCache(ids); + return true; + } + return false; + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public bool Update(Model.ManufacturerMapping model) + { + if (model == null) + { + return false; + } + var entity = Model2Entity(model); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var bol = dal.Update(entity); + if (bol) + { + UpdateCache(model.ID); + } + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public bool Updates(List<Model.ManufacturerMapping> list) + { + if (list == null || list.Count < 1) + { + return false; + } + if (list.Exists(x => x.ID < 1)) + { + return false; + } + var entity_list = Model2Entities(list); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var bol = dal.Updates(entity_list); + if (bol) + { + UpdateCache(list.Select(x => x.ID).ToList()); + } + return bol; + } + + #endregion Update + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public bool DeleteByID(long ID, out string Msg) + { + Msg = string.Empty; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IManufacturerMapping>(); + var bol = dal.DeleteByID(ID); + if (bol) + { + RemoveCache(ID); + } + return bol; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer_Instance.cs b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer_Instance.cs new file mode 100644 index 0000000..4e97ae9 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/11-ManufacturerMapping/Manufacturer_Instance.cs @@ -0,0 +1,59 @@ +锘縩amespace HStation.Service +{ + public partial class ManufacturerMapping + { + //Entity to GetModel + internal static Model.ManufacturerMapping Entity2Model(Entity.ManufacturerMapping entity) + { + if (entity == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.ManufacturerMapping, Model.ManufacturerMapping>() + ).CreateMapper(); + var model = mapper.Map<Entity.ManufacturerMapping, Model.ManufacturerMapping>(entity); + return model; + } + + //Entities to GetModels + internal static List<Model.ManufacturerMapping> Entity2Models(List<Entity.ManufacturerMapping> entities) + { + if (entities == null || entities.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.ManufacturerMapping, Model.ManufacturerMapping>() + ).CreateMapper(); + var models = mapper.Map<List<Entity.ManufacturerMapping>, List<Model.ManufacturerMapping>>(entities); + return models; + } + + //Model to Entity + internal static Entity.ManufacturerMapping Model2Entity(Model.ManufacturerMapping model) + { + if (model == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.ManufacturerMapping, Entity.ManufacturerMapping>() + ).CreateMapper(); + var entity = mapper.Map<Model.ManufacturerMapping, Entity.ManufacturerMapping>(model); + return entity; + } + + //Models to Entities + internal static List<Entity.ManufacturerMapping> Model2Entities(List<Model.ManufacturerMapping> models) + { + if (models == null || models.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.ManufacturerMapping, Entity.ManufacturerMapping>() + ).CreateMapper(); + var entities = mapper.Map<List<Model.ManufacturerMapping>, List<Entity.ManufacturerMapping>>(models); + return entities; + } + + //Model to Entity + internal static void Model2Entity(Model.ManufacturerMapping model, Entity.ManufacturerMapping entity) + { + if (model == null || entity == null) + return; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.ManufacturerMapping, Entity.ManufacturerMapping>() + ).CreateMapper(); + mapper.Map(model, entity); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj b/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj index d3f91f3..cdc59c5 100644 --- a/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj +++ b/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj @@ -19,10 +19,10 @@ </ItemGroup> <ItemGroup> - <Compile Remove="01-entity\ValveManage\ValveGroup.cs" /> - <Compile Remove="01-entity\ValveManage\ValveGroupAndMainMap.cs" /> - <Compile Remove="02-model\ValveManage\ValveGroup.cs" /> - <Compile Remove="02-model\ValveManage\ValveGroupAndMainMap.cs" /> + <Compile Remove="01-entity\08-ValveManage\ValveGroup.cs" /> + <Compile Remove="01-entity\08-ValveManage\ValveGroupAndMainMap.cs" /> + <Compile Remove="02-model\08-ValveManage\ValveGroup.cs" /> + <Compile Remove="02-model\08-ValveManage\ValveGroupAndMainMap.cs" /> <Compile Remove="04-dal\01-interface\03-IValveManage\IValveGroup.cs" /> <Compile Remove="04-dal\01-interface\03-IValveManage\IValveGroupAndMainMap.cs" /> <Compile Remove="04-dal\02-postgresql\02-ValveManage\ValveGroup.cs" /> diff --git a/Service/Yw.Service.Division.Core/01-entity/Division.cs b/Service/Yw.Service.Division.Core/01-entity/Division.cs index e9767da..bcc1d8a 100644 --- a/Service/Yw.Service.Division.Core/01-entity/Division.cs +++ b/Service/Yw.Service.Division.Core/01-entity/Division.cs @@ -1,4 +1,5 @@ -锘縰sing Yw.Entity; +锘縰sing System.Diagnostics.Metrics; +using Yw.Entity; namespace Yw.Entity { @@ -9,6 +10,9 @@ [SugarTable("assets_basic_division")] public class Division : BaseEntity, ISorter, IFlags, ITagName, ITreeSorter, System.ICloneable { + /// <summary> + /// + /// </summary> public Division() { } @@ -23,6 +27,7 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.CountryCode = rhs.CountryCode; } /// <summary> @@ -31,6 +36,11 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> public string ParentIds { get; set; } diff --git a/Service/Yw.Service.Division.Core/02-model/Division.cs b/Service/Yw.Service.Division.Core/02-model/Division.cs index 2f1051b..496f64d 100644 --- a/Service/Yw.Service.Division.Core/02-model/Division.cs +++ b/Service/Yw.Service.Division.Core/02-model/Division.cs @@ -23,6 +23,7 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.CountryCode = rhs.CountryCode; } public void Reset(Division rhs) @@ -37,6 +38,7 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.CountryCode = rhs.CountryCode; } /// <summary> @@ -46,6 +48,12 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + [Display(Name = "鍥藉缂栫爜")] + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> [Display(Name = "鐖剁骇ID鍒楄〃")] diff --git a/Vmo/HStation.Vmo.Assets.Core/10-Manufacturer/Manufacturer.cs b/Vmo/HStation.Vmo.Assets.Core/10-Manufacturer/Manufacturer.cs new file mode 100644 index 0000000..e14d498 --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/10-Manufacturer/Manufacturer.cs @@ -0,0 +1,84 @@ +锘縰sing System.ComponentModel.DataAnnotations; +using Yw.Model; + +namespace HStation.Vmo +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class ManufacturerVmo + { + public ManufacturerVmo() + { } + + public ManufacturerVmo(ManufacturerVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + [Display(Name = "鑱旂郴浜�")] + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + [Display(Name = "鑱旂郴鐢佃瘽")] + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + [Display(Name = "鍦板潃")] + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + [Display(Name = "鏍囩鍒楄〃")] + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + [Display(Name = "鏍囩鍚嶇О")] + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + [Display(Name = "浣跨敤鐘舵��")] + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/11-ManufacturerMapping/ManufacturerMapping.cs b/Vmo/HStation.Vmo.Assets.Core/11-ManufacturerMapping/ManufacturerMapping.cs new file mode 100644 index 0000000..491d048 --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/11-ManufacturerMapping/ManufacturerMapping.cs @@ -0,0 +1,44 @@ +锘縰sing HStation.Assets; + +namespace HStation.Vmo +{ + /// <summary> + /// 鍘傚晢 + /// </summary> + public class ManufacturerMappingVmo + { + public ManufacturerMappingVmo() + { } + + public ManufacturerMappingVmo(ManufacturerMappingVmo rhs) + { + this.ID = rhs.ID; + this.ManufactuerID = rhs.ManufactuerID; + this.SeriesID = rhs.SeriesID; + this.AssetsType = rhs.AssetsType; + this.Description = rhs.Description; + } + + public long ID { get; set; } + + /// <summary> + /// 鍘傚晢ID + /// </summary> + public long ManufactuerID { get; set; } + + /// <summary> + /// 绯诲垪ID + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 璧勪骇绫诲瀷 + /// </summary> + public eAsstesType AssetsType { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/Yw.Vmo.Division.Core/DivisionVmo.cs b/Vmo/Yw.Vmo.Division.Core/DivisionVmo.cs index d2bcf2d..b65e933 100644 --- a/Vmo/Yw.Vmo.Division.Core/DivisionVmo.cs +++ b/Vmo/Yw.Vmo.Division.Core/DivisionVmo.cs @@ -14,6 +14,7 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.CountryCode = rhs.CountryCode; } public long ID { get; set; } @@ -24,6 +25,11 @@ public string Name { get; set; } /// <summary> + /// 鍥藉缂栫爜 + /// </summary> + public string CountryCode { get; set; } + + /// <summary> /// 鐖剁骇ID鍒楄〃 /// </summary> public List<long> ParentIds { get; set; } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.cs new file mode 100644 index 0000000..275077e --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.cs @@ -0,0 +1,62 @@ +锘縰sing DevExpress.XtraEditors; + +namespace HStation.WinFrmUI +{ + /// <summary> + /// 璁剧疆浣跨敤鐘舵�� + /// </summary> + public partial class SetUseStatusDlg : XtraForm + { + public SetUseStatusDlg() + { + InitializeComponent(); + this.layoutControl1.SetupLayoutControl(); + } + + /// <summary> + /// 鍥炶皟鍑芥暟 + /// </summary> + public event Func<Yw.Model.eUseStatus, Task<bool>> ReloadDataEvent; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(Yw.Model.eUseStatus UseStatus) + { + switch (UseStatus) + { + case Yw.Model.eUseStatus.Enable: this.radioGroup1.SelectedIndex = 1; break; + case Yw.Model.eUseStatus.Disable: this.radioGroup1.SelectedIndex = 0; break; + default: break; + } + } + + //纭畾 + + private async void btnOk_Click(object sender, EventArgs e) + { + var status = Yw.Model.eUseStatus.Enable; + if (this.radioGroup1.SelectedIndex == 0) + status = Yw.Model.eUseStatus.Disable; + else if (this.radioGroup1.SelectedIndex == 1) + status = Yw.Model.eUseStatus.Enable; + + if (this.ReloadDataEvent != null) + { + var result = await this.ReloadDataEvent.Invoke(status); + if (result) + { + XtraMessageBox.Show("鏇存柊鎴愬姛锛�"); + } + else + { + XtraMessageBox.Show("鏇存柊澶辫触锛�"); + return; + } + } + + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.designer.cs new file mode 100644 index 0000000..d550e28 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.designer.cs @@ -0,0 +1,203 @@ +锘縩amespace HStation .WinFrmUI +{ + partial class SetUseStatusDlg + { + /// <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() + { + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.radioGroup1 = new DevExpress.XtraEditors.RadioGroup(); + this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); + this.btnOk = new DevExpress.XtraEditors.SimpleButton(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + this.SuspendLayout(); + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.radioGroup1); + this.layoutControl1.Controls.Add(this.btnCancel); + this.layoutControl1.Controls.Add(this.btnOk); + 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, 3, 4, 3); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(668, 0, 650, 400); + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(411, 134); + this.layoutControl1.TabIndex = 1; + this.layoutControl1.Text = "layoutControl1"; + // + // radioGroup1 + // + this.radioGroup1.EditValue = 0; + this.radioGroup1.Location = new System.Drawing.Point(131, 12); + this.radioGroup1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.radioGroup1.Name = "radioGroup1"; + this.radioGroup1.Properties.AllowFocused = false; + this.radioGroup1.Properties.Appearance.BackColor = System.Drawing.Color.Transparent; + this.radioGroup1.Properties.Appearance.Options.UseBackColor = true; + this.radioGroup1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + this.radioGroup1.Properties.GlyphAlignment = DevExpress.Utils.HorzAlignment.Default; + this.radioGroup1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { + new DevExpress.XtraEditors.Controls.RadioGroupItem(0, "鏃犳晥"), + new DevExpress.XtraEditors.Controls.RadioGroupItem(1, "鏈夋晥")}); + this.radioGroup1.Size = new System.Drawing.Size(268, 74); + this.radioGroup1.StyleController = this.layoutControl1; + this.radioGroup1.TabIndex = 6; + // + // btnCancel + // + this.btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + this.btnCancel.Appearance.Options.UseBackColor = true; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(305, 90); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(94, 32); + this.btnCancel.StyleController = this.layoutControl1; + this.btnCancel.TabIndex = 5; + this.btnCancel.Text = "鍙栨秷"; + // + // btnOk + // + this.btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + this.btnOk.Appearance.Options.UseBackColor = true; + this.btnOk.Location = new System.Drawing.Point(207, 90); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(94, 32); + this.btnOk.StyleController = this.layoutControl1; + this.btnOk.TabIndex = 4; + this.btnOk.Text = "纭畾"; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.emptySpaceItem1, + this.layoutControlItem3, + this.emptySpaceItem2}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(411, 134); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.btnOk; + this.layoutControlItem1.Location = new System.Drawing.Point(195, 78); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(98, 36); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.btnCancel; + this.layoutControlItem2.Location = new System.Drawing.Point(293, 78); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(98, 36); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 78); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(195, 36); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.radioGroup1; + this.layoutControlItem3.Location = new System.Drawing.Point(119, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(272, 78); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(0, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(119, 78); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // SetUseStatusDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(411, 134); + this.Controls.Add(this.layoutControl1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.Name = "SetUseStatusDlg"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = " 璁剧疆浣跨敤鐘舵��"; + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.SimpleButton btnOk; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraEditors.RadioGroup radioGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-core/SetUseStatusDlg.resx @@ -0,0 +1,120 @@ +锘�<?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> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.cs new file mode 100644 index 0000000..7ce7b21 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.cs @@ -0,0 +1,83 @@ +锘縩amespace HStation.WinFrmUI +{ + public partial class AddManufacturerDlg : DevExpress.XtraEditors.XtraForm + { + public AddManufacturerDlg() + { + InitializeComponent(); + this.dataLayoutControl1.SetupLayoutControl(); + } + + /// <summary> + /// 鍥炶皟浜嬩欢 + /// </summary> + public event Func<Vmo.ManufacturerVmo, Task<bool>> ReloadDataEvent; + + /// <summary> + /// 楠岃瘉璇嗗埆鐮佹槸鍚﹀瓨鍦ㄤ簨浠� + /// </summary> + public event Func<string, bool> VerifyTagNameExistEvent; + + private Vmo.ManufacturerVmo _model = null; + + /// <summary> + /// 缁戝畾 + /// </summary> + public void SetBindingData() + { + _model = new Vmo.ManufacturerVmo(); + } + + //楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.NameTextEdit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + return false; + } + + var tagName = this.TagNameTextEdit.Text.Trim(); + if (!string.IsNullOrEmpty(tagName)) + { + if (VerifyTagNameExistEvent != null) + { + if (VerifyTagNameExistEvent(tagName)) + { + this.dxErrorProvider1.SetError(this.TagNameTextEdit, "閲嶅"); + return false; + } + } + } + + return true; + } + + //纭畾 + private async void btnOk_Click(object sender, EventArgs e) + { + if (_model == null) + return; + if (!Valid()) + return; + _model.Name = this.NameTextEdit.Text.Trim(); + _model.Contacter = this.ContacterTextEdit.Text.Trim(); + _model.Telephone = this.TelephoneTextEdit.Text.Trim(); + _model.Address = this.AddressTextEdit.Text.Trim(); + _model.TagName = this.TagNameTextEdit.Text.Trim(); + _model.Description = this.DescriptionTextEdit.Text.Trim(); + _model.UseStatus = Yw.Model.eUseStatus.Enable; + if (this.ReloadDataEvent == null) + return; + if (!await this.ReloadDataEvent(_model)) + { + MessageBoxHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛锛�"); + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.designer.cs new file mode 100644 index 0000000..e71072c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.designer.cs @@ -0,0 +1,332 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AddManufacturerDlg + { + /// <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() + { + components = new System.ComponentModel.Container(); + dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + btnOk = new DevExpress.XtraEditors.SimpleButton(); + btnCancel = new DevExpress.XtraEditors.SimpleButton(); + NameTextEdit = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + TagNameTextEdit = new DevExpress.XtraEditors.TextEdit(); + ContacterTextEdit = new DevExpress.XtraEditors.TextEdit(); + TelephoneTextEdit = new DevExpress.XtraEditors.TextEdit(); + AddressTextEdit = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + ItemForName = new DevExpress.XtraLayout.LayoutControlItem(); + ItemForDescription = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ItemForTagName = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)dataLayoutControl1).BeginInit(); + dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ContacterTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TelephoneTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)AddressTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForName).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForDescription).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForTagName).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // dataLayoutControl1 + // + dataLayoutControl1.Controls.Add(btnOk); + dataLayoutControl1.Controls.Add(btnCancel); + dataLayoutControl1.Controls.Add(NameTextEdit); + dataLayoutControl1.Controls.Add(DescriptionTextEdit); + dataLayoutControl1.Controls.Add(TagNameTextEdit); + dataLayoutControl1.Controls.Add(ContacterTextEdit); + dataLayoutControl1.Controls.Add(TelephoneTextEdit); + dataLayoutControl1.Controls.Add(AddressTextEdit); + dataLayoutControl1.Dock = DockStyle.Fill; + dataLayoutControl1.Location = new Point(0, 0); + dataLayoutControl1.Name = "dataLayoutControl1"; + dataLayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(900, 230, 650, 400); + dataLayoutControl1.Root = Root; + dataLayoutControl1.Size = new Size(349, 256); + dataLayoutControl1.TabIndex = 0; + dataLayoutControl1.Text = "dataLayoutControl1"; + // + // btnOk + // + btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + btnOk.Appearance.Options.UseBackColor = true; + btnOk.Location = new Point(199, 222); + btnOk.Name = "btnOk"; + btnOk.Size = new Size(67, 22); + btnOk.StyleController = dataLayoutControl1; + btnOk.TabIndex = 7; + btnOk.Text = "纭畾"; + btnOk.Click += btnOk_Click; + // + // btnCancel + // + btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + btnCancel.Appearance.Options.UseBackColor = true; + btnCancel.DialogResult = DialogResult.Cancel; + btnCancel.Location = new Point(270, 222); + btnCancel.Name = "btnCancel"; + btnCancel.Size = new Size(67, 22); + btnCancel.StyleController = dataLayoutControl1; + btnCancel.TabIndex = 8; + btnCancel.Text = "鍙栨秷"; + // + // NameTextEdit + // + NameTextEdit.Location = new Point(76, 12); + NameTextEdit.Name = "NameTextEdit"; + NameTextEdit.Size = new Size(261, 20); + NameTextEdit.StyleController = dataLayoutControl1; + NameTextEdit.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(76, 132); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(261, 86); + DescriptionTextEdit.StyleController = dataLayoutControl1; + DescriptionTextEdit.TabIndex = 6; + // + // TagNameTextEdit + // + TagNameTextEdit.Location = new Point(76, 108); + TagNameTextEdit.Name = "TagNameTextEdit"; + TagNameTextEdit.Size = new Size(261, 20); + TagNameTextEdit.StyleController = dataLayoutControl1; + TagNameTextEdit.TabIndex = 4; + // + // ContacterTextEdit + // + ContacterTextEdit.Location = new Point(76, 36); + ContacterTextEdit.Margin = new Padding(2); + ContacterTextEdit.Name = "ContacterTextEdit"; + ContacterTextEdit.Size = new Size(261, 20); + ContacterTextEdit.StyleController = dataLayoutControl1; + ContacterTextEdit.TabIndex = 10; + // + // TelephoneTextEdit + // + TelephoneTextEdit.Location = new Point(76, 60); + TelephoneTextEdit.Margin = new Padding(2); + TelephoneTextEdit.Name = "TelephoneTextEdit"; + TelephoneTextEdit.Size = new Size(261, 20); + TelephoneTextEdit.StyleController = dataLayoutControl1; + TelephoneTextEdit.TabIndex = 11; + // + // AddressTextEdit + // + AddressTextEdit.Location = new Point(76, 84); + AddressTextEdit.Margin = new Padding(2); + AddressTextEdit.Name = "AddressTextEdit"; + AddressTextEdit.Size = new Size(261, 20); + AddressTextEdit.StyleController = dataLayoutControl1; + AddressTextEdit.TabIndex = 12; + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); + Root.Name = "Root"; + Root.Size = new Size(349, 256); + Root.TextVisible = false; + // + // layoutControlGroup1 + // + layoutControlGroup1.AllowDrawBackground = false; + layoutControlGroup1.GroupBordersVisible = false; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { ItemForName, ItemForDescription, layoutControlItem1, layoutControlItem2, emptySpaceItem1, layoutControlItem4, ItemForTagName, layoutControlItem5, layoutControlItem6 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "autoGeneratedGroup0"; + layoutControlGroup1.Size = new Size(329, 236); + // + // ItemForName + // + ItemForName.AllowHtmlStringInCaption = true; + ItemForName.Control = NameTextEdit; + ItemForName.Location = new Point(0, 0); + ItemForName.Name = "ItemForName"; + ItemForName.Size = new Size(329, 24); + ItemForName.Text = "<color=red>*</color>鍚嶇О:"; + ItemForName.TextSize = new Size(52, 14); + // + // ItemForDescription + // + ItemForDescription.Control = DescriptionTextEdit; + ItemForDescription.Location = new Point(0, 120); + ItemForDescription.Name = "ItemForDescription"; + ItemForDescription.Size = new Size(329, 90); + ItemForDescription.Text = "璇存槑:"; + ItemForDescription.TextSize = new Size(52, 14); + // + // layoutControlItem1 + // + layoutControlItem1.Control = btnCancel; + layoutControlItem1.Location = new Point(258, 210); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(71, 26); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = btnOk; + layoutControlItem2.Location = new Point(187, 210); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(71, 26); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 210); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(187, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem4 + // + layoutControlItem4.Control = ContacterTextEdit; + layoutControlItem4.Location = new Point(0, 24); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(329, 24); + layoutControlItem4.Text = "鑱旂郴浜�:"; + layoutControlItem4.TextSize = new Size(52, 14); + // + // ItemForTagName + // + ItemForTagName.AppearanceItemCaption.Options.UseTextOptions = true; + ItemForTagName.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + ItemForTagName.Control = TagNameTextEdit; + ItemForTagName.Location = new Point(0, 96); + ItemForTagName.Name = "ItemForTagName"; + ItemForTagName.Size = new Size(329, 24); + ItemForTagName.Text = "鏍囩鍚嶇О:"; + ItemForTagName.TextSize = new Size(52, 14); + // + // layoutControlItem5 + // + layoutControlItem5.Control = TelephoneTextEdit; + layoutControlItem5.Location = new Point(0, 48); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(329, 24); + layoutControlItem5.Text = "鐢佃瘽:"; + layoutControlItem5.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = AddressTextEdit; + layoutControlItem6.Location = new Point(0, 72); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(329, 24); + layoutControlItem6.Text = "鍦板潃:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // AddManufacturerDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(349, 256); + Controls.Add(dataLayoutControl1); + Name = "AddManufacturerDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((System.ComponentModel.ISupportInitialize)dataLayoutControl1).EndInit(); + dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)ContacterTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TelephoneTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)AddressTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForName).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForDescription).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForTagName).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraEditors.SimpleButton btnOk; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem ItemForName; + private DevExpress.XtraLayout.LayoutControlItem ItemForDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem ItemForTagName; + private DevExpress.XtraEditors.TextEdit ContacterTextEdit; + private DevExpress.XtraEditors.TextEdit TelephoneTextEdit; + private DevExpress.XtraEditors.TextEdit AddressTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.resx new file mode 100644 index 0000000..d438392 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/AddSupplierDlg.resx @@ -0,0 +1,123 @@ +锘�<?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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.cs new file mode 100644 index 0000000..9a28d59 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.cs @@ -0,0 +1,95 @@ +锘縰sing HStation.Vmo; +using HStation.WinFrmUI.Assets; + +namespace HStation.WinFrmUI +{ + public partial class EditManufacturerDlg : DevExpress.XtraEditors.XtraForm + { + public EditManufacturerDlg() + { + InitializeComponent(); + this.dataLayoutControl1.SetupLayoutControl(); + } + + /// <summary> + /// 鍥炶皟浜嬩欢 + /// </summary> + public event Func<Vmo.ManufacturerVmo, Task<bool>> ReloadDataEvent; + + /// <summary> + /// 楠岃瘉璇嗗埆鐮佹槸鍚﹀瓨鍦ㄤ簨浠� + /// </summary> + public event Func<string, long, bool> VerifyTagNameExistEvent; + + private Vmo.ManufacturerVmo _model = null; + + /// <summary> + /// 缁戝畾 + /// </summary> + public void SetBindingData(ManufacturerVmo model) + { + _model = new Vmo.ManufacturerVmo(model); + this.NameTextEdit.EditValue = _model.Name; + this.ContacterTextEdit.EditValue = _model.Contacter; + this.TelephoneTextEdit.EditValue = _model.Telephone; + this.AddressTextEdit.EditValue = _model.Address; + this.TagNameTextEdit.EditValue = _model.TagName; + this.DescriptionTextEdit.EditValue = _model.Description; + } + + //楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.NameTextEdit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + return false; + } + + var tagName = this.TagNameTextEdit.Text.Trim(); + if (!string.IsNullOrEmpty(tagName)) + { + if (_model.TagName != tagName) + { + if (VerifyTagNameExistEvent != null) + { + if (VerifyTagNameExistEvent(tagName, _model.ID)) + { + this.dxErrorProvider1.SetError(this.TagNameTextEdit, "閲嶅"); + return false; + } + } + } + } + + return true; + } + + //纭畾 + private async void btnOk_Click(object sender, EventArgs e) + { + if (_model == null) + return; + if (!Valid()) + return; + _model.Name = this.NameTextEdit.Text.Trim(); + _model.Contacter = this.ContacterTextEdit.Text.Trim(); + _model.Telephone = this.TelephoneTextEdit.Text.Trim(); + _model.Address = this.AddressTextEdit.Text.Trim(); + _model.Description = this.DescriptionTextEdit.Text.Trim(); + _model.TagName = this.TagNameTextEdit.Text.Trim(); + + if (this.ReloadDataEvent == null) + return; + if (!await this.ReloadDataEvent(_model)) + { + MessageBoxHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + MessageBoxHelper.ShowSuccess("鏇存柊鎴愬姛锛�"); + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.designer.cs new file mode 100644 index 0000000..e4cc4dd --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.designer.cs @@ -0,0 +1,340 @@ +锘縰sing DevExpress.XtraEditors; + +namespace HStation.WinFrmUI +{ + partial class EditManufacturerDlg + { + /// <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() + { + components = new System.ComponentModel.Container(); + dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + btnOk = new SimpleButton(); + btnCancel = new SimpleButton(); + NameTextEdit = new TextEdit(); + DescriptionTextEdit = new MemoEdit(); + TagNameTextEdit = new TextEdit(); + ContacterTextEdit = new TextEdit(); + TelephoneTextEdit = new TextEdit(); + AddressTextEdit = new TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + ItemForName = new DevExpress.XtraLayout.LayoutControlItem(); + ItemForDescription = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + ItemForTagName = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)dataLayoutControl1).BeginInit(); + dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ContacterTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TelephoneTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)AddressTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForName).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForDescription).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)ItemForTagName).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // dataLayoutControl1 + // + dataLayoutControl1.Controls.Add(btnOk); + dataLayoutControl1.Controls.Add(btnCancel); + dataLayoutControl1.Controls.Add(NameTextEdit); + dataLayoutControl1.Controls.Add(DescriptionTextEdit); + dataLayoutControl1.Controls.Add(TagNameTextEdit); + dataLayoutControl1.Controls.Add(ContacterTextEdit); + dataLayoutControl1.Controls.Add(TelephoneTextEdit); + dataLayoutControl1.Controls.Add(AddressTextEdit); + dataLayoutControl1.Dock = DockStyle.Fill; + dataLayoutControl1.Location = new Point(0, 0); + dataLayoutControl1.Name = "dataLayoutControl1"; + dataLayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(900, 230, 650, 400); + dataLayoutControl1.Root = Root; + dataLayoutControl1.Size = new Size(349, 256); + dataLayoutControl1.TabIndex = 0; + dataLayoutControl1.Text = "dataLayoutControl1"; + // + // btnOk + // + btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + btnOk.Appearance.Options.UseBackColor = true; + btnOk.Location = new Point(199, 227); + btnOk.Name = "btnOk"; + btnOk.Size = new Size(70, 22); + btnOk.StyleController = dataLayoutControl1; + btnOk.TabIndex = 7; + btnOk.Text = "纭畾"; + btnOk.Click += btnOk_Click; + // + // btnCancel + // + btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + btnCancel.Appearance.Options.UseBackColor = true; + btnCancel.DialogResult = DialogResult.Cancel; + btnCancel.Location = new Point(271, 227); + btnCancel.Name = "btnCancel"; + btnCancel.Size = new Size(70, 22); + btnCancel.StyleController = dataLayoutControl1; + btnCancel.TabIndex = 8; + btnCancel.Text = "鍙栨秷"; + // + // NameTextEdit + // + NameTextEdit.Location = new Point(68, 7); + NameTextEdit.Name = "NameTextEdit"; + NameTextEdit.Size = new Size(273, 20); + NameTextEdit.StyleController = dataLayoutControl1; + NameTextEdit.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(68, 117); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(273, 108); + DescriptionTextEdit.StyleController = dataLayoutControl1; + DescriptionTextEdit.TabIndex = 6; + // + // TagNameTextEdit + // + TagNameTextEdit.Location = new Point(68, 95); + TagNameTextEdit.Name = "TagNameTextEdit"; + TagNameTextEdit.Size = new Size(273, 20); + TagNameTextEdit.StyleController = dataLayoutControl1; + TagNameTextEdit.TabIndex = 4; + // + // ContacterTextEdit + // + ContacterTextEdit.Location = new Point(68, 29); + ContacterTextEdit.Margin = new Padding(2, 2, 2, 2); + ContacterTextEdit.Name = "ContacterTextEdit"; + ContacterTextEdit.Size = new Size(273, 20); + ContacterTextEdit.StyleController = dataLayoutControl1; + ContacterTextEdit.TabIndex = 10; + // + // TelephoneTextEdit + // + TelephoneTextEdit.Location = new Point(68, 51); + TelephoneTextEdit.Margin = new Padding(2, 2, 2, 2); + TelephoneTextEdit.Name = "TelephoneTextEdit"; + TelephoneTextEdit.Size = new Size(273, 20); + TelephoneTextEdit.StyleController = dataLayoutControl1; + TelephoneTextEdit.TabIndex = 11; + // + // AddressTextEdit + // + AddressTextEdit.Location = new Point(68, 73); + AddressTextEdit.Margin = new Padding(2, 2, 2, 2); + AddressTextEdit.Name = "AddressTextEdit"; + AddressTextEdit.Size = new Size(273, 20); + AddressTextEdit.StyleController = dataLayoutControl1; + AddressTextEdit.TabIndex = 12; + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); + Root.Name = "Root"; + Root.Size = new Size(349, 256); + Root.TextVisible = false; + // + // layoutControlGroup1 + // + layoutControlGroup1.AllowDrawBackground = false; + layoutControlGroup1.GroupBordersVisible = false; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { ItemForName, ItemForDescription, layoutControlItem1, layoutControlItem2, emptySpaceItem1, ItemForTagName, layoutControlItem6, layoutControlItem7, layoutControlItem8 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "autoGeneratedGroup0"; + layoutControlGroup1.Size = new Size(335, 244); + // + // ItemForName + // + ItemForName.AllowHtmlStringInCaption = true; + ItemForName.Control = NameTextEdit; + ItemForName.Location = new Point(0, 0); + ItemForName.Name = "ItemForName"; + ItemForName.Size = new Size(335, 22); + ItemForName.Text = "<color=red>*</color>鍚嶇О:"; + ItemForName.TextSize = new Size(52, 14); + // + // ItemForDescription + // + ItemForDescription.Control = DescriptionTextEdit; + ItemForDescription.Location = new Point(0, 110); + ItemForDescription.Name = "ItemForDescription"; + ItemForDescription.Size = new Size(335, 110); + ItemForDescription.Text = "璇存槑:"; + ItemForDescription.TextSize = new Size(52, 14); + // + // layoutControlItem1 + // + layoutControlItem1.Control = btnCancel; + layoutControlItem1.Location = new Point(263, 220); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(72, 24); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = btnOk; + layoutControlItem2.Location = new Point(191, 220); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(72, 24); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 220); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(191, 24); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // ItemForTagName + // + ItemForTagName.AppearanceItemCaption.Options.UseTextOptions = true; + ItemForTagName.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + ItemForTagName.Control = TagNameTextEdit; + ItemForTagName.Location = new Point(0, 88); + ItemForTagName.Name = "ItemForTagName"; + ItemForTagName.Size = new Size(335, 22); + ItemForTagName.Text = "鏍囩鍚嶇О:"; + ItemForTagName.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = ContacterTextEdit; + layoutControlItem6.ControlAlignment = ContentAlignment.TopLeft; + layoutControlItem6.CustomizationFormText = "鑱旂郴浜�:"; + layoutControlItem6.Location = new Point(0, 22); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(335, 22); + layoutControlItem6.Text = "鑱旂郴浜�:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // layoutControlItem7 + // + layoutControlItem7.Control = TelephoneTextEdit; + layoutControlItem7.ControlAlignment = ContentAlignment.TopLeft; + layoutControlItem7.CustomizationFormText = "鐢佃瘽:"; + layoutControlItem7.Location = new Point(0, 44); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(335, 22); + layoutControlItem7.Text = "鐢佃瘽:"; + layoutControlItem7.TextSize = new Size(52, 14); + // + // layoutControlItem8 + // + layoutControlItem8.Control = AddressTextEdit; + layoutControlItem8.ControlAlignment = ContentAlignment.TopLeft; + layoutControlItem8.CustomizationFormText = "鍦板潃:"; + layoutControlItem8.Location = new Point(0, 66); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(335, 22); + layoutControlItem8.Text = "鍦板潃:"; + layoutControlItem8.TextSize = new Size(52, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // EditManufacturerDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(349, 256); + Controls.Add(dataLayoutControl1); + Name = "EditManufacturerDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((System.ComponentModel.ISupportInitialize)dataLayoutControl1).EndInit(); + dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)ContacterTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TelephoneTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)AddressTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForName).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForDescription).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)ItemForTagName).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraEditors.SimpleButton btnOk; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem ItemForName; + private DevExpress.XtraLayout.LayoutControlItem ItemForDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem ItemForTagName; + private TextEdit ContacterTextEdit; + private TextEdit TelephoneTextEdit; + private TextEdit AddressTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.resx new file mode 100644 index 0000000..d438392 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/EditSupplierDlg.resx @@ -0,0 +1,123 @@ +锘�<?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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.cs new file mode 100644 index 0000000..1c6ec08 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.cs @@ -0,0 +1,234 @@ +锘縰sing HStation.WinFrmUI.Assets; + +namespace HStation.WinFrmUI +{ + public partial class ManufacturerMainPanel : DocumentPage + { + public ManufacturerMainPanel() + { + InitializeComponent(); + this.PageTitle.Caption = "鍘傚晢绠$悊"; + this.gridView1.SetNormalView(); + } + + private BLL.Manufacturer _bll = new BLL.Manufacturer(); + private List<ManufacurerViewModel> _allBindingList = null; + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public override void InitialDataSource() + { + SetBindingData(); + } + + /// <summary> + ///缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData() + { + _allBindingList = new List<ManufacurerViewModel>(); + var list = await _bll.GetAll(); + if (list != null && list.Count > 0) + { + foreach (var item in list) + { + var vm = new ManufacurerViewModel(item); + _allBindingList.Add(vm); + } + } + this.manufacurerViewModelBindingSource.DataSource = _allBindingList; + this.gridView1.SetNormalView(); + } + + #region 浜嬩欢 + + /// <summary> + /// 娣诲姞 + /// </summary> + private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (_allBindingList == null) + return; + var dlg = new AddManufacturerDlg(); + dlg.SetBindingData(); + dlg.ReloadDataEvent += async (rhs) => + { + rhs.SortCode = _allBindingList.Count == 0 ? 1 : _allBindingList.Max(x => x.SortCode) + 1; + rhs.ID = await _bll.Insert(rhs); + if (rhs.ID > 0) + { + var vm = new ManufacurerViewModel(rhs); + _allBindingList.Add(vm); + this.manufacurerViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog(); + } + + /// <summary> + /// 缂栬緫 + /// </summary> + private async void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + + var dlg = new EditManufacturerDlg(); + var model = await _bll.GetByID(vm.ID); + if (model == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + dlg.SetBindingData(model); + dlg.ReloadDataEvent += async (rhs) => + { + var bol = await _bll.Update(rhs); + if (bol) + { + vm.Reset(rhs); + this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); + } + return bol; + }; + dlg.ShowDialog(); + } + + /// <summary> + /// 鍒犻櫎 + /// </summary> + private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + return; + if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?")) + return; + var result = await new BLL.Manufacturer().DeleteByID(vm.ID); + + if (result) + { + MessageBoxHelper.ShowSuccess($"鍒犻櫎鎴愬姛!"); + } + else + MessageBoxHelper.ShowSuccess($"鍒犻櫎澶辫触!"); + _allBindingList.Remove(vm); + this.manufacurerViewModelBindingSource.ResetBindings(false); + } + + /// <summary> + /// 璇︽儏 + /// </summary> + private void barBtnDetail_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + MessageBoxHelper.ShowInfo("寰呰ˉ鍏�"); + } + + /* + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + private void barBtnUpdateTagName_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowInfo("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + var dlg = new SetTagNameDlg(); + dlg.SetBindingData(vm.TagName); + dlg.ReloadDataEvent += (tagName) => + { + var result = _bll.UpdateTagName(vm.ID, tagName); + if (result) + { + vm.TagName = tagName; + this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); + } + return result; + }; + dlg.ShowDialog(); + }*/ + + /* /// <summary> + /// 鎺掑簭鐮� + /// </summary> + private void barBtnUpdateSortCode_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowInfo("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + var dlg = new SetSortCodeDlg(); + dlg.SetBindingData(vm.SortCode); + dlg.ReloadDataEvent += (sortCode) => + { + var result = _bll.UpdateSortCode(vm.ID, sortCode); + if (result) + { + vm.SortCode = sortCode; + this.currentViewModelBindingSource.ResetBindings(false); + } + return result; + }; + dlg.ShowDialog(); + }*/ + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + private void barBtnUpdateUseStatus_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + var dlg = new SetUseStatusDlg(); + dlg.SetBindingData(vm.UseStatus); + dlg.ReloadDataEvent += async (useStatus) => + { + var result = await _bll.UpdateUseStatus(vm.ID, (int)useStatus); + if (result) + { + vm.UseStatus = useStatus; + this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); + } + return result; + }; + dlg.ShowDialog(); + } + + /// <summary> + /// 妫�绱� + /// </summary> + private void barCekSearch_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (this.gridView1.IsFindPanelVisible) + this.gridView1.HideFindPanel(); + else + this.gridView1.ShowFindPanel(); + } + + /// <summary> + /// 鍒锋柊鏁版嵁 + /// </summary> + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetBindingData(); + } + + #endregion 浜嬩欢 + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.designer.cs new file mode 100644 index 0000000..1bf7bc8 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.designer.cs @@ -0,0 +1,303 @@ +锘縰sing DevExpress.XtraGrid.Views.Grid; +using System.ComponentModel; + +namespace HStation.WinFrmUI +{ + partial class ManufacturerMainPanel + { + /// <summary> + /// Required designer variable. + /// </summary> + private 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 Component 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() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(ManufacturerMainPanel)); + ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); + barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); + barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + barBtnUpdateSortCode = new DevExpress.XtraBars.BarButtonItem(); + barBtnDetail = new DevExpress.XtraBars.BarButtonItem(); + barBtnUpdateTagName = new DevExpress.XtraBars.BarButtonItem(); + barBtnUpdateUseStatus = new DevExpress.XtraBars.BarButtonItem(); + barCekSearch = new DevExpress.XtraBars.BarCheckItem(); + ribbonPage = new DevExpress.XtraBars.Ribbon.RibbonPage(); + ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + gridControl1 = new DevExpress.XtraGrid.GridControl(); + manufacurerViewModelBindingSource = new BindingSource(components); + gridView1 = new GridView(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + colContacter = new DevExpress.XtraGrid.Columns.GridColumn(); + colTelephone = new DevExpress.XtraGrid.Columns.GridColumn(); + colAddress = new DevExpress.XtraGrid.Columns.GridColumn(); + colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); + colUseStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + currentViewModelBindingSource = new BindingSource(components); + ((ISupportInitialize)ribbonControl1).BeginInit(); + ((ISupportInitialize)gridControl1).BeginInit(); + ((ISupportInitialize)manufacurerViewModelBindingSource).BeginInit(); + ((ISupportInitialize)gridView1).BeginInit(); + ((ISupportInitialize)currentViewModelBindingSource).BeginInit(); + SuspendLayout(); + // + // ribbonControl1 + // + ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ExpandCollapseItem.Id = 0; + ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnUpdateSortCode, barBtnDetail, barBtnUpdateTagName, barBtnUpdateUseStatus, barCekSearch }); + ribbonControl1.Location = new Point(0, 0); + ribbonControl1.MaxItemId = 27; + ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); + ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; + ribbonControl1.Size = new Size(818, 77); + ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barBtnAdd + // + barBtnAdd.Caption = "娣诲姞"; + barBtnAdd.Id = 16; + barBtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAdd.ImageOptions.SvgImage"); + barBtnAdd.Name = "barBtnAdd"; + barBtnAdd.ItemClick += barBtnAdd_ItemClick; + // + // barBtnEdit + // + barBtnEdit.Caption = "缂栬緫"; + barBtnEdit.Id = 17; + barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); + barBtnEdit.Name = "barBtnEdit"; + barBtnEdit.ItemClick += barBtnEdit_ItemClick; + // + // barBtnRefresh + // + barBtnRefresh.Caption = "鍒锋柊"; + barBtnRefresh.Id = 18; + barBtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnRefresh.ImageOptions.SvgImage"); + barBtnRefresh.Name = "barBtnRefresh"; + barBtnRefresh.ItemClick += barBtnRefresh_ItemClick; + // + // barBtnDelete + // + barBtnDelete.Caption = "鍒犻櫎"; + barBtnDelete.Id = 19; + barBtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDelete.ImageOptions.SvgImage"); + barBtnDelete.Name = "barBtnDelete"; + barBtnDelete.ItemClick += barBtnDelete_ItemClick; + // + // barBtnUpdateSortCode + // + barBtnUpdateSortCode.Caption = "鎺掑簭鐮�"; + barBtnUpdateSortCode.Id = 20; + barBtnUpdateSortCode.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUpdateSortCode.ImageOptions.SvgImage"); + barBtnUpdateSortCode.Name = "barBtnUpdateSortCode"; + barBtnUpdateSortCode.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + // + // barBtnDetail + // + barBtnDetail.Caption = "璇︽儏"; + barBtnDetail.Id = 22; + barBtnDetail.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDetail.ImageOptions.SvgImage"); + barBtnDetail.Name = "barBtnDetail"; + barBtnDetail.ItemClick += barBtnDetail_ItemClick; + // + // barBtnUpdateTagName + // + barBtnUpdateTagName.Caption = "鏍囩鍚嶇О"; + barBtnUpdateTagName.Id = 23; + barBtnUpdateTagName.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUpdateTagName.ImageOptions.SvgImage"); + barBtnUpdateTagName.Name = "barBtnUpdateTagName"; + barBtnUpdateTagName.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + // + // barBtnUpdateUseStatus + // + barBtnUpdateUseStatus.Caption = "浣跨敤鐘舵��"; + barBtnUpdateUseStatus.Id = 24; + barBtnUpdateUseStatus.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUpdateUseStatus.ImageOptions.SvgImage"); + barBtnUpdateUseStatus.Name = "barBtnUpdateUseStatus"; + barBtnUpdateUseStatus.ItemClick += barBtnUpdateUseStatus_ItemClick; + // + // barCekSearch + // + barCekSearch.Caption = "妫�绱�"; + barCekSearch.Id = 25; + barCekSearch.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCekSearch.ImageOptions.SvgImage"); + barCekSearch.Name = "barCekSearch"; + barCekSearch.CheckedChanged += barCekSearch_CheckedChanged; + // + // ribbonPage + // + ribbonPage.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); + ribbonPage.Name = "ribbonPage"; + ribbonPage.Text = "鍩虹鎿嶄綔"; + // + // ribbonPageGroup1 + // + ribbonPageGroup1.ItemLinks.Add(barBtnAdd); + ribbonPageGroup1.ItemLinks.Add(barBtnEdit); + ribbonPageGroup1.ItemLinks.Add(barBtnDelete); + ribbonPageGroup1.ItemLinks.Add(barBtnDetail); + ribbonPageGroup1.ItemLinks.Add(barBtnUpdateTagName, true); + ribbonPageGroup1.ItemLinks.Add(barBtnUpdateSortCode); + ribbonPageGroup1.ItemLinks.Add(barBtnUpdateUseStatus); + ribbonPageGroup1.ItemLinks.Add(barCekSearch); + ribbonPageGroup1.ItemLinks.Add(barBtnRefresh); + ribbonPageGroup1.Name = "ribbonPageGroup1"; + ribbonPageGroup1.Text = "鍩虹"; + // + // gridControl1 + // + gridControl1.DataSource = manufacurerViewModelBindingSource; + gridControl1.Dock = DockStyle.Fill; + gridControl1.EmbeddedNavigator.Margin = new Padding(2); + gridControl1.Location = new Point(0, 77); + gridControl1.MainView = gridView1; + gridControl1.Margin = new Padding(2); + gridControl1.MenuManager = ribbonControl1; + gridControl1.Name = "gridControl1"; + gridControl1.Size = new Size(818, 604); + gridControl1.TabIndex = 22; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // manufacurerViewModelBindingSource + // + manufacurerViewModelBindingSource.DataSource = typeof(Assets.ManufacurerViewModel); + // + // gridView1 + // + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colContacter, colTelephone, colAddress, colTagName, colUseStatus, colSortCode, colDescription }); + gridView1.DetailHeight = 223; + gridView1.GridControl = gridControl1; + gridView1.Name = "gridView1"; + gridView1.OptionsEditForm.PopupEditFormWidth = 560; + gridView1.OptionsView.ShowGroupPanel = false; + // + // colName + // + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + // + // colContacter + // + colContacter.FieldName = "Contacter"; + colContacter.Name = "colContacter"; + colContacter.Visible = true; + colContacter.VisibleIndex = 1; + // + // colTelephone + // + colTelephone.FieldName = "Telephone"; + colTelephone.Name = "colTelephone"; + colTelephone.Visible = true; + colTelephone.VisibleIndex = 2; + // + // colAddress + // + colAddress.FieldName = "Address"; + colAddress.Name = "colAddress"; + colAddress.Visible = true; + colAddress.VisibleIndex = 3; + // + // colTagName + // + colTagName.FieldName = "TagName"; + colTagName.Name = "colTagName"; + colTagName.Visible = true; + colTagName.VisibleIndex = 4; + // + // colUseStatus + // + colUseStatus.FieldName = "UseStatus"; + colUseStatus.Name = "colUseStatus"; + colUseStatus.Visible = true; + colUseStatus.VisibleIndex = 5; + // + // colSortCode + // + colSortCode.FieldName = "SortCode"; + colSortCode.Name = "colSortCode"; + colSortCode.Visible = true; + colSortCode.VisibleIndex = 6; + // + // colDescription + // + colDescription.FieldName = "Description"; + colDescription.Name = "colDescription"; + colDescription.Visible = true; + colDescription.VisibleIndex = 7; + // + // ManufacturerMainPanel + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(gridControl1); + Controls.Add(ribbonControl1); + Name = "ManufacturerMainPanel"; + Size = new Size(818, 681); + ((ISupportInitialize)ribbonControl1).EndInit(); + ((ISupportInitialize)gridControl1).EndInit(); + ((ISupportInitialize)manufacurerViewModelBindingSource).EndInit(); + ((ISupportInitialize)gridView1).EndInit(); + ((ISupportInitialize)currentViewModelBindingSource).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.BarButtonItem barBtnAdd; + private DevExpress.XtraBars.BarButtonItem barBtnEdit; + private DevExpress.XtraBars.BarButtonItem barBtnRefresh; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private DevExpress.XtraBars.BarButtonItem barBtnUpdateSortCode; + private DevExpress.XtraBars.BarButtonItem barBtnDetail; + private DevExpress.XtraBars.BarButtonItem barBtnUpdateTagName; + private DevExpress.XtraBars.BarButtonItem barBtnUpdateUseStatus; + private DevExpress.XtraBars.BarCheckItem barCekSearch; + private DevExpress.XtraGrid.GridControl gridControl1; + private BindingSource currentViewModelBindingSource; + private GridView gridView1; + private BindingSource manufacurerViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colContacter; + private DevExpress.XtraGrid.Columns.GridColumn colTelephone; + private DevExpress.XtraGrid.Columns.GridColumn colAddress; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; + private DevExpress.XtraGrid.Columns.GridColumn colUseStatus; + private DevExpress.XtraGrid.Columns.GridColumn colSortCode; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.resx new file mode 100644 index 0000000..5704196 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacturerMainPanel.resx @@ -0,0 +1,339 @@ +锘�<?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="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barBtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnEdit.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 + cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog + TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu + OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt + MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 + LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw + LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x + NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 + LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu + MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu + NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw + YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu + NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy + NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnRefresh.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAC4DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IlJlZnJlc2hfMV8iPg0KICAgIDxwYXRoIGQ9Ik0yNC41 + LDcuNUMyMi4zLDUuMywxOS4zLDQsMTYsNEMxMC4xLDQsNS4xLDguMyw0LjIsMTRoNC4xYzAuOS0zLjQs + NC02LDcuNy02YzIuMiwwLDQuMiwwLjksNS42LDIuNEwxOCwxNCAgIGg1LjdoNC4xSDI4VjRMMjQuNSw3 + LjV6IiBjbGFzcz0iR3JlZW4iIC8+DQogICAgPHBhdGggZD0iTTE2LjIsMjRjLTIuMiwwLTQuMi0wLjkt + NS42LTIuNGwzLjYtMy42SDguNEg0LjRINC4ydjEwbDMuNS0zLjVjMi4yLDIuMiw1LjIsMy41LDguNSwz + LjUgICBDMjIuMSwyOCwyNywyMy43LDI4LDE4aC00LjFDMjMsMjEuNCwxOS45LDI0LDE2LjIsMjR6IiBj + bGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD4DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku + WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4 + N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk + aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTE4LjgsMTZsOC45 + LTguOWMwLjQtMC40LDAuNC0xLDAtMS40bC0xLjQtMS40Yy0wLjQtMC40LTEtMC40LTEuNCwwTDE2LDEz + LjJMNy4xLDQuM2MtMC40LTAuNC0xLTAuNC0xLjQsMCAgTDQuMyw1LjdjLTAuNCwwLjQtMC40LDEsMCwx + LjRsOC45LDguOWwtOC45LDguOWMtMC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSww + LjQsMS40LDBsOC45LTguOWw4LjksOC45ICBjMC40LDAuNCwxLDAuNCwxLjQsMGwxLjQtMS40YzAuNC0w + LjQsMC40LTEsMC0xLjRMMTguOCwxNnoiIGNsYXNzPSJSZWQiIC8+DQo8L3N2Zz4L +</value> + </data> + <data name="barBtnUpdateSortCode.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHUDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iR3JpZFNvcnRB + c2NlbmRpbmciPg0KICAgIDxwYXRoIGQ9Ik0yOCwxNGgtMC4yaC0xLjloLTAuMXYtMC4xTDI1LjIsMTJo + LTQuNGwtMC42LDEuOVYxNGgtMC4xaC0xLjlIMThsMC4xLTAuMkwyMiwyLjFWMmgwLjFIMjRoMC4xdjAu + MWwzLjgsMTEuNyAgIEwyOCwxNEwyOCwxNHogTTIxLjQsMTBoMy4yTDIzLDQuN2MwLDAsMCwwLDAtMC4x + YzAsMCwwLDAsMCwwLjFMMjEuNCwxMHoiIGNsYXNzPSJSZWQiIC8+DQogICAgPHBhdGggZD0iTTI3LjQs + MjhoLTAuMmgtOC41aC0wLjJ2LTAuMVYyN2w1LjktOWgtNS4ySDE5di0wLjF2LTEuOFYxNmgwLjJoOC4x + aDAuMnYwLjFWMTdsLTUuOSw5aDUuNmgwLjJ2MC4xdjEuOFYyOHogICAgTTEwLDI0VjJIOHYyMkg0bDUs + NWw1LTVIMTB6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnDetail.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnUpdateTagName.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIICAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkxhYmVsIj4NCiAgICA8cGF0aCBkPSJNMjksOEgxMGwt + OCw4bDgsOGgxOWMwLjUsMCwxLTAuNSwxLTFWOUMzMCw4LjUsMjkuNSw4LDI5LDh6IE0xMCwxOGMtMS4x + LDAtMi0wLjktMi0yYzAtMS4xLDAuOS0yLDItMiAgIHMyLDAuOSwyLDJDMTIsMTcuMSwxMS4xLDE4LDEw + LDE4eiIgY2xhc3M9IlllbGxvdyIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnUpdateUseStatus.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMgFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk + aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp + c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41 + O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7 + ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp + c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJVc2VyIj4NCiAgICA8 + cGF0aCBkPSJNMTYuMiwyNkgydi0xLjVjMC03LjUsNS43LTUsOC04LjVjMC44LDEuNSwyLjEsNCw0LDRz + My4yLTIuNSw0LTRjMC43LDEsMS43LDEuNSwyLjcsMS45bDAsMCAgIGMtMC41LDAuOS0wLjcsMi0wLjcs + My4xYzAsMC40LDAsMC43LDAuMSwxLjFMMTYuMiwyNkwxNi4yLDI2eiBNOS4zLDEwLjljMCwwLDAsMC4x + LDAsMC4yYzAuNiwyLjMsMiw0LjksNC43LDQuOXM0LjItMi42LDQuNy00LjkgICBWMTFjMSwwLjEsMC42 + LTEuMSwwLjktMS42QzE5LjgsOC45LDIwLDguNSwxOS45LDhjLTAuMS0wLjQtMC40LTAuNC0wLjUtMC4z + QzIxLjIsMi44LDE4LjMsMywxOC4zLDNTMTgsMCwxMi44LDBDOCwwLDcuNCw0LDguNSw3LjYgICBDOC40 + LDcuNiw4LjEsNy43LDgsNy45QzcuOSw4LjQsOC4yLDguOCw4LjQsOS4zQzguNiw5LjgsOC4zLDExLDku + MywxMC45eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0yNywxNmMtMi44LDAtNSwyLjIt + NSw1YzAsMC42LDAuMSwxLjIsMC4zLDEuN0wxNiwyOXYzaDR2LTJoMnYtMmgybDIuMS0yLjFDMjYuNCwy + NiwyNi43LDI2LDI3LDI2ICAgYzIuOCwwLDUtMi4yLDUtNVMyOS44LDE2LDI3LDE2eiBNMjcsMjJjLTAu + NiwwLTEtMC40LTEtMWMwLTAuNiwwLjQtMSwxLTFzMSwwLjQsMSwxQzI4LDIxLjYsMjcuNiwyMiwyNywy + MnoiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barCekSearch.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFQEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRW5hYmxlU2Vh + cmNoIj4NCiAgICA8cGF0aCBkPSJNMTQuNSwxNy44QzEwLjgsMTcuMSw4LDEzLjksOCwxMGMwLTQuNCwz + LjYtOCw4LThzOCwzLjYsOCw4YzAsMS41LTAuNCwyLjgtMS4xLDRjMCwwLDAuMSwwLDAuMSwwICAgYzAu + NywwLDEuNCwwLjEsMi4xLDAuMmMwLjYtMS4zLDAuOS0yLjcsMC45LTQuMmMwLTUuNS00LjUtMTAtMTAt + MTBDMTAuNSwwLDYsNC41LDYsMTBjMCwyLjEsMC43LDQuMSwxLjgsNS43bC03LjUsNy42ICAgYy0wLjQs + MC4zLTAuNCwwLjksMCwxLjNsMS4yLDEuMmMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsNy42LTcuNmMwLjks + MC42LDEuOSwxLjEsMi45LDEuNEMxMy42LDE5LDE0LDE4LjQsMTQuNSwxNy44eiIgY2xhc3M9IkJsdWUi + IC8+DQogICAgPHBhdGggZD0iTTIzLDE2Yy00LjQsMC04LjEsMy05LDdjMC45LDQsNC42LDcsOSw3YzQu + NCwwLDguMS0zLDktN0MzMS4xLDE5LDI3LjQsMTYsMjMsMTZ6IE0yMywyOGMtMy4zLDAtNi4xLTItNy01 + ICAgYzAuOS0zLDMuNy01LDctNXM2LjEsMiw3LDVDMjkuMSwyNiwyNi4zLDI4LDIzLDI4eiBNMjMsMjZj + LTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNzMywxLjMsMywzUzI0LjcsMjYsMjMsMjZ6IiBjbGFzcz0i + QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <metadata name="manufacurerViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>262, 17</value> + </metadata> + <metadata name="currentViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>75</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacurerViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacurerViewModel.cs new file mode 100644 index 0000000..39a032f --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/09-Manufacturer/ManufacurerViewModel.cs @@ -0,0 +1,107 @@ +锘縰sing System.ComponentModel; + +namespace HStation.WinFrmUI.Assets +{ + public class ManufacurerViewModel + { + public ManufacurerViewModel() + { + } + + public ManufacurerViewModel(Vmo.ManufacturerVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public void Reset(Vmo.ManufacturerVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Contacter = rhs.Contacter; + this.Telephone = rhs.Telephone; + this.Address = rhs.Address; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [DisplayName("鍚嶇О")] + [Browsable(true)] + public string Name { get; set; } + + /// <summary> + /// 鑱旂郴浜� + /// </summary> + [DisplayName("鑱旂郴浜�")] + [Browsable(true)] + public string Contacter { get; set; } + + /// <summary> + /// 鑱旂郴鐢佃瘽 + /// </summary> + [DisplayName("鑱旂郴鐢佃瘽")] + [Browsable(true)] + public string Telephone { get; set; } + + /// <summary> + /// 鍦板潃 + /// </summary> + [DisplayName("鍦板潃")] + [Browsable(true)] + public string Address { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + [DisplayName("鏍囩鍒楄〃")] + [Browsable(true)] + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + [DisplayName("鏍囩鍚嶇О")] + [Browsable(true)] + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + [DisplayName("浣跨敤鐘舵��")] + [Browsable(true)] + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [DisplayName("鎺掑簭鐮�")] + [Browsable(true)] + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [DisplayName("璇存槑")] + [Browsable(true)] + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user index 2cb7d58..bd6a5a3 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user @@ -2,6 +2,9 @@ <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup /> <ItemGroup> + <Compile Update="00-core\SetUseStatusDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="01-pumpProduct\02-ViewPumpInformation\ViewPumpInformationDlg.cs"> <SubType>Form</SubType> </Compile> @@ -65,5 +68,14 @@ <Compile Update="07-fourLink\02-main\FourLinkManageMainPanel.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="09-Manufacturer\AddSupplierDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="09-Manufacturer\EditSupplierDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="09-Manufacturer\ManufacturerMainPanel.cs"> + <SubType>UserControl</SubType> + </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.ManufacurerViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.ManufacurerViewModel.datasource new file mode 100644 index 0000000..d8d8a45 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.ManufacurerViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="ManufacurerViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>HStation.WinFrmUI.Assets.ManufacurerViewModel, HStation.WinFrmUI.Assets.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file -- Gitblit v1.9.3