예제 #1
0
        public ActionResult GestionAgenteCategoriaCliente(long inicio, long fin, int?idagente = null)
        {
            DateTime fechaInicio = new DateTime(inicio);
            DateTime fechaFin    = new DateTime(fin).AddDays(1).AddSeconds(-1);

            TabCollection tabs = new TabCollection();

            tabs.Add("tabGestionados", TabTarget.HtmlElement, "#tabGestionados", Rp3.AgendaComercial.Resources.LabelFor.IndicadorGestionados, true);
            tabs.Add("tabNoGestionados", TabTarget.HtmlElement, "#tabNoGestionados", Rp3.AgendaComercial.Resources.LabelFor.IndicadorNoGestionados, false);
            tabs.Add("tabProximos", TabTarget.HtmlElement, "#tabProximos", Rp3.AgendaComercial.Resources.LabelFor.IndicadorProximos, false);

            var data = DataBase.Reporte.GetDashboardAgenteAgenda(fechaInicio, fechaFin, Agente.IdAgente, idagente);
            DashboardAgenteCategoriaClienteModel model = new DashboardAgenteCategoriaClienteModel();

            model.Gestionados   = data.Where(p => p.IdCategoriaGestion == "G").OrderByDescending(p => p.FechaInicio).ToList();
            model.NoGestionados = data.Where(p => p.IdCategoriaGestion == "NG").OrderByDescending(p => p.FechaInicio).ToList();
            model.Proximos      = data.Where(p => p.IdCategoriaGestion == "P").OrderByDescending(p => p.FechaInicio).ToList();
            model.Tabs          = tabs;

            if (idagente.HasValue)
            {
                var agente = DataBase.Agentes.GetSingleOrDefault(p =>
                                                                 p.Estado != Rp3.AgendaComercial.Models.Constantes.Estado.Eliminado &&
                                                                 p.IdAgente == idagente.Value, includeProperties: "Usuario.Contact");

                if (agente != null)
                {
                    ViewBag.AgenteSelectNombre = agente.Usuario.Contact.DefaultFullName;
                }
            }

            return(PartialView("_AgenteDetalleCategoriaClientes", model));
        }
예제 #2
0
        private void InicializarTab()
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabtabla", TabTarget.HtmlElement, "#tabtabla", "Resultados", true);
            tabCollection.Add("tabtimeline", TabTarget.HtmlElement, "#tabtimeline", "Timeline", false);

            ViewBag.TabCollection = tabCollection;
        }
예제 #3
0
        private void InicializarTab()
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabdiaslaborales", TabTarget.HtmlElement, "#tabdiaslaborales", Rp3.AgendaComercial.Resources.TitleFor.DiasLaborales, true);
            tabCollection.Add("tabdiasnolaborables", TabTarget.HtmlElement, "#tabdiasnolaborables", Rp3.AgendaComercial.Resources.TitleFor.DiasNoLaborables, false);

            ViewBag.TabCollection = tabCollection;
        }
예제 #4
0
        private void InicializarTab()
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabgenerales", TabTarget.HtmlElement, "#tabgenerales", Rp3.AgendaComercial.Resources.TitleFor.DatosGenerales, true);
            tabCollection.Add("tabubicaciones", TabTarget.HtmlElement, "#tabubicaciones", Rp3.AgendaComercial.Resources.TitleFor.Ubicaciones, false);

            ViewBag.TabCollection = tabCollection;
        }
예제 #5
0
        private void InicializarTab(Rp3.AgendaComercial.Models.Ruta.Ruta ruta)
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabprogramacion", TabTarget.HtmlElement, "#tabprogramacion",
                              Rp3.AgendaComercial.Resources.TitleFor.Programacion + " " + Rp3.AgendaComercial.Resources.TitleFor.Ruta + ": " + ruta.Descripcion, true);
            tabCollection.Add("tabvistaprevia", TabTarget.HtmlElement, "#tabvistaprevia", Rp3.AgendaComercial.Resources.TitleFor.VistaPrevia, false);

            ViewBag.TabCollection = tabCollection;
        }
