Esempio n. 1
0
        /// <summary>
        /// 查找用户(根据身份证和姓名)
        /// </summary>
        /// <param name="context"></param>
        private void ValidUserByIDCardAndName(HttpContext context)
        {
            Hashtable ht = new Hashtable();

            //ht.Add("TableName", "Sys_UserInfo");
            string where = string.Empty;
            //if (!string.IsNullOrWhiteSpace(context.Request["Name"])) where += " and Name='" + context.Request["Name"] + "'";
            //if (!string.IsNullOrWhiteSpace(context.Request["IDCard"])) where += " and IDCard='" + context.Request["IDCard"] + "'";
            ht.Add("IsStu", "false");
            if (!string.IsNullOrWhiteSpace(context.Request["Name"]))
            {
                ht.Add("equalsName", context.Request["Name"]);
            }
            if (!string.IsNullOrWhiteSpace(context.Request["IDCard"]))
            {
                ht.Add("IDCard", context.Request["IDCard"]);
            }
            DataTable     dt   = bll.GetData(ht, false, where);
            List <string> list = new List <string>();

            if (dt != null && dt.Rows.Count > 0)
            {
                if (Convert.ToInt32(dt.Rows[0]["AuthenType"]) == (int)AuthenType.用户未激活)
                {
                    list.Add(bll_com.DataTableToJson(dt));
                    jsonModel.retData = list;
                }
                else
                {
                    jsonModel.errNum = 333;
                    jsonModel.errMsg = "no";
                }
            }
            else
            {
                jsonModel.errNum = 999;
                jsonModel.errMsg = "null";
            }
        }