Ejemplo n.º 1
0
        public static DataTable GetMemberNameInfo(long l_gid)
        {
            DataTable  dataTable  = new DataTable();
            DataColumn dataColumn = new DataColumn("memberid");

            dataColumn.DataType = Type.GetType("System.Int64");
            dataTable.Columns.Add(dataColumn);
            DataColumn dataColumn2 = new DataColumn("name");

            dataColumn2.DataType = Type.GetType("System.String");
            dataTable.Columns.Add(dataColumn2);
            DataColumn dataColumn3 = new DataColumn("parentname");

            dataColumn3.DataType = Type.GetType("System.String");
            dataTable.Columns.Add(dataColumn3);
            try
            {
                Hashtable groupCache = DBCache.GetGroupCache();
                if (groupCache != null && groupCache.Count > 0 && groupCache.ContainsKey(l_gid))
                {
                    GroupInfo groupInfo = (GroupInfo)groupCache[l_gid];
                    string    groupType;
                    if ((groupType = groupInfo.GroupType) != null)
                    {
                        if (< PrivateImplementationDetails > { DC6F5227 - DF66 - 41C5 - 8461 - C47389EE7A9A }.$$method0x60000f3 - 1 == null)
                        {
Ejemplo n.º 2
0
        public static List <GroupInfo> GetPartGroup(int i_selectflag)
        {
            List <GroupInfo> list = new List <GroupInfo>();

            try
            {
                Hashtable groupCache = DBCache.GetGroupCache();
                if (groupCache != null && groupCache.Count > 0)
                {
                    ICollection values = groupCache.Values;
                    foreach (GroupInfo groupInfo in values)
                    {
                        if (i_selectflag == 2)
                        {
                            GroupInfo item = new GroupInfo(groupInfo);
                            list.Add(item);
                        }
                        else
                        {
                            if (groupInfo.SelectedFlag == i_selectflag)
                            {
                                GroupInfo item2 = new GroupInfo(groupInfo);
                                list.Add(item2);
                            }
                        }
                    }
                }
                list.Sort((GroupInfo x, GroupInfo y) => x.group_name.CompareTo(y.group_name));
            }
            catch (Exception ex)
            {
                DebugCenter.GetInstance().appendToFile("DBERROR~~~~~~~~~~~DBERROR : " + ex.Message + "\n" + ex.StackTrace);
            }
            return(list);
        }
Ejemplo n.º 3
0
 public static bool CheckGroupName(long l_gid, string str_gname)
 {
     try
     {
         Hashtable groupCache = DBCache.GetGroupCache();
         if (groupCache != null && groupCache.Count > 0)
         {
             ICollection values = groupCache.Values;
             foreach (GroupInfo groupInfo in values)
             {
                 if (groupInfo.group_name.Equals(str_gname))
                 {
                     bool result;
                     if (groupInfo.id == l_gid)
                     {
                         result = true;
                         return(result);
                     }
                     result = false;
                     return(result);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         DebugCenter.GetInstance().appendToFile("DBERROR~~~~~~~~~~~DBERROR : " + ex.Message + "\n" + ex.StackTrace);
         bool result = false;
         return(result);
     }
     return(true);
 }
Ejemplo n.º 4
0
 public static GroupInfo GetGroupByID(long l_id)
 {
     try
     {
         Hashtable groupCache = DBCache.GetGroupCache();
         if (groupCache != null && groupCache.ContainsKey(l_id))
         {
             GroupInfo gp_scr = (GroupInfo)groupCache[l_id];
             return(new GroupInfo(gp_scr));
         }
     }
     catch (Exception)
     {
     }
     return(null);
 }
Ejemplo n.º 5
0
        public static List <GroupInfo> GetAllGroup()
        {
            List <GroupInfo> list = new List <GroupInfo>();

            try
            {
                Hashtable groupCache = DBCache.GetGroupCache();
                if (groupCache != null && groupCache.Count > 0)
                {
                    ICollection values = groupCache.Values;
                    foreach (GroupInfo gp_scr in values)
                    {
                        GroupInfo item = new GroupInfo(gp_scr);
                        list.Add(item);
                    }
                }
            }
            catch (Exception ex)
            {
                DebugCenter.GetInstance().appendToFile("DBERROR~~~~~~~~~~~DBERROR : " + ex.Message + "\n" + ex.StackTrace);
            }
            return(list);
        }
Ejemplo n.º 6
0
        public static GroupInfo GetGroupByName(string str_name)
        {
            GroupInfo result = null;

            try
            {
                Hashtable groupCache = DBCache.GetGroupCache();
                if (groupCache != null && groupCache.Count > 0)
                {
                    ICollection values = groupCache.Values;
                    foreach (GroupInfo groupInfo in values)
                    {
                        if (groupInfo.GroupName.Equals(str_name))
                        {
                            return(new GroupInfo(groupInfo));
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }