首页 > 其他分享 > abp(net core)+easyui+efcore实现仓储管理系统——供应商管理升级之下(六十四)

abp(net core)+easyui+efcore实现仓储管理系统——供应商管理升级之下(六十四)

时间:2023-05-07 11:23:35浏览次数:43  
标签:core easyui abp ABP efcore net

abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+easyui+efcore实现仓储管理系统——解决方案介绍(二) abp(net core)+easyui+efcore实现仓储管理系统——领域层创建实体(三)  abp(net core)+easyui+efcore实现仓储管理系统——定义仓储并实现 (四) abp(net core)+easyui+efcore实现仓储管理系统——创建应用服务(五) abp(net core)+easyui+efcore实现仓储管理系统——使用 WEBAPI实现CURD (十一) abp(net core)+easyui+efcore实现仓储管理系统——EasyUI之货物管理一 (十九) abp(net core)+easyui+efcore实现仓储管理系统——ABP WebAPI与EasyUI结合增删改查之一(二十七) abp(net core)+easyui+efcore实现仓储管理系统——入库管理之一(三十七) abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九) abp(net core)+easyui+efcore实现仓储管理系统——ABP升级7.3上(五十八)          承接上文(abp(net core)+easyui+efcore实现仓储管理系统——供应商管理升级之上(六十三))我们对供应商管理这个模块进行升级,并对升级过程中涉及到一些问题进行解决。  

9.在Visual Studio 2022中按F5运行应用程序。在浏览器将呈现登录页面,然后输入管理员用户名进行登录。浏览器跳转到首页面。

10.在主界面的菜单中,选择“Business->供应商管理”菜单项,浏览器中呈现一个供应商信息列表页面,css起作用了,样式好看了。如下图。

 

11然后点击供应商列表页面中的新增(Add)按钮,填写内容,然后点击“保存”按钮。如下图。

 

12. 在“Create New Supplier”页面中我们输入完信息之后,点击“Save”按钮。应用程序报了一个错误。如下图。

13.Supplier的增删改查,我们是调用的WebApi来实现保存到数据库与查询数据的操作,那么问题就可能出在WebAPI这一个项目中。在Visual Studio 2022的解决方案资源管理器中,选中“ABP.TPLMS.Web.Host”项目,然后单击鼠标右键,在弹出菜单中选中“设为启动项目”。按F5运行应用程序,程序报错。

14. 在Visual Studio 2022的解决方案资源管理器中,“ABP.TPLMS.Web.Host”项目的App_Data\Log目录下找到log.txt文件,这是一个日志文件。在文件中我找到如下,错误信息。

AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "18230571335350747201", 
Request ID "40000042-000a-fd00-b63f-84710c7967bb": An unhandled exception was thrown by the application. Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints. Matches: ABP.TPLMS.Suppliers.SupplierAppService.CreateAsync (ABP.TPLMS.Application) ABP.TPLMS.Suppliers.SupplierAppService.Create (ABP.TPLMS.Application) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates
(HttpContext httpContext, CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext,
CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.MatchAsync(HttpContext httpContext) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
15. 在Visual Studio 2022的解决方案资源管理器中,“ABP.TPLMS.Applicationt”项目的Suppliers目录下找到SupplierAppService.cs文件。在文件中有两个Create方法,代码如下:  
using Abp.Application.Services;
using Abp.Domain.Repositories;
using ABP.TPLMS.Entitys;
using ABP.TPLMS.Suppliers.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
 
namespace ABP.TPLMS.Suppliers
{
   public class SupplierAppService :AsyncCrudAppService<Supplier, SupplierDto, int,
PagedSupplierResultRequestDto, CreateUpdateSupplierDto, CreateUpdateSupplierDto>,
ISupplierAppService { public SupplierAppService(IRepository<Supplier, int> repository) : base(repository) { } public Task<SupplierDto> Create(CreateUpdateSupplierDto input) { return CreateAsync(input); } public override Task<SupplierDto> CreateAsync(CreateUpdateSupplierDto input) { var sin = input; return base.CreateAsync(input); } } }

 

16. 在Visual Studio 2022的解决方案资源管理器中,使用鼠标双击打开 SupplierAppService.cs文件。将Create方法注释。按F5运行应用程序。登录之后,点击“Supplier”目录,我们可以看到供应商列表页面。然后点击供应商列表页面中的Add按钮。

 

17. 在“Create New Supplier”页面中我们输入完信息之后,点击“Save”按钮。数据保存到数据库,应用会刷新供应商列表页面。如下图。

 

 

 

标签:core,easyui,abp,ABP,efcore,net
From: https://www.cnblogs.com/chillsrc/p/17379054.html

相关文章

  • FuzzyScore
    模糊分数implementation'org.apache.commons:commons-text:1.10.0'AmatchingalgorithmthatissimilartothesearchingalgorithmsimplementedineditorssuchasSublimeText,TextMate,Atomandothers.Onepointisgivenforeverymatchedcharacte......
  • Net Core Web Api 配置Swagger
    一、创建NETCoreAPI项目NETCore版本:NETCore2.21.创建coreweb应用程序2.选择API3.下图为生成后的项目二、安装Swagger1.打开NuGet包管理器2.搜索Swashbuckle.AspNetCore安装在项目上3.点击我接受三、配置Swagger对于ConfigureServices和Configure的配置点击可参考1.ConfigureS......
  • kubernetes域名解析服务CoreDNS
    k8sdns组件历史简介kubernetes的DNS组件历史有三个,分别是skydns、kube-dns和coredns;在k8s1.3版本之前使用的是skydns,之后的版本到1.17及之间的版本都是使用的kube-dns,1.18开始至今主要使用coredns;这些dns组件在k8s当中,主要作用就是解析k8s中servicename所对应的IP地......
  • OrchardCore 中的 插件开发/ Shape / DisplayDriver / 视图扩展 / Razor代码注入
    请注意该文章仅限于OrchardCore项目中的DisplayDriver扩展机制,ASP.NETCOREMVC自身并没有对应功能,如果需要可以将相关的OrchardCore模块添加到项目中也可以实现响应功能背景最近一个功能需求,需要使用其它用户模拟身份,所以计划在用户列表页面扩展按钮组功能那么开始看代......
  • ABP CORE+EF 批量删除、修改
    //物理删除()//awaitthis.Repository.GetAll().Where(p=>input.Ids.Contains(p.Id)).BatchDeleteAsync();//逻辑删除,批量修改删除字段awaitthis.Repository.GetAll().Where(p=>input.Ids.Contains(p.Id)).BatchUpdateAsync(p=>newShop......
  • Python asyncore socket客户端开发基本使用
    导读asyncore库是python的一个标准库,提供了以异步的方式写入套接字服务的客户端和服务器的基础结构,这篇文章主要介绍了Pythonasyncoresocket客户端开发基本使用,需要的朋友可以参考下介绍asyncore库是python的一个标准库,提供了以异步的方式写入套接字服务的客户端和服......
  • The plugin distribution bundles IDE packages 'com.intellij.uiDesigner.core',
    错误描述:TheplugindistributionbundlesIDEpackages'com.intellij.uiDesigner.core','com.intellij.uiDesigner'.BundlingIDEpackagesisconsideredbadpracticeandmayleadtosophisticatedcompatibilityproblems.Considerexcludingthe......
  • 在.NetCore中 DDD中基于mediatr实现领域事件并结合EFCore进行二次封装
    [源代码地址https://github.com/junkai-li/NetCoreKevin]基于NET6搭建跨平台WebApi架构支持单点登录、多缓存、自动任务、分布式、多租户、日志、授权和鉴权、网关注册与发现、CAP集成事件、领域事件、docker部署**首要要理解什么是领域事件?**领域事件是指发生在特定领域中的......
  • .net core HttpClient
    .netcoreHttpClient使用之掉坑解析(一)-Jlion-博客园(cnblogs.com) ......
  • abp(net core)+easyui+efcore实现仓储管理系统——供应商管理升级之上(六十三)
    abp(netcore)+easyui+efcore实现仓储管理系统目录abp(netcore)+easyui+efcore实现仓储管理系统——ABP总体介绍(一)abp(netcore)+easyui+efcore实现仓储管理系统——解决方案介绍(二)abp(netcore)+easyui+efcore实现仓储管理系统——领域层创建实体(三) abp(netcore)+eas......