using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RFrameGenerate.Model
{
    public class StringToIntSort_IComparer : IComparer
    {
        #region IComparer 成员

        public int Compare(object x, object y)
        {
            if(x is T_ST_User)
            {
                var vx = x as T_ST_User;
                var vy = y as T_ST_User;
                return vx.UserID.ToInt().CompareTo(vy.UserID.ToInt());
            }
            else if(x is UserRoleList)
            {
                var vx = x as UserRoleList;
                var vy = y as UserRoleList;
                return vx.UserID.CompareTo(vy.UserID);
            }
            return 1;
        }

        #endregion
    }
}
