예제 #1
0
        private void btn_Open_Click(object sender, RoutedEventArgs e)
        {
            Window1DataContextModel data = new Window1DataContextModel();

            data.HHName       = "赵四";
            data.ContractCode = "1003175664863";
            data.Address      = "北京市大兴区旧宫镇 住总万科广场C座11层";

            List <Window1ResultModel> rList = new List <Window1ResultModel>();

            for (int i = 0; i <= 100; i++)
            {
                Window1ResultModel r = new Window1ResultModel()
                {
                    SkuNo      = $"sku{i.ToString()}",
                    SkuName    = $"sku{i.ToString()}",
                    Amount     = i,
                    StatusName = i.ToString().Contains("3")? "未拣货" : i % 2 == 0 ? "已拣货" : "已复核",
                };
                rList.Add(r);
            }
            data.Results = new ObservableCollection <Window1ResultModel>(rList);

            Window1 w = new Window1(data);

            //w.Show();
            MultipScreenManager.ShowInScreen(w);
        }
예제 #2
0
        public Window1(Window1DataContextModel str)
        {
            _str = str;
            InitializeComponent();


            txtHHName.Content          = $"{_str.HHName}";
            txtContract.Content        = $"合同号:{_str.ContractCode}";
            txtAddress.Content         = $"地址:{_str.Address}";
            orderItem_list.ItemsSource = _str.Results;
            //

            //StringBuilder sbMsg = new StringBuilder();
            //for (int i = 0; i < 100; i++)
            //{
            //    sbMsg.Append($"{i.ToString()}\r\n");
            //}
            //message.Text = sbMsg.ToString();
        }