abp(net core)+easyui+efcore实现仓储管理系统目录

 
 
     承接上文(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”按钮。数据保存到数据库,应用会刷新供应商列表页面。如下图。

abp(net core)+easyui+efcore实现仓储管理系统——供应商管理升级之下(六十四)的更多相关文章

  1. abp(net core)+easyui+efcore实现仓储管理系统——使用 WEBAPI实现CURD (十四)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  2. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之五(五十四)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  3. abp(net core)+easyui+efcore实现仓储管理系统——使用 WEBAPI实现CURD (十五)

    core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+easyui+e ...

  4. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之六(五十五)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  5. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之七(五十六)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  6. abp(net core)+easyui+efcore实现仓储管理系统——使用 WEBAPI实现CURD (十二)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  7. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之三(五十二)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  8. abp(net core)+easyui+efcore实现仓储管理系统——菜单 (十六)

    系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+easyui+efcore实现仓储管理系统——解决方案介绍(二) ...

  9. abp(net core)+easyui+efcore实现仓储管理系统——EasyUI之货物管理一 (十九)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  10. abp(net core)+easyui+efcore实现仓储管理系统——EasyUI之货物管理二 (二十)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

随机推荐

  1. 新搭建的禅道admin忘记密码

    /opt/zbox/run/mysql/mysql -uroot -p 禅道数据库root默认密码123456 MariaDB [(none)]> show databases; +------ ...

  2. k8sdeploy配置文件示例

    apiVersion: extensions/v1beta1 kind: Deployment metadata: name: [k8s服务名] namespace: default labels: ...

  3. 组合计数中的q-模拟 q analog

    拒绝更新,深度和广度上建议看这个pdf URL里面用到的一些query-string过期了,,, 论文题目是 THE q-SERIES IN COMBINATORICS; PERMUTATION ST ...

  4. CentOS Docker安装、镜像加速

    CentOS Docker安装 方法一:使用官方安装脚本自动安装 # 安装命令: curl -fsSL https://get.docker.com | bash -s docker --mirror ...

  5. 使用python自动监控程序运行过程数据

    操作系统 :CentOS 7.6.1810_x64 Python 版本 : 2.7.5 一.背景描述 工作中会遇到需要监控程序运行过程数据的情况,比如定时执行监控的cmd并记录执行结果,本文提供一种实 ...

  6. conda环境下使用nvcc -V报错nvcc: command not found的一种解决方法

    前言 缘起  实验室的学弟问我为什么他使用nvcc命令报错,起先我以为他用的是老师给的root账户,按照参考文献1便可以解决问题.  但由于并非root用户,/usr/local下没有cuda,于是便 ...

  7. Gateway 网关

    Spring Cloud Gateway 作为 Spring Cloud框架的第二代网关,在功能上要比 Zuul更加的强大,性能也更好.随着 Spring Cloud的版本迭代,Spring Clou ...

  8. Schillace 定律 背后的 Sam Schillace

    微软semantic-kernel(SK)团队发布了一篇博客文章:Early Lessons From GPT-4: The Schillace Laws[1] ,微软的CVP , Deputy CT ...

  9. React的组件化/工程化开发(脚手架)

    脚手架: create-react-app 安装脚手架: $ npm i create-react-app -g 检查安装: $ npm create-react-app --version 新建项目 ...

  10. 解决el-checked-group中v-medel绑定的是一个数组对象方法(不用修改源码)

    思路:弃用el-checked-group使用el-checked模拟 <!DOCTYPE html> <html> <head> <meta charset ...