public static Dictionary <string, string> GetNameGroupsDictionaryWithoutConfiguration()
        {
            string contentCommand = "SELECT Id, Title FROM membership WHERE Configuration = 0 AND Active = 1";
            Dictionary <string, string> nameGroups = DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title");

            return(nameGroups);
        }
        public static Dictionary <string, string> GetFilterDictionaryIfIsFullConfiguration()
        {
            string contentCommand = "SELECT Id, Filter FROM membership WHERE Configuration = 1 AND Active = 1 AND ActiveConfiguration = 1 AND Filter IS NOT NULL";
            Dictionary <string, string> nameGroups = DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Filter");

            return(nameGroups);
        }
        public static Dictionary <string, string> GetNameActivityDictionary()
        {
            string contentCommand = "SELECT Id, NameActivity FROM nameactivity WHERE ID > 1";
            Dictionary <string, string> nameActivity = DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "NameActivity");

            return(nameActivity);
        }
        private static List <ActiveApplication> GetDateForActiveApplication(List <ActiveApplication> activeApplication)
        {
            if (activeApplication.Any())
            {
                string contentCommand = string.Empty;
                Dictionary <string, string> dateIdTitileList = new Dictionary <string, string>();

                contentCommand = "SELECT IdTitle, Date FROM alldate WHERE IdTitle IN(";
                for (int i = 0; i < activeApplication.Count; i++)
                {
                    contentCommand += activeApplication[i].ID + ((i < activeApplication.Count - 1) ? ", " : "");
                }
                contentCommand  += ")";
                dateIdTitileList = DataBase.GetDictionaryFromExecuteReader(contentCommand, "IdTitle", "Date");
                for (int i = 0; i < activeApplication.Count; i++)
                {
                    activeApplication[i].Date = dateIdTitileList.FirstOrDefault(x => string.Equals(x.Key.ToString(), activeApplication[i].ID.ToString())).Value;
                    if (String.IsNullOrEmpty(activeApplication[i].Date))
                    {
                        activeApplication[i].Date = DateTime.Now.ToString();
                    }
                }
            }

            return(activeApplication.OrderBy(x => x.Date).Reverse().ToList());
        }
        public static Dictionary <string, string> GetIDNonActiveWindow()
        {
            string contentCommand = "SELECT IdNoActiveWindow, alldate.Date AS Date FROM noactivewindow ";

            contentCommand += "INNER JOIN alldate ON alldate.Id = noactivewindow.IdNoActiveWindow";
            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "IdNoActiveWindow", "Date"));
        }
Example #6
0
        public static Dictionary <string, string> GetNameApplicationDictionary()
        {
            string contentCommand = "SELECT activeapplications.Id, activeapplications.Title FROM exceptionapplication ";

            contentCommand += "INNER JOIN activeapplications ON activeapplications.Id = exceptionapplication.IdExceptionApplication ";
            contentCommand += "WHERE activeapplications.IdMembership IS NULL";
            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title"));
        }
Example #7
0
        public static Dictionary <string, string> GetNameApplicationWitGroupDictionary()
        {
            string contentCommand = "SELECT activeapplications.IdMembership AS IdMembership, membership.Title AS Title FROM exceptionapplication ";

            contentCommand += "INNER JOIN activeapplications ON activeapplications.Id = exceptionapplication.IdExceptionApplication ";
            contentCommand += "INNER JOIN membership ON membership.Id = activeapplications.IdMembership ";
            contentCommand += "WHERE activeapplications.IdMembership IS NOT NULL ";
            contentCommand += "GROUP BY activeapplications.IdMembership, membership.Title";
            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "IdMembership", "Title"));
        }
        public static Dictionary <string, string> GetNameGroupsDictionaryIfIsActive(bool useIsActive = true)
        {
            string isActive = string.Empty;

            if (useIsActive)
            {
                isActive = "WHERE Active = 1";
            }
            string contentCommand = "SELECT Id, Title FROM membership " + isActive;

            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title"));
        }
        public static Dictionary <string, string> GetNameApplicationDictionaryWithGroup(int idGroup)
        {
            string contentCommand = "SELECT Id, Title FROM activeapplications WHERE IdMembership = " + idGroup + " AND AutoGrouping = 1";

            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title"));
        }
        public static Dictionary <string, string> GetNameApplicationDictionaryWithoutGroup()
        {
            string contentCommand = "SELECT Id, Title FROM activeapplications WHERE IdMembership IS NULL";

            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title"));
        }
        public static Dictionary <string, string> GetNameApplicationDictionary()
        {
            string contentCommand = "SELECT Id, Title FROM activeapplications";

            return(DataBase.GetDictionaryFromExecuteReader(contentCommand, "Id", "Title"));
        }