38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Text;
|
|
using Xamarin.Forms;
|
|
using XXCpzs.Models;
|
|
using XXCpzs.Views;
|
|
|
|
namespace XXCpzs.ViewModels
|
|
{
|
|
class SaleViewModel : BaseViewModel
|
|
{
|
|
public ObservableCollection<ResultModel> Items { set; get; }
|
|
string companyName = string.Empty;
|
|
public string CompanyName
|
|
{
|
|
get { return companyName; }
|
|
set { SetProperty(ref companyName, value); }
|
|
}
|
|
|
|
public int CustomerId = 0;
|
|
|
|
public SaleViewModel()
|
|
{
|
|
Title = "产品销售";
|
|
Items = new ObservableCollection<ResultModel>
|
|
{
|
|
new ResultModel { Data = "序列号", Msg = "提交结果" }
|
|
};
|
|
MessagingCenter.Subscribe<PageCustomerSelect, Customer>(this, "SelectCustomer", async (obj, item) =>
|
|
{
|
|
var newItem = item as Customer;
|
|
this.CompanyName = newItem.company + ">>" + newItem.contacts;
|
|
this.CustomerId = newItem.id;
|
|
});
|
|
}
|
|
}
|
|
} |