Beispiel #1
0
        /// <summary>
        /// 返回会员账号的信息
        /// </summary>
        /// <param name="objControl"></param>
        /// <param name="accountId"></param>
        /// <returns></returns>
        public static Hashtable GetMemberInfo(IControl objControl, string accountId)
        {
            // 判断会员账户是否存在?
            if (!MemberIsExist(objControl, accountId))
            {
                return(new Hashtable());
            }

            try
            {
                ParamUtil aPU = new ParamUtil();
                aPU.SQLCmdLoadData();
                aPU.SQLWithOutSchema();
                aPU.SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT ACCOUNTID,NICKNAME,TYPE,LEVEL,PHONE,EMAIL,REALNAME,CERTTYPE,CERTNUMS,ASKID1,ANSWER1,ASKID2,ANSWER2,DIGEST,STATE FROM CAIKA_MEMBER WHERE ACCOUNTID='{0}'", accountId));
                if (aPU.ExecuteCmd(ADataLoader.DataLoader()).IsOK())
                {
                    return(new UriUtil()
                           .ImportRow(aPU.GetValueAsDataSet().Tables["CAIKA_MEMBER"].Rows[0])
                           .ImportHashtable(ParamUtil.Pick().ImportSets(GetMemberDigest(objControl, accountId)).ParamTable)
                           .ExportHashtable());
                }
            }
            catch (Exception)
            {
            }

            return(new Hashtable());
        }
Beispiel #2
0
        /// <summary>
        /// 会员账号是否存在?
        /// </summary>
        /// <param name="objControl"></param>
        /// <param name="accountId"></param>
        /// <returns></returns>
        public static bool MemberIsExist(IControl objControl, string accountId)
        {
            ParamUtil aPU = new ParamUtil();

            aPU.SQLCmdLoadData();
            aPU.SQLWithOutSchema();
            aPU.SQLEntityScript("CAIKA_MEMBER", string.Format("SELECT ACCOUNTID FROM CAIKA_MEMBER WHERE ACCOUNTID='{0}'", accountId));
            if (aPU.ExecuteCmd(ADataLoader.DataLoader()).IsOK())
            {
                return(aPU.GetValueAsDataSet().Tables["CAIKA_MEMBER"].Rows.Count > 0);
            }

            return(false);
        }