public static List <ADR_Group> GetGroup_list() { TaskMemberMaster.Init_from_DB(); List <ADR_Group> list = new List <ADR_Group>(); foreach (ADR_Group ag in TaskMemberMaster.group_dic.Values) { list.Add(ag); } list.Sort((a, b) => (string.Compare(a.GroupName.Value, b.GroupName.Value))); return(list); }
public static Dictionary <string, ADR_TaskOwner> Get_taskOwnerList_groupID(int groupID) { TaskMemberMaster.Init_from_DB(); if (TaskMemberMaster.ownerList_dic.ContainsKey(groupID)) { return(TaskMemberMaster.ownerList_dic[groupID]); } else { return(new Dictionary <string, ADR_TaskOwner>(StringComparer.OrdinalIgnoreCase)); } }
public static ADR_Group Get_ADRgroup_ID(int id) { TaskMemberMaster.Init_from_DB(); if (TaskMemberMaster.group_dic.ContainsKey(id)) { return(TaskMemberMaster.group_dic[id]); } else { return(null); } }
public static List <ADR_Member_Country> Get_mcList_SID(string sid) { TaskMemberMaster.Init_from_DB(); if (string.IsNullOrEmpty(sid)) { return(new List <ADR_Member_Country>()); } if (TaskMemberMaster.country_dic.ContainsKey(sid)) { return(TaskMemberMaster.country_dic[sid]); } else { return(new List <ADR_Member_Country>()); } }
public static ADR_TaskOwner Get_taskOwner_SID(string sid) { TaskMemberMaster.Init_from_DB(); if (string.IsNullOrEmpty(sid)) { return(null); } if (TaskMemberMaster.owner_dic.ContainsKey(sid)) { return(TaskMemberMaster.owner_dic[sid]); } else { return(null); } }
public static void Init_from_DB() { if ((DateTime.Now - TaskMemberMaster.lastUpdateTime).TotalHours < Utility.RefreshInterval) { return; } else { TaskMemberMaster.Reset(); } TaskMemberMaster.Init_group_dic(); TaskMemberMaster.Init_groupMember_dic(); TaskMemberMaster.Init_owner_dic(); TaskMemberMaster.Init_country_dic(); TaskMemberMaster.lastUpdateTime = DateTime.Now; }