Example #1
0
        public override void LoadByID(long id)
        {
            if (id > 0)
            {
                Number     = "0001";
                CreateDate = DateTime.Today;
                BillerName = ClientInfo.CurrentUser.DisplayName;
                StatusName = "编辑中";

                using (SnokyeContainer c = new SnokyeContainer())
                {
                    UserInfo[] users = c.UserInfoSet.Where((u) => true).ToArray();
                    foreach (UserInfo u in users)
                    {
                        VMExampleBillDetail d = new VMExampleBillDetail
                        {
                            ID       = id,
                            UserID   = u.Id,
                            UserName = u.UserName,
                        };
                        d = ViewModelProxy.Proxy(d);
                        _details.Add(d);
                    }
                }
            }
        }
Example #2
0
        public ViewModelBase NewDetail()
        {
            VMExampleBillDetail d = new VMExampleBillDetail();

            d = ViewModelProxy.Proxy(d);
            _details.Add(d);
            return(d);
        }