Ejemplo n.º 1
0
        private void WorldSelect(object sender, EventArgs e)
        {
            ViceWorld selected = (ViceWorld)edWorld.EditValue;

            if (selected != null)
            {
                edHwgr.Properties.DataSource = selected.HWGRs;
            }
        }
Ejemplo n.º 2
0
        private void WorldSelect(object sender, EventArgs e)
        {
            ViceWorld selected = (ViceWorld)edWorld.EditValue;

            if (selected != null)
            {
                _worldGrid.Bind(selected);
            }
            EnableBarButtons();
        }
Ejemplo n.º 3
0
        public void Bind(ViceWorld world)
        {
            EditHWGR.Properties.DataSource = ClientEnvironment.HWGRService.FindAll();

            edWorld.EditValue = world;
            edWorld.Enabled   = false;

            m_assign = AssignEnum.ThisHwgrToWorld;
            m_world  = world;
        }
Ejemplo n.º 4
0
        private void Storeselected(object sender, EventArgs e)
        {
            ViceWorld viceWorld = null;
            ViceHWGR  viceHwgr  = null;
            ViceWGR   viceWgr   = null;

            m_wgrs.Clear();
            m_hwgrs.Clear();
            m_worlds.Clear();

            Dictionary <long, string> nameCapsule = new Dictionary <long, string>();
            List <Domain.WGR>         wgrs        = ClientEnvironment.WGRService.FindAll();
            List <Domain.HWGR>        hwgrs       = ClientEnvironment.HWGRService.FindAll();
            List <Domain.World>       worlds      = ClientEnvironment.WorldService.FindAll();

            List <long> dWgr = ClientEnvironment.HwgrToWgrService.GetHwgrToWgrFiltered(edBeginDate.DateTime)
                               .ConvertAll <long>(new Converter <HwgrToWgr, long>(delegate(HwgrToWgr w)
            {
                return(w.ID);
            }));
            List <long> dHwgr = ClientEnvironment.WorldToHWGRService.GetWorldToHwgrFiltered(edBeginDate.DateTime)
                                .ConvertAll <long>(new Converter <WorldToHwgr, long>(delegate(WorldToHwgr w)
            {
                return(w.ID);
            }));

            if (wgrs != null)
            {
                foreach (Domain.WGR var in wgrs)
                {
                    nameCapsule.Add(var.ID, var.Name);
                }
            }
            if (hwgrs != null)
            {
                foreach (Domain.HWGR var in hwgrs)
                {
                    nameCapsule.Add(var.ID, var.Name);
                }
            }
            if (worlds != null)
            {
                foreach (Domain.World var in worlds)
                {
                    nameCapsule.Add(var.ID, var.Name);
                }
            }
            string name = string.Empty;

            long selected = (long)edStore.EditValue;

            if (selected != null)
            {
                System.Collections.IList storeStruct = ClientEnvironment.StoreService
                                                       .GetStoreStructure(selected);

                if (storeStruct != null)
                {
                    foreach (Dao.QueryResult.StoreStructure str in storeStruct)
                    {
                        string s = String.Empty;
                        nameCapsule.TryGetValue(str.WorldID, out s);
                        str.WorldName = s;
                        s             = String.Empty;
                        nameCapsule.TryGetValue(str.HWGR_ID, out s);
                        str.HWGR_Name = s;
                        s             = String.Empty;
                        nameCapsule.TryGetValue(str.WGR_ID, out s);
                        str.WGR_Name = s;
                    }
                }
                StoreStructureItems items = new StoreStructureItems();
                items.ProcessStoreStructure(storeStruct);

                if (storeStruct != null)
                {
                    foreach (Dao.QueryResult.StoreStructure str in storeStruct)
                    {
                        if (!m_worlds.ContainsKey(str.Store_WorldID))
                        {
                            nameCapsule.TryGetValue(str.WorldID, out name);
                            viceWorld = new ViceWorld(name,
                                                      str.Store_WorldID,
                                                      str.WorldID);
                            m_worlds.Add(str.Store_WorldID, viceWorld);
                        }
                        if (!m_hwgrs.ContainsKey(str.World_HWGR_ID) &&
                            dHwgr.Contains(str.World_HWGR_ID) &&
                            viceWorld != null)
                        {
                            nameCapsule.TryGetValue(str.HWGR_ID, out name);
                            viceHwgr = new ViceHWGR(name,
                                                    str.World_HWGR_ID,
                                                    str.HWGR_BeginTime,
                                                    str.HWGR_EndTime,
                                                    str.HWGR_ID);
                            viceWorld.HWGRs.Add(viceHwgr);
                        }
                        nameCapsule.TryGetValue(str.WGR_ID, out name);
                        viceWgr = new ViceWGR(name,
                                              str.HWGR_WGR_ID,
                                              str.WGR_BeginTime,
                                              str.WGR_EndTime,
                                              str.WGR_ID);
                        if (!m_wgrs.ContainsKey(str.HWGR_WGR_ID) &&
                            dWgr.Contains(str.HWGR_WGR_ID) &&
                            viceHwgr != null)
                        {
                            m_wgrs.Add(str.HWGR_WGR_ID, viceWgr);
                            viceHwgr.WGRs.Add(viceWgr);
                        }
                    }
                }
                List <ViceWorld> t = new List <ViceWorld>();
                t.AddRange(m_worlds.Values);
                edWorld.Properties.DataSource = t;
                edWorld.Visible = true;
            }
        }
Ejemplo n.º 5
0
 public void Bind (ViceWorld data)
 {
     m_world = data;
     hwgrs = data.HWGRs;
     gridControl1.DataSource = hwgrs;
 }
Ejemplo n.º 6
0
        private void Storeselected(object sender, EventArgs e)
        {
            ViceWorld viceWorld = null;
            ViceHWGR viceHwgr = null;
            ViceWGR viceWgr = null;

            m_wgrs.Clear();
            m_hwgrs.Clear();
            m_worlds.Clear();

            Dictionary<long, string> nameCapsule = new Dictionary<long, string>();
            List<Domain.WGR> wgrs = ClientEnvironment.WGRService.FindAll();
            List<Domain.HWGR> hwgrs = ClientEnvironment.HWGRService.FindAll();
            List<Domain.World> worlds = ClientEnvironment.WorldService.FindAll();
            
            List<long> dWgr = ClientEnvironment.HwgrToWgrService.GetHwgrToWgrFiltered(edBeginDate.DateTime)
                .ConvertAll<long>(new Converter<HwgrToWgr, long>(delegate(HwgrToWgr w)
                {
                    return w.ID;
                }));
            List<long> dHwgr = ClientEnvironment.WorldToHWGRService.GetWorldToHwgrFiltered(edBeginDate.DateTime)
                .ConvertAll<long>(new Converter<WorldToHwgr, long>(delegate(WorldToHwgr w)
                {
                    return w.ID;
                }));

            if (wgrs != null)
                foreach (Domain.WGR var in wgrs)
                    nameCapsule.Add(var.ID, var.Name);
            if (hwgrs != null)
                foreach (Domain.HWGR var in hwgrs)
                    nameCapsule.Add(var.ID, var.Name);
            if (worlds != null)
                foreach (Domain.World var in worlds)
                    nameCapsule.Add(var.ID, var.Name);
            string name = string.Empty;

            Domain.Store selected = edStore.EditValue as Domain.Store;

            if (selected != null)
            {
                System.Collections.IList storeStruct = ClientEnvironment.StoreService
                    .GetStoreStructure(selected.ID);

                if (storeStruct != null)
                {
                    foreach (Dao.QueryResult.StoreStructure str in storeStruct)
                    {
                        string s = String.Empty;
                        nameCapsule.TryGetValue(str.WorldID, out s);
                        str.WorldName = s;
                        s = String.Empty;
                        nameCapsule.TryGetValue(str.HWGR_ID, out s);
                        str.HWGR_Name = s;
                        s = String.Empty;
                        nameCapsule.TryGetValue(str.WGR_ID, out s);
                        str.WGR_Name = s;

                    }
                }
                StoreStructureItems items = new StoreStructureItems();
                items.ProcessStoreStructure(storeStruct);

                if (storeStruct != null)
                    foreach (Dao.QueryResult.StoreStructure str in storeStruct)
                    {
                        if (!m_worlds.ContainsKey(str.Store_WorldID))
                        {
                            nameCapsule.TryGetValue(str.WorldID, out name);
                            viceWorld = new ViceWorld(name,
                                str.Store_WorldID,
                                str.WorldID);
                            m_worlds.Add(str.Store_WorldID, viceWorld);
                        }
                        if (!m_hwgrs.ContainsKey(str.World_HWGR_ID)
                            && dHwgr.Contains(str.World_HWGR_ID)
                            && viceWorld != null)
                        {
                            nameCapsule.TryGetValue(str.HWGR_ID, out name);
                            viceHwgr = new ViceHWGR(name,
                                str.World_HWGR_ID,
                                str.HWGR_BeginTime,
                                str.HWGR_EndTime,
                                str.HWGR_ID);
                            viceWorld.HWGRs.Add(viceHwgr);
                        }
                        nameCapsule.TryGetValue(str.WGR_ID, out name);
                        viceWgr = new ViceWGR(name,
                            str.HWGR_WGR_ID,
                            str.WGR_BeginTime,
                            str.WGR_EndTime,
                            str.WGR_ID);
                        if (!m_wgrs.ContainsKey(str.HWGR_WGR_ID)
                            && dWgr.Contains(str.HWGR_WGR_ID)
                            && viceHwgr != null)
                        {
                            m_wgrs.Add(str.HWGR_WGR_ID, viceWgr);
                            viceHwgr.WGRs.Add(viceWgr);
                        }
                    }
                List<ViceWorld> t = new List<ViceWorld>();
                t.AddRange(m_worlds.Values);
                edWorld.Properties.DataSource = t;
                edWorld.Visible = true;
            }
        }
Ejemplo n.º 7
0
 public void Bind(ViceWorld world)
 {
     uc.Bind(world);
 }
Ejemplo n.º 8
0
 public void Bind(ViceWorld data)
 {
     m_world = data;
     hwgrs   = data.HWGRs;
     gridControl1.DataSource = hwgrs;
 }
Ejemplo n.º 9
0
 public void Bind(ViceWorld world)
 {
     uc.Bind(world);
 }
Ejemplo n.º 10
0
        public void Bind (ViceWorld world)
        {
            EditHWGR.Properties.DataSource = ClientEnvironment.HWGRService.FindAll();

            edWorld.EditValue = world;
            edWorld.Enabled = false;

            m_assign = AssignEnum.ThisHwgrToWorld;
            m_world = world;
        }