예제 #6
0
        public void WithTabName_Match()
        {
            //Setup
            var tabCollection = new TabCollection();
            tabCollection.Add(new TabInfo {TabName = "TestName1", PortalID = 1, TabID = 1});
            tabCollection.Add(new TabInfo {TabName = "TestName2", PortalID = 1, TabID = 2});
            tabCollection.Add(new TabInfo {TabName = "TestName3", PortalID = 1, TabID = 3});

            //Act
            var tab = tabCollection.WithTabName("TestName2");

            //Assert
            Assert.AreEqual("TestName2", tab.TabName);
        }
예제 #7
0
        public void WithTabName_NoMatch()
        {
            //Setup
            var tabCollection = new TabCollection();
            tabCollection.Add(new TabInfo {TabName = "TestName1", PortalID = 1, TabID = 1});
            tabCollection.Add(new TabInfo {TabName = "TestName2", PortalID = 1, TabID = 2});
            tabCollection.Add(new TabInfo {TabName = "TestName3", PortalID = 1, TabID = 3});

            //Act
            var tab = tabCollection.WithTabName("NO_MATCH");

            //Assert
            Assert.IsNull(tab);
        }
예제 #8
0
        /// <summary>
        ///     adds a new mainunit to the system
        /// </summary>
        private void AddMainUnit()
        {
            if (!LibraryData.SystemIsOpen)
            {
                LibraryData.CreateEmptySystem();
            }

            var t = new UcEscNum(LibraryData.FuturamaSys.MainUnits.Select(n => n.Id).ToList());

            if (t.ShowDialog() == false)
            {
                return;
            }

            var mu = LibraryData.AddEsc(t.Result);

            if (mu == null)
            {
                return;
            }
            var newunit = new MainUnitViewModel(mu, this);

            TabCollection.Add(newunit);
            OnSystemChanged(new SystemChangedEventArgs()
            {
                NewMainUnit = newunit
            });
        }
 public TabControlViewModel()
 {
     TabCollection.Add(new MeetingsCentresAndRoomsViewModel());
     TabCollection.Add(new MeetingsPlanningViewModel());
     TabCollection.Add(new AccessoriesViewModel());
     SelectedTabIndex = 0;
     SelectedTab      = TabCollection.FirstOrDefault();
 }
예제 #10
0
        private void InicializarTab()
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabproducto", TabTarget.HtmlElement, "#tabproducto", Rp3.AgendaComercial.Resources.TitleFor.Productos, true);
            //tabCollection.Add("tabdescuentos", TabTarget.HtmlElement, "#tabdescuentos", Rp3.AgendaComercial.Resources.TitleFor.Descuento, false);

            ViewBag.TabCollection = tabCollection;
        }
예제 #11
0
        private void Btivm_BrowserTabNewWindowRequestedEvent(Microsoft.Web.WebView2.Core.CoreWebView2NewWindowRequestedEventArgs e)
        {
            BrowserTabItemViewModel btivm = new();

            btivm.AddNewTab(e);
            btivm.BrowserTabNewWindowRequestedEvent += Btivm_BrowserTabNewWindowRequestedEvent;
            TabCollection.Add(btivm);
            BrowserTabControlSelectedIndex = TabCollection.Count - 1;
        }
예제 #12
0
        public void DNN_13659_WithTabName_NullTabName()
        {
            //Setup
            var tabCollection = new TabCollection();
            tabCollection.Add(new TabInfo {PortalID = 1, TabID = 1});

            //Act
            var tab = tabCollection.WithTabName("TestName");

            Assert.IsNull(tab);
        }
예제 #13
0
        public void WithTabName_Empty()
        {
            //Setup
            var tabCollection = new TabCollection();

            tabCollection.Add(new TabInfo {
                TabName = "TestName1", PortalID = 1, TabID = 1
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName2", PortalID = 1, TabID = 2
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName3", PortalID = 1, TabID = 3
            });

            //Act
            var tab = tabCollection.WithTabName(String.Empty);

            //Assert
            Assert.IsNull(tab);
        }
예제 #14
0
        public void WithTabName_Match()
        {
            //Setup
            var tabCollection = new TabCollection();

            tabCollection.Add(new TabInfo {
                TabName = "TestName1", PortalID = 1, TabID = 1
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName2", PortalID = 1, TabID = 2
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName3", PortalID = 1, TabID = 3
            });

            //Act
            var tab = tabCollection.WithTabName("TestName2");

            //Assert
            Assert.AreEqual("TestName2", tab.TabName);
        }
