예제 #1
0
        public static string GetGroupTypeRestriction(GroupType g)
        {
            string stringId = g.ToString();

            if (LocalizationDict.TryGetValue("groupType." + stringId + ".restriction", out string value))
            {
                if (value == "")
                {
                    return(stringId);
                }

                if (value.Contains("{plural}"))
                {
                    value = value.Replace("{plural}", GetGroupTypePlural(g));
                }
                else if (value.Contains("{single}"))
                {
                    value = value.Replace("{single}", GetGroupType(g));
                }

                return(value);
            }
            else
            {
                return(stringId);
            }
        }
    public IEnumerable <IGrouping <int, MyClass> > GetGroupedValue(GroupType groupType)
    {
        var propertyName = groupType.ToString();
        var property     = GetType().GetProperty(propertyName);

        return(property?.GetValue(this) as IEnumerable <IGrouping <int, MyClass> >);
    }
예제 #3
0
 public static string ToString(GroupType value)
 {
     if (value == GroupType.Person)
     {
         return("person");
     }
     else if (value == GroupType.Animal)
     {
         return("animal");
     }
     else if (value == GroupType.Device)
     {
         return("device");
     }
     else if (value == GroupType.Medication)
     {
         return("medication");
     }
     else if (value == GroupType.Substance)
     {
         return("substance");
     }
     else
     {
         throw new ArgumentException("Unrecognized GroupType value: " + value.ToString());
     }
 }
예제 #4
0
        public static string GetGroupTypeText(this GroupType groupType)
        {
            switch (groupType)
            {
            case GroupType.Index: return("Unique index");

            case GroupType.MonthName: return("Name of month");

            case GroupType.MonthNumber: return("Month numeric value");

            case GroupType.DayName: return("Name of day");

            case GroupType.DayNumber: return("Day numeric value");

            case GroupType.OriginalName: return("Original file name");

            case GroupType.FileName: return("File name");

            case GroupType.FileExtension: return("File extension");

            case GroupType.FileNameWithExtension: return("File name with extension");

            case GroupType.WidthPx: return("Width in pixels");

            case GroupType.HeightPx: return("Height in pixels");

            //case GroupType.HorizontalDpi: return "Horizontal DPI";
            //case GroupType.VerticalDpi: return "Vertical DPI";
            default: return(groupType.ToString());
            }
        }
예제 #5
0
        public void WriteXML(string destinationFolder, ElderScrollsPlugin master)
        {
            XDocument header = new XDocument();
            XElement  root   = new XElement("GroupInfo");

            header.Add(root);

            root.Add(
                new XElement("Type", type.ToString()),
                WriteTypeDataXML(master)
                );

            header.Save(Path.Combine(destinationFolder, "GroupHeader.metadata"));

            foreach (var group in Children)
            {
                string newDir = Path.Combine(destinationFolder, group.ToString());
                Directory.CreateDirectory(newDir);
                group.WriteXML(newDir, master);
            }

            foreach (var view in ChildRecordViews)
            {
                var record = view.Record;
                if (record.Flags.HasFlag(RecordFlag.Deleted))
                {
                    continue;
                }
                record.WriteXML(Path.Combine(destinationFolder, record.ToString() + ".xml"), master);
            }
        }
예제 #6
0
    public string GetLocalizationText_GroupTypeRestriction(GroupType groupType)
    {
        string stringId = groupType.ToString();

        if (commonLocalizationData.TryGetValue("groupType." + stringId + ".restriction", out string value))
        {
            if (value == "")
            {
                Debug.Log("NOT FOUND " + groupType);
                return(stringId);
            }

            if (value.Contains("{plural}"))
            {
                value = value.Replace("{plural}", GetLocalizationText_GroupTypePlural(stringId));
            }
            else if (value.Contains("{single}"))
            {
                value = value.Replace("{single}", GetLocalizationText(groupType));
            }

            return(value);
        }
        else
        {
            return(stringId);
        }
    }
예제 #7
0
        /// <summary>
        /// Shows the edit details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowEditDetails(GroupType groupType)
        {
            if (groupType != null)
            {
                if (groupType.Id == 0)
                {
                    lReadOnlyTitle.Text = ActionTitle.Add("Check-in Configuration").FormatAsHtmlTitle();
                }
                else
                {
                    lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();
                }

                SetEditMode(true);

                tbName.Text        = groupType.Name;
                tbDescription.Text = groupType.Description;

                var rockContext = new RockContext();

                groupType.LoadAttributes(rockContext);

                cbAgeRequired.Checked             = groupType.GetAttributeValue("core_checkin_AgeRequired").AsBoolean(true);
                cbGradeRequired.Checked           = groupType.GetAttributeValue("core_checkin_GradeRequired").AsBoolean(true);
                cbHidePhotos.Checked              = groupType.GetAttributeValue("core_checkin_HidePhotos").AsBoolean(true);
                cbPreventDuplicateCheckin.Checked = groupType.GetAttributeValue("core_checkin_PreventDuplicateCheckin").AsBoolean(true);
                cbPreventInactivePeople.Checked   = groupType.GetAttributeValue("core_checkin_PreventInactivePeople").AsBoolean(true);
                ddlType.SetValue(groupType.GetAttributeValue("core_checkin_CheckInType"));
                cbDisplayLocCount.Checked = groupType.GetAttributeValue("core_checkin_DisplayLocationCount").AsBoolean(true);
                cbEnableManager.Checked   = groupType.GetAttributeValue("core_checkin_EnableManagerOption").AsBoolean(true);
                cbEnableOverride.Checked  = groupType.GetAttributeValue("core_checkin_EnableOverride").AsBoolean(true);
                nbMaxPhoneLength.Text     = groupType.GetAttributeValue("core_checkin_MaximumPhoneSearchLength");
                nbMaxResults.Text         = groupType.GetAttributeValue("core_checkin_MaxSearchResults");
                nbMinPhoneLength.Text     = groupType.GetAttributeValue("core_checkin_MinimumPhoneSearchLength");
                cbUseSameOptions.Checked  = groupType.GetAttributeValue("core_checkin_UseSameOptions").AsBoolean(false);
                ddlPhoneSearchType.SetValue(groupType.GetAttributeValue("core_checkin_PhoneSearchType"));
                nbRefreshInterval.Text = groupType.GetAttributeValue("core_checkin_RefreshInterval");
                tbSearchRegex.Text     = groupType.GetAttributeValue("core_checkin_RegularExpressionFilter");
                cbReuseCode.Checked    = groupType.GetAttributeValue("core_checkin_ReuseSameCode").AsBoolean(false);

                var searchType = DefinedValueCache.Read(groupType.GetAttributeValue("core_checkin_SearchType").AsGuid());
                if (searchType != null)
                {
                    ddlSearchType.SetValue(searchType.Id.ToString());
                }

                nbCodeAlphaNumericLength.Text = groupType.GetAttributeValue("core_checkin_SecurityCodeLength");
                nbCodeAlphaLength.Text        = groupType.GetAttributeValue("core_checkin_SecurityCodeAlphaLength");
                nbCodeNumericLength.Text      = groupType.GetAttributeValue("core_checkin_SecurityCodeNumericLength");
                cbCodeRandom.Checked          = groupType.GetAttributeValue("core_checkin_SecurityCodeNumericRandom").AsBoolean(true);
                cbAllowCheckout.Checked       = groupType.GetAttributeValue("core_checkin_AllowCheckout").AsBoolean(true);
                nbAutoSelectDaysBack.Text     = groupType.GetAttributeValue("core_checkin_AutoSelectDaysBack");
                ddlAutoSelectOptions.SetValue(groupType.GetAttributeValue("core_checkin_AutoSelectOptions"));

                BuildAttributeEdits(groupType, true);

                SetFieldVisibility();
            }
        }
