示例#1
0
        private void NewRegion()
        {
            Domain.Region r = ClientEnvironment.RegionService.CreateEntity();
            if (ClientEnvironment.LogonUser.LanguageID.HasValue)
            {
                r.LanguageID = ClientEnvironment.LogonUser.LanguageID.Value;
            }
            else
            {
                r.LanguageID = SharedConsts.NeutralLangId;
            }

            using (Baumax.ClientUI.FormEntities.Region.RegionFrm frm = new Baumax.ClientUI.FormEntities.Region.RegionFrm())
            {
                frm.Entity = r;
                if (frm.ShowDialog(this) == DialogResult.OK && frm.Modified)
                {
                    Domain.Region        region = ClientEnvironment.RegionService.Save(r);
                    List <Domain.Region> l      = new List <Baumax.Domain.Region>();
                    l.Add(region);

                    _nodesList.AddRegions(l);
                }
            }
        }
示例#2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (ClientEnvironment.IsRuntimeMode)
            {
                _nodesList = new BaumaxTreeNodeList();
                List<Domain.Country> lst = ClientEnvironment.CountryService.FindAll();
                _nodesList.AddCountries(lst);
                List<Domain.Region> lstRegion = ClientEnvironment.RegionService.FindAll();
                _nodesList.AddRegions(lstRegion);

                List<Domain.Store> lstStore = ClientEnvironment.StoreService.FindAll();
                _nodesList.AddStores(lstStore);

                treeList1.DataSource = _nodesList;

            }
        }
示例#3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (ClientEnvironment.IsRuntimeMode)
            {
                _nodesList = new BaumaxTreeNodeList();
                List <Domain.Country> lst = ClientEnvironment.CountryService.FindAll();
                _nodesList.AddCountries(lst);
                List <Domain.Region> lstRegion = ClientEnvironment.RegionService.FindAll();
                _nodesList.AddRegions(lstRegion);

                List <Domain.Store> lstStore = ClientEnvironment.StoreService.FindAll();
                _nodesList.AddStores(lstStore);


                treeList1.DataSource = _nodesList;
            }
        }