예제 #15
0
        public void WithTabName_NoMatch()
        {
            //Setup
            var tabCollection = new TabCollection();

            tabCollection.Add(new TabInfo {
                TabName = "TestName1", PortalID = 1, TabID = 1
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName2", PortalID = 1, TabID = 2
            });
            tabCollection.Add(new TabInfo {
                TabName = "TestName3", PortalID = 1, TabID = 3
            });

            //Act
            var tab = tabCollection.WithTabName("NO_MATCH");

            //Assert
            Assert.IsNull(tab);
        }
예제 #16
0
        public void DNN_13659_WithTabName_NullTabName()
        {
            //Setup
            var tabCollection = new TabCollection();

            tabCollection.Add(new TabInfo {
                PortalID = 1, TabID = 1
            });

            //Act
            var tab = tabCollection.WithTabName("TestName");

            Assert.IsNull(tab);
        }
예제 #17
0
 public override void OnLoad()
 {
     Version = Globals.Assembly.EXE_VERSION;
     if (_appUser != null && _appUser.RoleId == Role.ADMIN)
     {
         TabCollection.Add(AppuserVM);
     }
     TabCollection.Add(HardwareVM);
     TabCollection.Add(UserVM);
     TabCollection.Add(SupplierVM);
     TabCollection.Add(ReportVM);
     TabCollection.Add(BbSearchVM);
     TabCollection.Add(BbCircularVM);
     SelectedTab = TabCollection.FirstOrDefault();
 }
예제 #18
0
        public MainWindowViewModel()
        {
            BrowserTabItemViewModel btivm = new();

            btivm.Source = new Uri(@"https://bing.com");
            btivm.BrowserTabNewWindowRequestedEvent += Btivm_BrowserTabNewWindowRequestedEvent;
            TabCollection.Add(btivm);
            BrowserTabControlSelectedIndex = 0;

            BrowserTabItemViewModel btivm1 = new();

            btivm1.Source = new Uri(@"https://microsoft.com");
            btivm1.BrowserTabNewWindowRequestedEvent += Btivm_BrowserTabNewWindowRequestedEvent;
            TabCollection.Add(btivm1);
        }
예제 #19
0
        private void InicializarTab(string tipoTarea, bool isNew = false)
        {
            TabCollection tabCollection = new TabCollection();

            tabCollection.Add("tabdato", TabTarget.HtmlElement, "#tabdato", Rp3.AgendaComercial.Resources.TitleFor.DatosGenerales, true);

            if (!isNew)
            {
                if (tipoTarea == Rp3.AgendaComercial.Models.Constantes.TipoTarea.ActualizacionClientes)
                {
                    tabCollection.Add("tabnuevos", TabTarget.HtmlElement, "#tabnuevos", Rp3.AgendaComercial.Resources.TitleFor.Nuevos, false);
                    tabCollection.Add("tabexistentes", TabTarget.HtmlElement, "#tabexistentes", Rp3.AgendaComercial.Resources.TitleFor.Existentes, false);
                    tabCollection.Add("tabgestion", TabTarget.HtmlElement, "#tabgestion", Rp3.AgendaComercial.Resources.TitleFor.GestionVisita, false);
                }

                if (tipoTarea != Rp3.AgendaComercial.Models.Constantes.TipoTarea.CheckListOportunidad)
                {
                    tabCollection.Add("tabruta", TabTarget.HtmlElement, "#tabruta", Rp3.AgendaComercial.Resources.TitleFor.Ruta, false);
                }

                tabCollection.Add("tabactividad", TabTarget.HtmlElement, "#tabactividad", Rp3.AgendaComercial.Resources.TitleFor.Actividades, false);
            }

            ViewBag.TabCollection = tabCollection;

            ViewBag.ClienteCampoGrupos = new List <ClienteCampoGrupo>()
            {
                new ClienteCampoGrupo()
                {
                    IdGrupo = 1, Grupo = Rp3.AgendaComercial.Resources.LabelFor.PersonaNatural
                },
                new ClienteCampoGrupo()
                {
                    IdGrupo = 2, Grupo = Rp3.AgendaComercial.Resources.LabelFor.PersonaJuridica
                },
                new ClienteCampoGrupo()
                {
                    IdGrupo = 3, Grupo = Rp3.AgendaComercial.Resources.LabelFor.Persona
                },
                new ClienteCampoGrupo()
                {
                    IdGrupo = 4, Grupo = Rp3.AgendaComercial.Resources.LabelFor.Direccion
                },
                new ClienteCampoGrupo()
                {
                    IdGrupo = 5, Grupo = Rp3.AgendaComercial.Resources.LabelFor.Contacto
                }
            };

            ViewBag.ClienteCampos = DataBase.ParametroClienteCampos.Get();
        }