예제 #8
0
        private GroupTypeDescriptionAttribute GetGroupDescription(GroupType group)
        {
            var groupType            = group.GetType();
            var enumMember           = groupType.GetMember(group.ToString())[0];
            var attributes           = enumMember.GetCustomAttributes(typeof(GroupTypeDescriptionAttribute));
            var groupTypeDescription = (GroupTypeDescriptionAttribute)attributes.ElementAt(0);

            return(groupTypeDescription);
        }
    // -----------------------------------------------------------------------------------
    // ShowAccessRequirementsUI
    // @Client
    // Overwritten for custom functionality
    // -----------------------------------------------------------------------------------
    protected override void ShowAccessRequirementsUI()
    {
        Player player = Player.localPlayer;

        if (!player)
        {
            return;
        }

        if (instance == null)
        {
            instance = FindObjectOfType <UCE_UI_InteractableAccessRequirement>();
        }

        instance.Show(this);

        instance.AddMessage(labelZoneCapacity + enterCount.ToString() + "/" + enterLimit.ToString(), enterCount < enterLimit ? instance.textColor : instance.errorColor);

        instance.AddMessage(labelGroup + groupType.ToString(), instance.textColor);

        if (groupType == GroupType.Party)
        {
            if (enterParty == "")
            {
                instance.AddMessage(labelZoneParty + labelNone, instance.textColor);
            }
            else
            {
                instance.AddMessage(labelZoneParty + enterParty, checkParty(player) ? instance.textColor : instance.errorColor);
            }
        }

        if (groupType == GroupType.Guild)
        {
            if (enterGuild == "")
            {
                instance.AddMessage(labelZoneGuild + labelNone, instance.textColor);
            }
            else
            {
                instance.AddMessage(labelZoneGuild + enterGuild, checkGuild(player) ? instance.textColor : instance.errorColor);
            }
        }

        if (groupType == GroupType.Realm)
        {
            if (enterRealm <= 0)
            {
                instance.AddMessage(labelZoneRealm + labelNone, instance.textColor);
            }
            else
            {
                instance.AddMessage(labelZoneRealm + enterRealm, checkRealm(player) ? instance.textColor : instance.errorColor);
            }
        }
    }
예제 #10
0
    private static string GetWeaponTypeString(GroupType groupTag)
    {
        string weaponType;

        switch (groupTag)
        {
        case GroupType.ONE_HANDED_WEAPON:
            weaponType = "ONE_HANDED";
            break;

        case GroupType.TWO_HANDED_WEAPON:
            weaponType = "TWO_HANDED";
            break;

        case GroupType.ONE_HANDED_SWORD:
        case GroupType.TWO_HANDED_SWORD:
            weaponType = "SWORD";
            break;

        case GroupType.ONE_HANDED_AXE:
        case GroupType.TWO_HANDED_AXE:
            weaponType = "AXE";
            break;

        case GroupType.ONE_HANDED_MACE:
        case GroupType.TWO_HANDED_MACE:
            weaponType = "MACE";
            break;

        case GroupType.ONE_HANDED_GUN:
        case GroupType.TWO_HANDED_GUN:
            weaponType = "GUN";
            break;

        case GroupType.BOW:
        case GroupType.CROSSBOW:
            weaponType = "BOW";
            break;

        case GroupType.WAND:
        case GroupType.STAFF:
        case GroupType.SPEAR:
        case GroupType.FIST:
        case GroupType.MELEE_WEAPON:
        case GroupType.RANGED_WEAPON:
            weaponType = groupTag.ToString();
            break;

        default:
            weaponType = string.Empty;
            break;
        }

        return(weaponType);
    }
예제 #11
0
 internal static Texture GetPreviewIcon(PreviewItem item, RuleObject rule)
 {
     if (rule == null || item.layerType != LayerType.Group)
     {
         return(previewIcons[item.layerType.ToString()]);
     }
     else
     {
         GroupType groupType = GroupType.EMPTY;
         string[]  args;
         /*string name = */ rule.AnalysisGroupName(item.name, out groupType, out args);
         if (previewIcons.ContainsKey(groupType.ToString()) && previewIcons[groupType.ToString()] != null)
         {
             return(previewIcons[groupType.ToString()]);
         }
         else
         {
             return(previewIcons[LayerType.Group.ToString()]);
         }
     }
 }
