示例#1
0
        public string dtUserInfo(string vchrUid, string vchrPwd)
        {
            string s = "";

            try
            {
                bool      b注册  = false;
                string    sSQL = @"
SELECT     TOP (200) iID, sType, cCode, cText
FROM         _Code
WHERE     (sType = 'aaa')
";
                DataTable dt   = clsSQLCommond.ExecQuery(sSQL);
                if (dt == null || dt.Rows.Count != 1)
                {
                    b注册 = false;
                }
                else
                {
                    b注册 = true;
                }

                ClsDES   clsDes = ClsDES.Instance();
                DateTime d注册    = Convert.ToDateTime(clsDes.Decrypt(clsDes.Decrypt(dt.Rows[0]["cText"].ToString().Trim())));
                sSQL = "select getdate()";
                DateTime dNow = Convert.ToDateTime(clsSQLCommond.ExecGetScalar(sSQL));
                if (d注册 > dNow)
                {
                    if (b注册)
                    {
                        sSQL = "select  vchrUid, vchrPwd, vchrRemark, tstamp, dtmCreate, dtmClose from  _UserInfo " +
                               "where vchrUid = '" + vchrUid.Trim() + "' and vchrPwd = '" + vchrPwd.Trim() + "'";
                        dt = clsSQLCommond.ExecQuery(sSQL);
                        s  = Cls序列化.SerializeDataTableXml(dt);
                    }
                }
            }
            catch (Exception ee)
            {
                s = ee.Message;
            }
            return(s);
        }
示例#2
0
        public Array GetVis(string iID)
        {
            string[]  str = new string[17];
            DataTable dt  = new DataTable();

            if (iID != "")
            {
                sSQL = "select *,case when Date3 is null then '未访问' when Date4 is null then '访问中' end as Flag from Visitor left join Visitors  on Visitor.iID=Visitors.iiID where SS6='" + iID + "'";

                dt = clsSQLCommond.ExecQuery(sSQL);
            }
            if (iID != "" && dt.Rows.Count > 0)
            {
                str[0]  = clsDES.Decrypt(dt.Rows[0]["SS1"].ToString());
                str[1]  = dt.Rows[0]["SS2"].ToString();
                str[2]  = dt.Rows[0]["SS3"].ToString();
                str[3]  = clsDES.Decrypt(dt.Rows[0]["SS4"].ToString());
                str[4]  = clsDES.Decrypt(dt.Rows[0]["SS5"].ToString());
                str[5]  = dt.Rows[0]["S6"].ToString();
                str[6]  = dt.Rows[0]["S7"].ToString();
                str[7]  = dt.Rows[0]["S8"].ToString();
                str[8]  = dt.Rows[0]["S9"].ToString();
                str[9]  = dt.Rows[0]["D1"].ToString();
                str[10] = dt.Rows[0]["IImg1"].ToString();
                str[11] = DateTime.Parse(dt.Rows[0]["Date1"].ToString()).ToString("yyyy-MM-dd");
                str[12] = DateTime.Parse(dt.Rows[0]["Date2"].ToString()).ToString("yyyy-MM-dd");
                str[13] = dt.Rows[0]["DDate1"].ToString();
                str[14] = dt.Rows[0]["DDate2"].ToString();
                str[15] = dt.Rows[0]["iID"].ToString();
                str[16] = dt.Rows[0]["AutoID"].ToString();
            }
            else
            {
                str[0]  = "";
                str[1]  = "";
                str[2]  = "";
                str[3]  = "";
                str[4]  = "";
                str[5]  = "";
                str[6]  = "";
                str[7]  = "";
                str[8]  = "";
                str[9]  = "";
                str[10] = "";
                str[11] = "";
                str[12] = "";
                str[13] = "";
                str[14] = "";
                str[15] = "";
                str[16] = "";
            }
            return(str);
        }