예제 #20
0
        /// <summary>
        /// Adds al the mainunits and the matrix tab
        /// </summary>
        private async void AddMainUnitsToTab()
        {
            if (!LibraryData.SystemIsOpen)
            {
                return;
            }

            TabCollection.Clear();
            await Task.Delay(150);

            foreach (var m in LibraryData.FuturamaSys.MainUnits)
            {
                TabCollection.Add(new MainUnitViewModel(m, this));
            }
            SelectedTab = TabCollection.FirstOrDefault(i => i.Id == 0);

            TabCollection.Add(new PanelViewModel(this));
            TabCollection.Add(_comViewModel);
        }
예제 #21
0
        private void AddMainUnit(int id)
        {
            if (!LibraryData.SystemIsOpen)
            {
                LibraryData.CreateEmptySystem();
            }
            var esc = LibraryData.AddEsc(id);

            if (esc == null)
            {
                return;
            }
            var escview = new MainUnitViewModel(esc, this);

            if (!TabCollection.Contains(escview))
            {
                TabCollection.Add(escview);
            }
        }
예제 #22
0
        private void AddTabsToCollection(TabCollection inTabs, TabCollection outtabs)
        {
            // 1.0.2 - Workaround for dnn powered content localization - [alexander.zimmer] & [simon.meraner]
            // serialize tab object in order to be able to identify whether the content localization is active.
            System.Xml.Serialization.XmlSerializer tabSerializer = new System.Xml.Serialization.XmlSerializer(typeof(DotNetNuke.Entities.Tabs.TabInfo));
            foreach (System.Collections.Generic.KeyValuePair <int, DotNetNuke.Entities.Tabs.TabInfo> kvp in inTabs)
            {
                if (!outtabs.ContainsKey(kvp.Key))
                {
                    System.IO.StringWriter stream = new System.IO.StringWriter();

                    tabSerializer.Serialize(stream, kvp.Value);

                    System.IO.StringReader sr     = new System.IO.StringReader(stream.ToString());
                    XmlDocument            xmlDoc = new XmlDocument();
                    xmlDoc.Load(sr);

                    stream.Close();

                    var tabCulture = xmlDoc.SelectSingleNode("/tab/cultureCode");

                    bool showCulture = true;

                    if (tabCulture != null)
                    {
                        XmlNode cultureNode = tabCulture.FirstChild;

                        // dnn 5.5.x detected ... exclude tabs where the cultures doesn`t matcj the current culture
                        if (cultureNode != null && cultureNode.Value != System.Threading.Thread.CurrentThread.CurrentCulture.Name)
                        {
                            showCulture = false;
                        }
                    }
                    // -------------------------------------------------------------------------------------------------------

                    if (showCulture)
                    {
                        outtabs.Add(kvp.Key, kvp.Value);
                    }
                }
            }
        }
예제 #23
0
        public void WithTabName_Empty()
        {
            //Setup
            var tabCollection = new TabCollection();
            tabCollection.Add(new TabInfo {TabName = "TestName1", PortalID = 1, TabID = 1});
            tabCollection.Add(new TabInfo {TabName = "TestName2", PortalID = 1, TabID = 2});
            tabCollection.Add(new TabInfo {TabName = "TestName3", PortalID = 1, TabID = 3});

            //Act
            var tab = tabCollection.WithTabName(String.Empty);

            //Assert
            Assert.IsNull(tab);
        }