添加项目文件。
This commit is contained in:
54
XXCpzs/ViewModels/DabaoViewModel.cs
Normal file
54
XXCpzs/ViewModels/DabaoViewModel.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
using XXCpzs.helper;
|
||||
using XXCpzs.Models;
|
||||
|
||||
namespace XXCpzs.ViewModels
|
||||
{
|
||||
class DabaoViewModel : BaseViewModel
|
||||
{
|
||||
private int Uid;
|
||||
|
||||
public ObservableCollection<DabaoTypes> dabaoTypes { get; set; }
|
||||
|
||||
public ObservableCollection<DabaoBrands> dabaoBrands { get; set; }
|
||||
|
||||
public ObservableCollection<ResultModel> Items { get; set; }
|
||||
|
||||
public DabaoViewModel(int uid)
|
||||
{
|
||||
this.Uid = uid;
|
||||
Title = "产品入库";
|
||||
dabaoTypes = new ObservableCollection<DabaoTypes>();
|
||||
dabaoBrands = new ObservableCollection<DabaoBrands>();
|
||||
Items = new ObservableCollection<ResultModel>();
|
||||
Items.Add(new ResultModel { Code = 0, Data = "序列号", Msg = "提交结果" });
|
||||
|
||||
Dictionary<string, string> _body = new Dictionary<string, string>{
|
||||
{ "Uid", Uid.ToString() }
|
||||
};
|
||||
|
||||
List<DabaoTypes> dt = HttpHelper.RefreshData<DabaoTypes>(07, RestSharp.Method.POST, _body);
|
||||
if (dt != null)
|
||||
{
|
||||
foreach (var item in dt)
|
||||
{
|
||||
dabaoTypes.Add(item);
|
||||
}
|
||||
}
|
||||
List<DabaoBrands> buMens = HttpHelper.RefreshData<DabaoBrands>(08, RestSharp.Method.POST, _body);
|
||||
if (buMens != null)
|
||||
{
|
||||
|
||||
foreach (var item in buMens)
|
||||
{
|
||||
dabaoBrands.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user