예제 #12
0
        public GroupTimeSpanModel(GroupType group)
        {
            // Evaluates to the current day at midnight 00:00:00
            var now = DateTime.Now.Date;

            switch (group)
            {
            case GroupType.IsPinned:
                MaxTime = GroupTimeSpanModel.IsPinnedMaxTime;
                MinTime = GroupTimeSpanModel.IsPinnedMinTime;
                break;

            case GroupType.Today:
                MaxTime = GroupTimeSpanModel.TodayMaxTime;
                MinTime = GroupTimeSpanModel.TodayMinTime;
                break;

            case GroupType.Yesterday:
                MaxTime = GroupTimeSpanModel.YesterdayMaxTime;
                MinTime = GroupTimeSpanModel.YesterdayMinTime;
                break;

            case GroupType.ThisWeek:
                MaxTime = GroupTimeSpanModel.ThisWeekMaxTime;
                MinTime = GroupTimeSpanModel.ThisWeekMinTime;
                break;

            case GroupType.LastWeek:
                MaxTime = GroupTimeSpanModel.LastWeekMaxTime;
                MinTime = GroupTimeSpanModel.LastWeekMinTime;
                break;

            case GroupType.ThisMonth:
                MaxTime = GroupTimeSpanModel.ThisMonthMaxTime;
                MinTime = GroupTimeSpanModel.ThisMonthMinTime;
                break;

            case GroupType.LastMonth:
                MaxTime = GroupTimeSpanModel.LastMonthMaxTime;
                MinTime = GroupTimeSpanModel.LastMonthMinTime;
                break;

            case GroupType.Older:
                MaxTime = GroupTimeSpanModel.OlderMaxTime;
                MinTime = GroupTimeSpanModel.OlderMinTime;
                break;

            default:
                throw new NotSupportedException("Enum item not supported:" + group.ToString());
            }

            Group = group;
        }
예제 #13
0
        public IActionResult SERVICES_History(int _ReserveID, GroupType _GroupId)
        {
            var _Item = from s in _context.Class_BookItem
                        join s2 in _context.Class_GroupLevelItem on s.GroupLevelItemId equals s2.Id
                        join s3 in _context.Class_GroupLevel on s2.GroupLevelId equals s3.Id
                        where s.BookId == _ReserveID && s3.GroupId == _GroupId
                        orderby s.StatusId, s.DateConsume, s2.Name
            select s;

            ViewBag.BookId        = _ReserveID;
            ViewBag.GroupTypeName = _GroupId.ToString();
            return(View(_Item));
        }
예제 #14
0
        public static Task<Search> Search(string access_token, string q, string fields = "members_count", int country_id = 0, int city_id = 0, byte sort = 0, short count = 1000, short offset = 0, GroupType type = GroupType.all, int future = 0)
        {
            return Task.Run<Search>(() =>
            {
                try
                {
                    //Собираем параметры
                    StringBuilder data = new StringBuilder();
                    data.Append("&sort=" + (sort == 6 ? 0 : sort));
                    data.Append("&offset=" + offset);
                    data.Append("&count=" + count);
                    data.Append("&future=" + future);

                    if (type != GroupType.all)
                        data.Append("&type=" + type.ToString());

                    if (country_id != 0)
                        data.Append("&country_id=" + country_id);

                    if (city_id != 0 && country_id != 0)
                        data.Append("&city_id=" + city_id);

                    if (q != null)
                        data.Append("&q=" + q);

                    if (fields != null)
                        data.Append("&fields=" + fields);

                    if (access_token != null)
                        data.Append("&access_token=" + access_token);
                    else if (VKdata.token != null)
                        data.Append("&access_token=" + VKdata.token);


                    //Получаем json данные
                    string json = Regex.Replace(result.get("groups.search", data.ToString(), true), "^{\"response\":\\[[0-9]+,{\"", "{\"response\":[{\"");

                    //Чистим ресурсы и возвращаем результаты
                    access_token = null; q = null; fields = null; data = null;
                    return JsonConvert.DeserializeObject<Search>(json);
                }
                catch (Newtonsoft.Json.JsonReaderException) { }
                catch { }

                //Ошибка
                access_token = null; q = null; fields = null;
                return new Search();
            });
        }
예제 #15
0
        public override void Paint(MNPageContext context)
        {
            if (context.drawSelectionMarks)
            {
                Rectangle bounds = Area.GetBounds(context);

                string title = string.Format("[{0}] {1}", GroupType.ToString(), Text);

                context.g.DrawRectangle(Pens.DarkKhaki, bounds);
                context.g.DrawString(title, SystemFonts.CaptionFont, Brushes.DarkKhaki, bounds);
            }

            // draw selection marks
            base.Paint(context);
        }
예제 #16
0
        public override string ToString()
        {
            var counter = 0;

            foreach (var c in Conditions)
            {
                foreach (var definition in c.ParameterDefinitions)
                {
                    definition.Params = $"@p{counter++}";
                }
            }

            return((GroupType.ToString().ToUpperInvariant() ?? "") + " " + "(" + string.Join("\n", Conditions) +
                   (Groups.Any() ? "\n" + string.Join("\n", Groups) : string.Empty) + ")");
        }
예제 #17
0
        private void AddHeader(double?v1, double?v2)
        {
            int  fields = Type == GroupType.Count || Type == GroupType.Weight ? 2 : 0;
            Grid g      = new Grid();

            g.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            g.ColumnDefinitions.Add(new ColumnDefinition());
            Button b = new Button()
            {
                Content = "X", Width = 20, Height = 20
            };

            b.Click += RemoveGroup_Click;
            Grid.SetColumn(b, 0);
            g.Children.Add(b);
            TextBlock label = new TextBlock()
            {
                Text = Type.ToString(), HorizontalAlignment = HorizontalAlignment.Stretch
            };

            Grid.SetColumn(label, 1);
            g.Children.Add(label);
            for (int i = 0; i < fields; i++)
            {
                g.ColumnDefinitions.Add(new ColumnDefinition()
                {
                    Width = GridLength.Auto
                });
                NumberBox n = new NumberBox()
                {
                    AllowDouble = (Type != GroupType.Count), Width = 60, TextAlignment = TextAlignment.Center
                };
                if (i == 0 && v1 != null)
                {
                    n.Text = v1.ToString();
                }
                if (i == 1 && v2 != null)
                {
                    n.Text = v2.ToString();
                }
                Grid.SetColumn(n, g.ColumnDefinitions.Count - 1);
                g.Children.Add(n);
            }
            ContentPanel.Children.Add(g);
        }
