Ejemplo n.º 1
0
 private void updateRankByOther_private(IRole rank, int i, SiteRankOther otherRank)
 {
     string[] arrRanks = otherRank.Ranks.Split('/');
     if (arrRanks.Length > i)
     {
         rank.Name = arrRanks[i];
         UpdateRank(rank as SiteRank);
     }
 }
Ejemplo n.º 2
0
        public virtual void SetRanksByOther(long id)
        {
            SiteRankOther otherRank = roleService.GetRankOtherById(id);

            roleService.UpdateRankByOther(otherRank);
            log(SiteLogString.SetRanksByOther());

            echoToParentPart(lang("opok"));
        }
Ejemplo n.º 3
0
        public virtual void UpdateRankByOther(SiteRankOther otherRank)
        {
            List <SiteRank> rankAll = this.GetRankAll();

            for (int i = 0; i < rankAll.Count; i++)
            {
                IRole rank = rankAll[i];
                this.updateRankByOther_private(rank, i, otherRank);
            }

            if (otherRank.RankCount > rankAll.Count)
            {
                for (int i = rankAll.Count; i < otherRank.RankCount; i++)
                {
                    SiteRank rank = new SiteRank();
                    rank.Name = otherRank.GetName(i);
                    InsertRank(rank);
                }
            }
        }