rename viewmodels
This commit is contained in:
parent
468a47ae6c
commit
d834e6057e
|
|
@ -0,0 +1,168 @@
|
|||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
.vs/
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Build scripts folder
|
||||
[Aa]pp[Bb]uild/
|
||||
[Oo]ut/
|
||||
|
||||
# Visual Studio Code files
|
||||
.vscode/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
#Launch settings
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
|
|
@ -60,24 +60,24 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Controllers
|
|||
public IActionResult Announcement()
|
||||
{
|
||||
|
||||
var model = new AnnouncementModel();
|
||||
var model = new AnnouncementViewModel();
|
||||
|
||||
return View("~/Plugins/Misc.AuctionPlugin/Views/LiveAnnouncementView/Announcement.cshtml", model);
|
||||
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Announcement(AnnouncementModel model)
|
||||
public async Task<IActionResult> Announcement(AnnouncementViewModel viewModel)
|
||||
|
||||
{
|
||||
|
||||
AnnouncementEntity objOfAnnouncementDomain = new AnnouncementEntity();
|
||||
|
||||
objOfAnnouncementDomain.Name = model.Name;
|
||||
objOfAnnouncementDomain.Name = viewModel.Name;
|
||||
|
||||
objOfAnnouncementDomain.Body = model.Body;
|
||||
objOfAnnouncementDomain.Body = viewModel.Body;
|
||||
|
||||
objOfAnnouncementDomain.IsActive = model.IsActive;
|
||||
objOfAnnouncementDomain.IsActive = viewModel.IsActive;
|
||||
|
||||
objOfAnnouncementDomain.CreateDate = DateTime.UtcNow;
|
||||
|
||||
|
|
@ -85,11 +85,11 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Controllers
|
|||
|
||||
|
||||
|
||||
if (model.IsActive == true)
|
||||
if (viewModel.IsActive == true)
|
||||
|
||||
{
|
||||
|
||||
_announcementHubContext.Clients.All.SendAsync("send", model.Body.ToString());
|
||||
_announcementHubContext.Clients.All.SendAsync("send", viewModel.Body.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Controllers
|
|||
|
||||
{
|
||||
|
||||
var model = new AnnouncementModel();
|
||||
var model = new AnnouncementViewModel();
|
||||
|
||||
return View("~/Plugins/Widget.LiveAnnouncement/Views/LiveAnnouncementView/AnnouncementList.cshtml", model);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Nop.Web.Framework.Mvc.ModelBinding;
|
|||
|
||||
namespace Nop.Plugin.Misc.AuctionPlugin.Models
|
||||
{
|
||||
public record AnnouncementModel : BaseNopModel
|
||||
public record AnnouncementViewModel : BaseNopModel
|
||||
{
|
||||
[NopResourceDisplayName("Name")]
|
||||
public string Name { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@model Nop.Plugin.Misc.AuctionPlugin.Models.AnnouncementModel
|
||||
@model Nop.Plugin.Misc.AuctionPlugin.Models.AnnouncementViewModel
|
||||
@using Nop.Core.Infrastructure
|
||||
@using Nop.Web.Framework
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue