Exemplo n.º 1
0
        public override void RefreshSecondaryData()
        {
            _tipos = TipoEntidadList.GetList(false);

            SortedBindingList <EntidadInfo> elist = EntidadList.GetSortedList(EntidadList.GetList(true), "Tipo", ListSortDirection.Ascending);

            foreach (EntidadInfo item in elist)
            {
                TreeNode node = new TreeNode();
                node.Name               = item.Tipo;
                node.Text               = item.Observaciones;
                node.Tag                = item;
                node.ImageIndex         = 1;
                node.SelectedImageIndex = 2;

                Entidades_TV.Nodes[0].Nodes.Add(node);
            }

            Entidades_TV.ExpandAll();
        }
Exemplo n.º 2
0
        public override void RefreshSecondaryData()
        {
            SortedBindingList <EntidadInfo> elist = EntidadList.GetSortedList(EntidadList.GetList(true), "Tipo", ListSortDirection.Ascending);
            List <AgenteList> agentes             = new List <AgenteList>();

            foreach (EntidadInfo item in elist)
            {
                TreeNode node = new TreeNode();
                node.Name               = item.Tipo;
                node.Text               = item.Observaciones;
                node.Tag                = item;
                node.ImageIndex         = 1;
                node.SelectedImageIndex = 2;

                Entidades_TV.Nodes[0].Nodes.Add(node);

                agentes.Add(AgenteList.GetListByEntidad(item));
            }

            Entidades_TV.ExpandAll();

            int i = -1;

            foreach (TreeNode item in Entidades_TV.Nodes[0].Nodes)
            {
                i++;

                foreach (AgenteInfo agente in agentes[i])
                {
                    TreeNode node = new TreeNode();
                    node.Name               = agente.Oid.ToString();
                    node.Text               = agente.Nombre;
                    node.Tag                = agente;
                    node.ImageIndex         = 1;
                    node.SelectedImageIndex = 2;

                    item.Nodes.Add(node);
                }
            }
        }
Exemplo n.º 3
0
        protected void BuildNotificationsTree()
        {
            if (List == null)
            {
                return;
            }

            TreeNode node = null;

            node      = new TreeNode();
            node.Text = moleQule.Library.Common.EnumText <ETipoNotificacion> .GetLabel(ETipoNotificacion.GastoPendiente);

            node.Tag                = new NotifyEntity(ETipoNotificacion.Node, node.Text);
            node.ImageIndex         = 4;
            node.SelectedImageIndex = 4;
            Entidades_TV.Nodes.Add(node);

            node = new TreeNode();
            DateTime fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoPagos());

            node.Text               = String.Format(Store.Resources.Messages.NOFITY_PAGOS_PENDIENTES, fecha.ToShortDateString());
            node.Tag                = new NotifyEntity(ETipoNotificacion.Node, node.Text, true);
            node.ImageIndex         = 4;
            node.SelectedImageIndex = 4;
            Entidades_TV.Nodes[GASTOS_PENDIENTES].Nodes.Add(node);

            node      = new TreeNode();
            node.Text = moleQule.Library.Common.EnumText <ETipoNotificacion> .GetLabel(ETipoNotificacion.IngresoPendiente);

            node.Tag                = new NotifyEntity(ETipoNotificacion.Node, node.Text);
            node.ImageIndex         = 3;
            node.SelectedImageIndex = 3;
            Entidades_TV.Nodes.Add(node);

            foreach (NotifyEntity item in List)
            {
                switch (item.ETipoNotificacion)
                {
                case ETipoNotificacion.GastoPendiente:
                case ETipoNotificacion.IngresoPendiente:
                {
                    node      = new TreeNode();
                    node.Name = item.ETipoEntidad.ToString();
                    node.Text = item.FullTitle;
                    node.Tag  = item;
                    node.SelectedImageIndex = 1;
                    node.Checked            = item.Checked;

                    switch (item.ETipoNotificacion)
                    {
                    case ETipoNotificacion.GastoPendiente:
                        node.ImageIndex = 4;
                        Entidades_TV.Nodes[GASTOS_PENDIENTES].Nodes.Add(node);
                        break;

                    case ETipoNotificacion.IngresoPendiente:
                        node.ImageIndex = 3;
                        Entidades_TV.Nodes[INGRESOS_PENDIENTES].Nodes.Add(node);
                        break;
                    }
                }
                break;


                case ETipoNotificacion.PagoBancoPendiente:
                {
                    node      = new TreeNode();
                    node.Name = item.ETipoEntidad.ToString();
                    node.Text = item.FullTitle;
                    node.Tag  = item;
                    node.SelectedImageIndex = 1;
                    node.Checked            = item.Checked;
                    node.ImageIndex         = 6;

                    Entidades_TV.Nodes[GASTOS_PENDIENTES].Nodes[PAGOS_BANCO_PENDIENTES].Nodes.Add(node);
                } break;
                }
            }

            Entidades_TV.ExpandAll();
        }