示例#1
0
        /// <summary>
        /// 获取操作行为记录
        /// </summary>
        /// <param name="UserGuid"></param>
        /// <returns></returns>
        public DataTable GetOperationRecord(string UserGuid)
        {
            string SQL = string.Format(@"SELECT TOP(50) R_Note,R_CreateDate,
                                            (CASE R_Level 
                                            WHEN 1 THEN '日常操作' 
                                            WHEN 2 THEN '较敏感操作' 
                                            WHEN 3 THEN '敏感操作' END) AS R_Level 
                                            FROM Tb_OperationRecord WHERE 
                                            R_UserGuid = '{0}' 
                                            ORDER BY R_CreateDate DESC;", UserGuid);

            return(operate.ExecuteQuery(SQL).Tables[0]);
        }
示例#2
0
        /// <summary>
        /// 获取登录通行证Token
        /// </summary>
        /// <param name="UserGuid">用户标识</param>
        /// <returns></returns>
        public Token GetToken(string UserGuid, string UserIP)
        {
            Token token = new Token();
            //1.新增或修改Token标识 2.更新最后登录时间和Token失效时间
            string  NewTokenCode = GetToken();
            string  ProcSql      = string.Format(@"EXEC Proc_LoginToken '{0}','{1}','{2}'", UserGuid, UserIP, NewTokenCode);
            DataSet ds           = operate.ExecuteQuery(ProcSql);

            token.TokenCode      = (string)ds.Tables[0].Rows[0]["TokenCode"];
            token.TokenLastDate  = (DateTime)ds.Tables[0].Rows[0]["TokenLastDate"];
            token.TokenFalseDate = (DateTime)ds.Tables[0].Rows[0]["TokenFalseDate"];
            return(token);
        }
示例#3
0
        /// <summary>
        /// 获取自动分配的数据源
        /// </summary>
        /// <param name="NeedNum"></param>
        /// <param name="LoginGuid"></param>
        /// <returns></returns>
        public DataTable GetAutoTable(int NeedNum, string LoginGuid, ref int RowsCount)
        {
            string  SQL    = string.Format(@"SELECT TOP(@0) CF_NickName AS Name,
                                        CF_ID AS ID,
                                        CF_Tel AS Tel,
                                        CF_BelongOperator AS Company 
                                        FROM Tb_CustomInformation 
                                        WHERE CF_IsUsed = 0 AND 
                                        CF_UserGuid = @1
                                        ORDER BY CF_CreateDate DESC;", NeedNum, LoginGuid);
            DataSet Result = operate.ExecuteQuery(SQL);

            if (Result.Tables.Count > 0)
            {
                RowsCount = Result.Tables[0].Rows.Count;
                return(Result.Tables[0]);
            }
            else
            {
                return(null);
            }
        }
示例#4
0
 /// <summary>
 /// 获取登陆者的下级员工集合
 /// </summary>
 /// <param name="UserGuid"></param>
 /// <returns></returns>
 public DataTable GetEmployeeTable(string UserGuid)
 {
     return(operate.ExecuteQuery(string.Format("Exec Proc_Employee_Total '{0}'", UserGuid)).Tables[0]);
 }