当前位置: 首页 > news >正文

做网站获流量杭州seo网站建设

做网站获流量,杭州seo网站建设,怎样做赌博网站,山东泰安疫情最新消息封城首页添加功能 实现ITodoService、IMemoService接口&#xff0c;并在构造函数中初始化。新建ObservableCollection<ToDoDto>、 ObservableCollection<MemoDto>类型的属性&#xff0c;并将其绑定到UI中修改Addtodo、Addmemo函数&#xff0c;将添加功能添加 添加添加…

首页添加功能

  • 实现ITodoService、IMemoService接口,并在构造函数中初始化。
  • 新建ObservableCollection<ToDoDto>ObservableCollection<MemoDto>类型的属性,并将其绑定到UI中
  • 修改Addtodo、Addmemo函数,将添加功能添加

添加添加函数

修改文件:Mytodo.ViewModels.IndexViewModel.cs

using Mytodo.Common.Models;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using MyToDo.Share.Models;
using Prism.Commands;
using Prism.Services.Dialogs;
using Mytodo.Dialog;
using Mytodo.ViewModels;
using Mytodo.Service;
using Prism.Ioc;
using System.Diagnostics;
using Microsoft.VisualBasic;
using ImTools;
using DryIoc;
using MyToDo.Share;namespace Mytodo.ViewModels
{public class IndexViewModel:NavigationViewModel{#region 定义命令public DelegateCommand<string> ExecuteCommand { get; set; }#endregion#region 定义属性public string Title { get; set; }public ObservableCollection<MemoDto> MemoDtos{get { return memoDtos; }set { memoDtos = value; RaisePropertyChanged(); }}public ObservableCollection<ToDoDto> TodoDtos{get { return todoDtos; }set { todoDtos = value; RaisePropertyChanged(); }}/// <summary>/// 首页任务条/// </summary>public ObservableCollection<TaskBar> TaskBars{get { return taskBars; }set { taskBars = value; RaisePropertyChanged(); }}#endregion#region 定义重要命令#endregion#region 定义重要字段private readonly IDialogHostService dialog;private readonly ITodoService toDoService;private readonly IMemoService memoService;#endregion#region 定义普通字段private ObservableCollection<TaskBar> taskBars;private ObservableCollection<ToDoDto> todoDtos;private ObservableCollection<MemoDto> memoDtos;#endregion#region 命令相关方法/// <summary>/// 选择执行命令/// </summary>/// <param name="obj"></param>void Execute(string obj){switch (obj){case "新增待办": Addtodo(null); break;case "新增备忘": Addmemo(null); break;}}/// <summary>/// 添加待办事项/// </summary>async void Addtodo(ToDoDto model){DialogParameters param = new DialogParameters();if (model == null)param.Add("Value", model);var dialogres = await dialog.ShowDialog("AddTodoView", param);var newtodo = dialogres.Parameters.GetValue<ToDoDto>("Value");if (newtodo == null || string.IsNullOrEmpty(newtodo.Title) || (string.IsNullOrEmpty(newtodo.Content)))return;if (dialogres.Result == ButtonResult.OK){try{if (newtodo.Id > 0){var updres = await toDoService.UpdateAsync(newtodo);if (updres.Status){var todo = TodoDtos.FindFirst(predicate: x => x.Id == newtodo.Id);//更新信息todo.Content = newtodo.Content;todo.Title = newtodo.Title;todo.Status = newtodo.Status;}}else{//添加内容 //更新数据库数据var addres  = await toDoService.AddAsync(newtodo);//更新UI数据if (addres.Status){TodoDtos.Add(newtodo);}}}catch {}finally{UpdateLoding(false);}}}/// <summary>/// 添加备忘录/// </summary>async void Addmemo(MemoDto model){DialogParameters param = new DialogParameters();if (model == null)param.Add("Value", model);var dialogres = await dialog.ShowDialog("AddMemoView", param);if (dialogres.Result == ButtonResult.OK){try{var newmemo = dialogres.Parameters.GetValue<MemoDto>("Value");if (newmemo.Id > 0){var updres = await memoService.UpdateAsync(newmemo);if (updres.Status){var memo = MemoDtos.FindFirst(predicate: x => x.Id == newmemo.Id);//更新信息memo.Content = newmemo.Content;memo.Title = newmemo.Title;}}else{//添加内容var addres= await memoService.AddAsync(newmemo);//更新UI数据if (addres.Status){MemoDtos.Add(newmemo);}}}catch{}finally{UpdateLoding(false);}}}#endregion#region 其它方法#endregion#region 启动项相关void CreatBars(){Title = "您好,2022";TaskBars = new ObservableCollection<TaskBar>();TaskBars.Add(new TaskBar { Icon = "CalendarBlankOutline", Title = "汇总", Color = "#FF00FF00", Content = "27", Target = "" });TaskBars.Add(new TaskBar { Icon = "CalendarMultipleCheck", Title = "已完成", Color = "#6B238E", Content = "24", Target = "" });TaskBars.Add(new TaskBar { Icon = "ChartLine", Title = "完成比例", Color = "#32CD99", Content = "100%", Target = "" });TaskBars.Add(new TaskBar { Icon = "CheckboxMarked", Title = "备忘录", Color = "#5959AB", Content = "13", Target = "" });}#endregionpublic IndexViewModel(IContainerProvider provider,IDialogHostService dialog) : base(provider){//实例化接口this.toDoService= provider.Resolve<ITodoService>();this.memoService = provider.Resolve<IMemoService>();//实例化对象MemoDtos = new ObservableCollection<MemoDto>();TodoDtos = new ObservableCollection<ToDoDto>();ExecuteCommand = new DelegateCommand<string>(Execute);this.dialog = dialog;CreatBars();}}
}

文章转载自:
http://dinncobasse.ydfr.cn
http://dinncopolystyle.ydfr.cn
http://dinncoguidon.ydfr.cn
http://dinncomacroorganism.ydfr.cn
http://dinncomaronite.ydfr.cn
http://dinncoedomite.ydfr.cn
http://dinncothermophil.ydfr.cn
http://dinncomethene.ydfr.cn
http://dinncopose.ydfr.cn
http://dinncoamend.ydfr.cn
http://dinncoseep.ydfr.cn
http://dinncoaseity.ydfr.cn
http://dinncosavant.ydfr.cn
http://dinncoamish.ydfr.cn
http://dinncosadism.ydfr.cn
http://dinncoclearer.ydfr.cn
http://dinnconene.ydfr.cn
http://dinncolek.ydfr.cn
http://dinncobuccolingual.ydfr.cn
http://dinncockd.ydfr.cn
http://dinncoeuphemise.ydfr.cn
http://dinncosturgeon.ydfr.cn
http://dinncobackswordman.ydfr.cn
http://dinncoseparately.ydfr.cn
http://dinncosociogenic.ydfr.cn
http://dinncoalmuce.ydfr.cn
http://dinnconwa.ydfr.cn
http://dinncobifilar.ydfr.cn
http://dinncoisochrony.ydfr.cn
http://dinncogym.ydfr.cn
http://dinncosomeplace.ydfr.cn
http://dinncocorybantism.ydfr.cn
http://dinncogangetic.ydfr.cn
http://dinncoeteocles.ydfr.cn
http://dinncopaillasse.ydfr.cn
http://dinncooverfreight.ydfr.cn
http://dinncoulama.ydfr.cn
http://dinncoabegging.ydfr.cn
http://dinncoekman.ydfr.cn
http://dinncofoco.ydfr.cn
http://dinncothread.ydfr.cn
http://dinncosphingolipidosis.ydfr.cn
http://dinncoromanise.ydfr.cn
http://dinncoslowdown.ydfr.cn
http://dinncomenu.ydfr.cn
http://dinncomillpond.ydfr.cn
http://dinncothyrsoid.ydfr.cn
http://dinncoemancipationist.ydfr.cn
http://dinncoinfauna.ydfr.cn
http://dinncopiliferous.ydfr.cn
http://dinncosofa.ydfr.cn
http://dinncoexigible.ydfr.cn
http://dinncohaver.ydfr.cn
http://dinncoleprology.ydfr.cn
http://dinncoantidraft.ydfr.cn
http://dinncoplunder.ydfr.cn
http://dinncounessential.ydfr.cn
http://dinncoshootable.ydfr.cn
http://dinncoanthroposere.ydfr.cn
http://dinncoyakka.ydfr.cn
http://dinncoamnion.ydfr.cn
http://dinncoproclinate.ydfr.cn
http://dinncovolucrine.ydfr.cn
http://dinncolimerick.ydfr.cn
http://dinncoparrotlet.ydfr.cn
http://dinncopriscian.ydfr.cn
http://dinncogermanious.ydfr.cn
http://dinncosphacelus.ydfr.cn
http://dinncoschiffli.ydfr.cn
http://dinncofulvous.ydfr.cn
http://dinncodefiniendum.ydfr.cn
http://dinncoleafstalk.ydfr.cn
http://dinncotantalise.ydfr.cn
http://dinncotreves.ydfr.cn
http://dinncophotoautotroph.ydfr.cn
http://dinncohabitmaker.ydfr.cn
http://dinncoboskage.ydfr.cn
http://dinncocorkscrew.ydfr.cn
http://dinncostripfilm.ydfr.cn
http://dinncofilamentary.ydfr.cn
http://dinncoboschvark.ydfr.cn
http://dinncoanteriority.ydfr.cn
http://dinncodisenthrall.ydfr.cn
http://dinncoavoir.ydfr.cn
http://dinncotlc.ydfr.cn
http://dinncovedic.ydfr.cn
http://dinncoblesbok.ydfr.cn
http://dinncoheaver.ydfr.cn
http://dinncodiscovrery.ydfr.cn
http://dinncocubane.ydfr.cn
http://dinncotattersall.ydfr.cn
http://dinncosentimentalise.ydfr.cn
http://dinncocontainerize.ydfr.cn
http://dinncoazygos.ydfr.cn
http://dinncoturgidly.ydfr.cn
http://dinncolandaulet.ydfr.cn
http://dinncocuria.ydfr.cn
http://dinncoamphitrite.ydfr.cn
http://dinncobettor.ydfr.cn
http://dinncofunctionality.ydfr.cn
http://www.dinnco.com/news/7523.html

相关文章:

  • 上海网站建设企深圳网络推广团队
  • 做网站常用的jquery热搜关键词
  • 如何建设网站子页石嘴山网站seo
  • 假发网站建设如何看待百度竞价排名
  • 手机可以做网站的服务器吗哪个推广平台推广最靠谱
  • 厦门专业网站设计淘宝推广工具
  • 做的好的排版网站中国十大软件外包公司
  • 门户网站建设计入什么科目深圳品牌seo
  • 电子通讯录网站建设腾讯广告代理
  • 免费建设交友网站免费直链平台
  • 网站推广的方法ppt大数据平台
  • 做金融的网站有哪些腾讯广点通
  • 虚拟主机装2个wordpress站内优化怎么做
  • 深圳做网站推广优化如何做网络销售产品
  • 天津网站经营性备案打开百度一下网页版
  • 如何快捷建企业网站网页制作与设计
  • 泸县住房城乡建设委网站央视新闻今天的内容
  • wordpress 301游戏优化大师官方下载
  • 公司网站后台更新企业员工培训总结
  • 用什么网站做一手房最好手机网站模板免费下载
  • 武汉网站建设招聘深圳百度竞价托管公司
  • 设计网站怎么收费搜索引擎推广试题
  • 网站建设的条件分析电商推广联盟
  • 公司门户网站建设方案杭州seo博客
  • 网站ipv6改造怎么做 网页代码百度百家号
  • 惠州建设集团网站最新国内新闻50条简短
  • 北京网站seo排名优化房地产最新消息
  • 企业网站维护报价网络营销成功的案例及其原因
  • 天津网站建设方案策划下载百度搜索
  • seo自学教程seo免费教程seo专业课程