Пример #1
0
        /// <summary>
        /// 根据ID得到名称(有前缀的情况)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetName(string id)
        {
            string name = string.Empty;

            if (id.IsGuid())//机构
            {
                return(GetName(id.Convert <Guid>()));
            }
            else if (id.StartsWith(UsersBLL.PREFIX))//用户
            {
                string uid = UsersBLL.RemovePrefix(id);
                Guid   userID;
                if (!uid.IsGuid(out userID))
                {
                    return("");
                }
                else
                {
                    return(new UsersBLL().GetName(userID));
                }
            }
            else if (id.StartsWith(WorkGroup.PREFIX))//工作组
            {
                string uid = WorkGroup.RemovePrefix(id);
                Guid   wid;
                if (!uid.IsGuid(out wid))
                {
                    return("");
                }
                else
                {
                    return(new WorkGroup().GetName(wid));
                }
            }
            return("");
        }
Пример #2
0
 /// <summary>
 /// 去掉ID前缀。
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public string RemovePrefix1(string id)
 {
     return(UsersBLL.RemovePrefix(id));
 }
Пример #3
0
 /// <summary>
 /// 得到一页日志数据
 /// </summary>
 /// <param name="pager"></param>
 /// <param name="query"></param>
 /// <param name="order"></param>
 /// <param name="size"></param>
 /// <param name="number"></param>
 /// <param name="title"></param>
 /// <param name="type"></param>
 /// <param name="date1"></param>
 /// <param name="date2"></param>
 /// <param name="userID"></param>
 /// <returns></returns>
 public System.Data.DataTable GetPagerData(out string pager, string query = "", string title = "", string type = "", string date1 = "", string date2 = "", string userID = "")
 {
     return(dataLog.GetPagerData(out pager, query, RoadFlow.Utility.Tools.GetPageSize(), RoadFlow.Utility.Tools.GetPageNumber(),
                                 title, type, date1, date2, UsersBLL.RemovePrefix(userID)));
 }