예제 #18
0
    public string GetLocalizationText(GroupType groupType)
    {
        string stringId = groupType.ToString();

        if (commonLocalizationData.TryGetValue("groupType." + stringId, out string value))
        {
            if (value == "")
            {
                return(stringId);
            }
            return(value);
        }
        else
        {
            return(stringId);
        }
    }
예제 #19
0
        public static string GetGroupTypePlural(GroupType g)
        {
            string stringId = g.ToString();

            if (LocalizationDict.TryGetValue("groupType." + stringId + ".plural", out string value))
            {
                if (value == "")
                {
                    return(stringId);
                }
                return(value);
            }
            else
            {
                return(stringId);
            }
        }
        public override XmlElement ToXml(XmlElement parent)
        {
            XmlElement e = parent.OwnerDocument.CreateElement(ELEMENTNAME);

            SetAttribute(e, GUID, Key);
            SetAttribute(e, NAME, Name);
            SetAttribute(e, DESCRIPTION, Description);
            SetAttribute(e, GROUPTYPE, GroupType.ToString());
            if (GroupType == AzAlternative.GroupType.LdapQuery)
            {
                XmlElement lq = parent.OwnerDocument.CreateElement(LDAPQUERY);
                lq.InnerText = LdapQuery;
                e.AppendChild(lq);
            }

            parent.AppendChild(e);

            return(e);
        }
예제 #21
0
        /// <summary>
        /// Shows the readonly details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowReadonlyDetails( GroupType groupType )
        {
            SetEditMode( false );

            if ( groupType != null )
            {
                hfGroupTypeId.SetValue( groupType.Id );
                lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();

                lDescription.Text = groupType.Description;

                groupType.LoadAttributes();

                hlType.Text = groupType.GetAttributeValue( "CheckInType" );
                hlType.Visible = true;

                DescriptionList mainDetailsDescList = new DescriptionList();
                DescriptionList leftDetailsDescList = new DescriptionList();
                DescriptionList rightDetailsDescList = new DescriptionList();

                string scheduleList = string.Empty;
                using ( var rockContext = new RockContext() )
                {
                    var descendantGroupTypeIds = new GroupTypeService( rockContext ).GetAllAssociatedDescendents( groupType.Id ).Select( a => a.Id );
                    scheduleList = new GroupLocationService( rockContext )
                        .Queryable().AsNoTracking()
                        .Where( a =>
                            a.Group.GroupType.Id == groupType.Id ||
                            descendantGroupTypeIds.Contains( a.Group.GroupTypeId ) )
                        .SelectMany( a => a.Schedules )
                        .Select( s => s.Name )
                        .Distinct()
                        .OrderBy( s => s )
                        .ToList()
                        .AsDelimited( ", " );
                }

                if ( !string.IsNullOrWhiteSpace( scheduleList ) )
                {
                    mainDetailsDescList.Add( "Scheduled Times", scheduleList );
                }

                groupType.LoadAttributes();

                if ( groupType.AttributeValues.ContainsKey( "core_checkin_CheckInType" ) )
                {
                    leftDetailsDescList.Add( "Check-in Type", groupType.AttributeValues["core_checkin_CheckInType"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_SecurityCodeLength" ) )
                {
                    leftDetailsDescList.Add( "Security Code Length", groupType.AttributeValues["core_checkin_SecurityCodeLength"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_SearchType" ) )
                {
                    rightDetailsDescList.Add( "Search Type", groupType.AttributeValues["core_checkin_SearchType"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_PhoneSearchType" ) )
                {
                    rightDetailsDescList.Add( "Phone Number Compare", groupType.AttributeValues["core_checkin_PhoneSearchType"].ValueFormatted );
                }

                lblMainDetails.Text = mainDetailsDescList.Html;
                lblLeftDetails.Text = leftDetailsDescList.Html;
                lblRightDetails.Text = rightDetailsDescList.Html;
            }
        }
예제 #22
0
 public override string ToString()
 {
     return((GroupType.ToString().ToUpperInvariant() ?? "") + " " + ("(" + string.Join("\n", Conditions) + (Groups.Any() ? "\n" + string.Join("\n", Groups) : string.Empty) + ")"));
 }
예제 #23
0
        /// <summary>
        /// Shows the readonly details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowReadonlyDetails(GroupType groupType)
        {
            SetEditMode(false);

            if (groupType != null)
            {
                hfGroupTypeId.SetValue(groupType.Id);
                lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();

                lDescription.Text = groupType.Description;

                groupType.LoadAttributes();

                hlType.Text    = groupType.GetAttributeValue("CheckInType");
                hlType.Visible = true;

                DescriptionList mainDetailsDescList  = new DescriptionList();
                DescriptionList leftDetailsDescList  = new DescriptionList();
                DescriptionList rightDetailsDescList = new DescriptionList();

                string scheduleList = string.Empty;
                using (var rockContext = new RockContext())
                {
                    var descendantGroupTypeIds = new GroupTypeService(rockContext).GetCheckinAreaDescendants(groupType.Id).Select(a => a.Id);
                    scheduleList = new GroupLocationService(rockContext)
                                   .Queryable().AsNoTracking()
                                   .Where(a =>
                                          a.Group.GroupType.Id == groupType.Id ||
                                          descendantGroupTypeIds.Contains(a.Group.GroupTypeId))
                                   .SelectMany(a => a.Schedules)
                                   .Select(s => s.Name)
                                   .Distinct()
                                   .OrderBy(s => s)
                                   .ToList()
                                   .AsDelimited(", ");
                }

                if (!string.IsNullOrWhiteSpace(scheduleList))
                {
                    mainDetailsDescList.Add("Scheduled Times", scheduleList);
                }

                groupType.LoadAttributes();

                if (groupType.AttributeValues.ContainsKey("core_checkin_CheckInType"))
                {
                    leftDetailsDescList.Add("Check-in Type", groupType.AttributeValues["core_checkin_CheckInType"].ValueFormatted);
                }

                if (groupType.AttributeValues.ContainsKey("core_checkin_SearchType"))
                {
                    var searchType = groupType.AttributeValues["core_checkin_SearchType"];
                    rightDetailsDescList.Add("Search Type", searchType.ValueFormatted);

                    var searchTypeGuid = searchType.Value.AsGuid();
                    if (searchTypeGuid.Equals(Rock.SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_NAME_AND_PHONE.AsGuid()) ||
                        searchTypeGuid.Equals(Rock.SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_PHONE_NUMBER.AsGuid()))
                    {
                        rightDetailsDescList.Add("Phone Number Compare", groupType.AttributeValues["core_checkin_PhoneSearchType"].ValueFormatted);
                    }
                }

                lblMainDetails.Text  = mainDetailsDescList.Html;
                lblLeftDetails.Text  = leftDetailsDescList.Html;
                lblRightDetails.Text = rightDetailsDescList.Html;
            }
        }
예제 #24
0
        /// <summary>
        /// Shows the edit details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowEditDetails( GroupType groupType )
        {
            if ( groupType != null )
            {
                if ( groupType.Id == 0 )
                {
                    lReadOnlyTitle.Text = ActionTitle.Add( "Check-in Configuration" ).FormatAsHtmlTitle();
                }
                else
                {
                    lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();
                }

                SetEditMode( true );

                tbName.Text = groupType.Name;
                tbDescription.Text = groupType.Description;

                var rockContext = new RockContext();

                groupType.LoadAttributes( rockContext );

                cbAgeRequired.Checked = groupType.GetAttributeValue( "core_checkin_AgeRequired" ).AsBoolean( true );
                cbGradeRequired.Checked = groupType.GetAttributeValue( "core_checkin_GradeRequired" ).AsBoolean( true );
                cbHidePhotos.Checked = groupType.GetAttributeValue( "core_checkin_HidePhotos" ).AsBoolean( true );
                cbPreventDuplicateCheckin.Checked = groupType.GetAttributeValue( "core_checkin_PreventDuplicateCheckin" ).AsBoolean( true );
                cbPreventInactivePeople.Checked = groupType.GetAttributeValue( "core_checkin_PreventInactivePeople" ).AsBoolean( true );
                ddlType.SetValue( groupType.GetAttributeValue( "core_checkin_CheckInType" ) );
                cbDisplayLocCount.Checked = groupType.GetAttributeValue( "core_checkin_DisplayLocationCount" ).AsBoolean( true );
                cbEnableManager.Checked = groupType.GetAttributeValue( "core_checkin_EnableManagerOption" ).AsBoolean( true );
                cbEnableOverride.Checked = groupType.GetAttributeValue( "core_checkin_EnableOverride" ).AsBoolean( true );
                nbMaxPhoneLength.Text = groupType.GetAttributeValue( "core_checkin_MaximumPhoneSearchLength" );
                nbMaxResults.Text = groupType.GetAttributeValue( "core_checkin_MaxSearchResults" );
                nbMinPhoneLength.Text = groupType.GetAttributeValue( "core_checkin_MinimumPhoneSearchLength" );
                cbUseSameOptions.Checked = groupType.GetAttributeValue( "core_checkin_UseSameOptions" ).AsBoolean( false );
                ddlPhoneSearchType.SetValue( groupType.GetAttributeValue( "core_checkin_PhoneSearchType" ) );
                nbRefreshInterval.Text = groupType.GetAttributeValue( "core_checkin_RefreshInterval" );
                tbSearchRegex.Text = groupType.GetAttributeValue( "core_checkin_RegularExpressionFilter" );
                cbReuseCode.Checked = groupType.GetAttributeValue( "core_checkin_ReuseSameCode" ).AsBoolean( false );

                var searchType = DefinedValueCache.Read( groupType.GetAttributeValue( "core_checkin_SearchType" ).AsGuid() );
                if ( searchType != null )
                {
                    ddlSearchType.SetValue( searchType.Id.ToString() );
                }

                nbSecurityCodeLength.Text = groupType.GetAttributeValue( "core_checkin_SecurityCodeLength" );
                nbAutoSelectDaysBack.Text = groupType.GetAttributeValue( "core_checkin_AutoSelectDaysBack" );

                BuildAttributeEdits( groupType, true );

                SetFieldVisibility();
            }
        }
예제 #25
0
 /// <summary>
 /// 获得排序语句
 /// </summary>
 /// <returns>排序T-Sql语句</returns>
 public string GetGroupStr()
 {
     return(GroupColumName + " " + GroupType.ToString());
 }
예제 #26
0
        /// <summary>
        /// Shows the edit details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowEditDetails(GroupType groupType)
        {
            if (groupType != null)
            {
                if (groupType.Id == 0)
                {
                    lReadOnlyTitle.Text = ActionTitle.Add("Check-in Configuration").FormatAsHtmlTitle();
                }
                else
                {
                    lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();
                }

                SetEditMode(true);

                tbName.Text         = groupType.Name;
                tbDescription.Text  = groupType.Description;
                tbIconCssClass.Text = groupType.IconCssClass;
                var rockContext = new RockContext();

                groupType.LoadAttributes(rockContext);

                cbAgeRequired.Checked             = groupType.GetAttributeValue("core_checkin_AgeRequired").AsBoolean(true);
                cbGradeRequired.Checked           = groupType.GetAttributeValue("core_checkin_GradeRequired").AsBoolean(true);
                cbHidePhotos.Checked              = groupType.GetAttributeValue("core_checkin_HidePhotos").AsBoolean(true);
                cbPreventDuplicateCheckin.Checked = groupType.GetAttributeValue("core_checkin_PreventDuplicateCheckin").AsBoolean(true);
                cbPreventInactivePeople.Checked   = groupType.GetAttributeValue("core_checkin_PreventInactivePeople").AsBoolean(true);
                ddlType.SetValue(groupType.GetAttributeValue("core_checkin_CheckInType"));
                cbDisplayLocCount.Checked = groupType.GetAttributeValue("core_checkin_DisplayLocationCount").AsBoolean(true);
                rblAbilityLevelDetermination.SelectedValue = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUPTYPE_ABILITY_LEVEL_DETERMINATION);
                cbEnableManager.Checked  = groupType.GetAttributeValue("core_checkin_EnableManagerOption").AsBoolean(true);
                cbEnableOverride.Checked = groupType.GetAttributeValue("core_checkin_EnableOverride").AsBoolean(true);
                listboxAchievementTypes.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUPTYPE_ACHIEVEMENT_TYPES).SplitDelimitedValues());
                nbMaxPhoneLength.Text    = groupType.GetAttributeValue("core_checkin_MaximumPhoneSearchLength");
                nbMaxResults.Text        = groupType.GetAttributeValue("core_checkin_MaxSearchResults");
                nbMinPhoneLength.Text    = groupType.GetAttributeValue("core_checkin_MinimumPhoneSearchLength");
                cbUseSameOptions.Checked = groupType.GetAttributeValue("core_checkin_UseSameOptions").AsBoolean(false);
                ddlPhoneSearchType.SetValue(groupType.GetAttributeValue("core_checkin_PhoneSearchType"));
                nbRefreshInterval.Text = groupType.GetAttributeValue("core_checkin_RefreshInterval");
                tbSearchRegex.Text     = groupType.GetAttributeValue("core_checkin_RegularExpressionFilter");
                cbReuseCode.Checked    = groupType.GetAttributeValue("core_checkin_ReuseSameCode").AsBoolean(false);

                var searchType = DefinedValueCache.Get(groupType.GetAttributeValue("core_checkin_SearchType").AsGuid());
                if (searchType != null)
                {
                    ddlSearchType.SetValue(searchType.Id.ToString());
                }

                nbCodeAlphaNumericLength.Text = groupType.GetAttributeValue("core_checkin_SecurityCodeLength");
                nbCodeAlphaLength.Text        = groupType.GetAttributeValue("core_checkin_SecurityCodeAlphaLength");
                nbCodeNumericLength.Text      = groupType.GetAttributeValue("core_checkin_SecurityCodeNumericLength");
                cbCodeRandom.Checked          = groupType.GetAttributeValue("core_checkin_SecurityCodeNumericRandom").AsBoolean(true);
                cbAllowCheckout.Checked       = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUPTYPE_ALLOW_CHECKOUT).AsBoolean(true);
                cbEnablePresence.Checked      = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUPTYPE_ENABLE_PRESENCE).AsBoolean();
                nbAutoSelectDaysBack.Text     = groupType.GetAttributeValue("core_checkin_AutoSelectDaysBack");
                ddlAutoSelectOptions.SetValue(groupType.GetAttributeValue("core_checkin_AutoSelectOptions"));

                // Registration Settings
                cbRegistrationDisplayAlternateIdFieldForAdults.Checked   = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_DISPLAYALTERNATEIDFIELDFORADULTS).AsBoolean();
                cbRegistrationDisplayAlternateIdFieldForChildren.Checked = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_DISPLAYALTERNATEIDFIELDFORCHILDREN).AsBoolean();

                cbRegistrationDisplaySmsEnabled.Checked   = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_DISPLAYSMSBUTTON).AsBoolean();
                cbRegistrationSmsEnabledByDefault.Checked = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_DEFAULTSMSENABLED).AsBoolean();

                lbRegistrationRequiredAttributesForAdults.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_REQUIREDATTRIBUTESFORADULTS).SplitDelimitedValues());
                lbRegistrationOptionalAttributesForAdults.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_OPTIONALATTRIBUTESFORADULTS).SplitDelimitedValues());

                lbRegistrationRequiredAttributesForChildren.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_REQUIREDATTRIBUTESFORCHILDREN).SplitDelimitedValues());
                lbRegistrationOptionalAttributesForChildren.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_OPTIONALATTRIBUTESFORCHILDREN).SplitDelimitedValues());

                lbRegistrationRequiredAttributesForFamilies.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_REQUIREDATTRIBUTESFORFAMILIES).SplitDelimitedValues());
                lbRegistrationOptionalAttributesForFamilies.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_OPTIONALATTRIBUTESFORFAMILIES).SplitDelimitedValues());

                int? defaultPersonConnectionStatusValueId   = null;
                Guid?defaultPersonConnectionStatusValueGuid = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_DEFAULTPERSONCONNECTIONSTATUS).AsGuidOrNull();
                if (defaultPersonConnectionStatusValueGuid.HasValue)
                {
                    var defaultPersonRecordStatusValue = DefinedValueCache.Get(defaultPersonConnectionStatusValueGuid.Value);
                    if (defaultPersonRecordStatusValue != null)
                    {
                        defaultPersonConnectionStatusValueId = defaultPersonRecordStatusValue.Id;
                    }
                }

                dvpRegistrationDefaultPersonConnectionStatus.DefinedTypeId = DefinedTypeCache.Get(Rock.SystemGuid.DefinedType.PERSON_CONNECTION_STATUS.AsGuid()).Id;
                dvpRegistrationDefaultPersonConnectionStatus.SetValue(defaultPersonConnectionStatusValueId);

                var workflowTypeService = new WorkflowTypeService(rockContext);
                wftpRegistrationAddFamilyWorkflowTypes.SetValues(workflowTypeService.GetByGuids(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_ADDFAMILYWORKFLOWTYPES).SplitDelimitedValues().AsGuidList()));
                wftpRegistrationAddPersonWorkflowTypes.SetValues(workflowTypeService.GetByGuids(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_ADDPERSONWORKFLOWTYPES).SplitDelimitedValues().AsGuidList()));

                cbEnableCheckInAfterRegistration.Checked = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_ENABLECHECKINAFTERREGISTRATION).AsBoolean();

                lbKnownRelationshipTypes.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_KNOWNRELATIONSHIPTYPES).SplitDelimitedValues());
                lbSameFamilyKnownRelationshipTypes.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_SAMEFAMILYKNOWNRELATIONSHIPTYPES).SplitDelimitedValues());
                lbCanCheckInKnownRelationshipTypes.SetValues(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_REGISTRATION_CANCHECKINKNOWNRELATIONSHIPTYPES).SplitDelimitedValues());

                ceActionSelectHeaderTemplate.Text         = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_ACTION_SELECT_HEADER_LAVA_TEMPLATE);
                ceCheckoutPersonSelectHeaderTemplate.Text = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_CHECKOUT_PERSON_SELECT_HEADER_LAVA_TEMPLATE);
                cePersonSelectHeaderTemplate.Text         = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_PERSON_SELECT_HEADER_LAVA_TEMPLATE);
                ceMultiPersonSelectHeaderTemplate.Text    = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_MULTI_PERSON_SELECT_HEADER_LAVA_TEMPLATE);
                ceGroupTypeSelectHeaderTemplate.Text      = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUP_TYPE_SELECT_HEADER_LAVA_TEMPLATE);
                ceTimeSelectHeaderTemplate.Text           = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_TIME_SELECT_HEADER_LAVA_TEMPLATE);
                ceAbilityLevelSelectHeaderTemplate.Text   = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_ABILITY_LEVEL_SELECT_HEADER_LAVA_TEMPLATE);
                ceLocationSelectHeaderTemplate.Text       = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_LOCATION_SELECT_HEADER_LAVA_TEMPLATE);
                ceGroupSelectHeaderTemplate.Text          = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_GROUP_SELECT_HEADER_LAVA_TEMPLATE);

                ceStartTemplate.Text        = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_START_LAVA_TEMPLATE);
                ceFamilySelectTemplate.Text = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_FAMILYSELECT_LAVA_TEMPLATE);
                cePersonSelectTemplate.Text = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_PERSON_SELECT_ADDITIONAL_INFORMATION_LAVA_TEMPLATE);

                ddlSuccessTemplateOverrideDisplayMode.SetValue(groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_SUCCESS_LAVA_TEMPLATE_OVERRIDE_DISPLAY_MODE));
                ceSuccessTemplate.Text = groupType.GetAttributeValue(Rock.SystemKey.GroupTypeAttributeKey.CHECKIN_SUCCESS_LAVA_TEMPLATE);

                // Other GroupType Attributes
                BuildAttributeEdits(groupType, true);

                SetFieldVisibility();
            }
        }
 public List<TtGroup> GetGroupsByType(GroupType type)
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendFormat("{0} = '{1}'",
         TwoTrailsSchema.GroupSchema.Type,
         type.ToString());
     List<TtGroup> groups = GetGroups(sb.ToString());
     return groups;
 }
예제 #28
0
        private void SimulateCastSpell( GroupType groupType, int index )
        {
            Debugger.Log( "SimulateCastSpell(), groupType : " + groupType.ToString() + " spellIndex : " + index );
            EditorShip editorShip = null;
            Part part = null;
            int targetPosition = -1;
            CharactersGroup group = null;

            if( !HasInitBattleScene_ ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, EditorConfig.GUI_MSG_NOT_INIT_SCENE, EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            editorShip = groupType == GroupType.Enemy ? SelectedRightCharacter : SelectedLeftCharacter;

            if( editorShip == null ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, EditorConfig.GUI_MSG_NOT_LOAD_MODEL, EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            if( index >= editorShip.ship.partList.Length ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, string.Format( EditorConfig.GUI_MSG_NOT_EXSIT_SPELL, index + 1 ), EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            part = editorShip.ship.partList[index];
            targetPosition = SelectedRightPosition_;
            group = groupType == GroupType.Enemy ? GroupLeft_ : GroupRight_;

            StartCoroutine( CastSpell( editorShip, part, group, targetPosition ) );
        }
예제 #29
0
 public override string ToString()
 {
     return(GroupType.ToString().ToUpperInvariant() + " (" + string.Join(" ", Conditions) +
            (!Groups.Any() ? string.Empty : " " + string.Join(" ", Groups)) + ")");
 }
예제 #30
0
 public override string ToString()
 {
     return(string.Format("{0} Orders: {1}", GroupType.ToString(), GetOrderString()));
 }
예제 #31
0
 /// <summary>
 /// Returns a <see cref="System.String" /> that represents this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="System.String" /> that represents this instance.
 /// </returns>
 public override string ToString()
 {
     return(GroupType != null?GroupType.ToString() : string.Empty);
 }
예제 #32
0
        public void AddConnector(char c)
        {
            if (!Mixed && Members.Count == 0)
            {
                throw new Exception(
                          String.Format("Missing token before connector '{0}'.", c)
                          );
            }
            GroupType gt = GroupType.None;

            switch (c)
            {
            case ',':
                gt = GroupType.Sequence;
                break;

            case '|':
                gt = GroupType.Or;
                break;

            case '&':
                gt = GroupType.And;
                break;
            }
            if (GroupType != GroupType.None && GroupType != gt)
            {
                throw new Exception(
                          String.Format("Connector '{0}' is inconsistent with {1} group.", c, GroupType.ToString())
                          );
            }
            GroupType = gt;
        }
예제 #33
0
 internal static Exception InconsistentConnector(char ch, GroupType type)
 {
     return(new SgmlParseException(String.Format(
                                       Resources.Resources.Error_InconsistentConnector, ch, type.ToString())));
 }
예제 #34
0
        //********************
        // Index
        public ActionResult Index(GroupType _GroupId)
        {
            int _CompanyId;

            try { _CompanyId = int.Parse(User.FindFirst("CompanyId").Value); }
            catch (Exception) { return(RedirectToAction(nameof(Error), new { _Message = "Login Necessário!" })); }
            //
            Class_Cadaster _Cadaster = new Class_Cadaster
            {
                CompanyId = _CompanyId,
                GroupId   = _GroupId,
                GroupName = _GroupId.ToString()
            };

            //1o estagio
            var _GL = from s in _context.Class_GroupLevel
                      where s.CompanyId == _CompanyId && s.GroupId == _GroupId
                      orderby s.StatusId, s.Name
            select s;

            //
            foreach (var _Lgl in _GL)
            {
                var _Ig = new Class_CadasterItem()
                {
                    TypeLine = "Cabec",

                    GroupLevelId        = 0,
                    GroupLevelItemId    = 0,
                    GroupLevelItemTaxID = 0,

                    ItemDesc = "Grupo",
                };
                _Cadaster.CadasterLIST.Add(_Ig);
                //
                var _Igl = new Class_CadasterItem()
                {
                    TypeLine = "Item",

                    GroupLevelId        = _Lgl.Id,
                    GroupLevelName      = _Lgl.Name,
                    GroupLevelItemId    = 0,
                    GroupLevelItemTaxID = 0,

                    ItemDesc = "| " + _Lgl.Name
                };
                if (_Lgl.StatusId != GroupLevelStatus.Ativo)
                {
                    _Igl.ItemDesc = "| " + _Lgl.StatusId.ToString() + "  " + _Igl.ItemDesc;
                }
                _Cadaster.CadasterLIST.Add(_Igl);

                if (_Lgl.StatusId != GroupLevelStatus.Suspenso)
                {
                    _Igl = new Class_CadasterItem()
                    {
                        TypeLine = "Cabec",

                        GroupLevelId        = _Lgl.Id,
                        GroupLevelName      = _Lgl.Name,
                        GroupLevelItemId    = 0,
                        GroupLevelItemTaxID = 0,

                        ItemDesc = "Item do Grupo"
                    };
                    _Cadaster.CadasterLIST.Add(_Igl);
                    //

                    //2o estagio
                    var _GLI = from s in _context.Class_GroupLevelItem
                               where s.GroupLevelId == _Lgl.Id
                               orderby s.StatusId, s.Name
                    select s;
                    //
                    foreach (var _Lgli in _GLI)
                    {
                        var _Igli = new Class_CadasterItem()
                        {
                            TypeLine = "Item",

                            GroupLevelId        = _Lgl.Id,
                            GroupLevelItemId    = _Lgli.Id,
                            GroupLevelItemName  = _Lgli.Name,
                            GroupLevelItemTaxID = 0,

                            ItemDesc = "| " + _Lgli.Name
                        };
                        if (_Lgli.StatusId != GroupLevelItemStatus.Ativo)
                        {
                            _Igli.ItemDesc = "| " + _Lgli.StatusId.ToString() + "  " + _Igli.ItemDesc;
                        }
                        if (_Lgl.GroupId == GroupType.ACOMODACAO)
                        {
                            _Igli.ItemDesc = string.Format("{0} - No.Ocup. {1} - Prep.PCD? {2}", _Igli.ItemDesc, _Lgli.OccupantsNum, _Lgli.PCD.ToString());
                        }
                        _Cadaster.CadasterLIST.Add(_Igli);

                        if (_Lgli.StatusId != GroupLevelItemStatus.Suspenso)
                        {
                            //3o estagio
                            var _SI = from s1 in _context.Class_SeasonItem
                                      join s2 in _context.Class_Season on s1.SeasonId equals s2.Id
                                      where s1.GroupLevelItemId == _Lgli.Id
                                      orderby s2.Name
                                      select new { SeasonItemID = s1.Id, SeasonItemTAX = s1.Tax, SeasonItemNAME = s2.Name };
                            //
                            if (_SI.Count() > 0)
                            {
                                _Igli = new Class_CadasterItem()
                                {
                                    TypeLine = "Item",

                                    GroupLevelId          = _Lgl.Id,
                                    GroupLevelItemId      = _Lgli.Id,
                                    GroupLevelItemTaxID   = 0,
                                    GroupLevelItemTaxNAME = "",

                                    ItemDesc = "| " + _Lgli.Name
                                };
                                _Cadaster.CadasterLIST.Add(_Igli);
                                //
                                foreach (var _SIitem in _SI)
                                {
                                    var _Iglit = new Class_CadasterItem()
                                    {
                                        TypeLine = "Item",

                                        GroupLevelId          = _Lgl.Id,
                                        GroupLevelItemId      = _Lgli.Id,
                                        GroupLevelItemName    = _Lgli.Name,
                                        GroupLevelItemTaxID   = _SIitem.SeasonItemID,
                                        GroupLevelItemTaxNAME = _SIitem.SeasonItemNAME,
                                        GroupLevelItemTaxTAX  = _SIitem.SeasonItemTAX,

                                        ItemDesc = string.Format("{0} - {1}", _SIitem.SeasonItemNAME, _SIitem.SeasonItemTAX.ToString("C2"))
                                    };
                                    _Cadaster.CadasterLIST.Add(_Iglit);
                                }
                            }

                            _Igli = new Class_CadasterItem()
                            {
                                TypeLine = "Linha",

                                GroupLevelId        = 0,
                                GroupLevelItemId    = 0,
                                GroupLevelItemTaxID = 0,

                                ItemDesc = ""
                            };
                            _Cadaster.CadasterLIST.Add(_Igli);
                        }
                    }
                }
            }
            return(View(_Cadaster));
        }
예제 #35
0
 internal static Exception InconsistentConnector(char ch, GroupType type)
 {
     return new SgmlParseException(String.Format(
         Resources.Resources.Error_InconsistentConnector, ch, type.ToString()));
 }
예제 #36
0
 /// <summary>
 /// Returns a <see cref="System.String" /> that represents this instance.
 /// </summary>
 /// <returns>
 /// A <see cref="System.String" /> that represents this instance.
 /// </returns>
 public override string ToString()
 {
     return(GroupType.ToString());
 }
예제 #37
0
 public static string ToString(GroupType value)
 {
     if( value==GroupType.Person )
         return "person";
     else if( value==GroupType.Animal )
         return "animal";
     else if( value==GroupType.Device )
         return "device";
     else if( value==GroupType.Medication )
         return "medication";
     else if( value==GroupType.Substance )
         return "substance";
     else
         throw new ArgumentException("Unrecognized GroupType value: " + value.ToString());
 }