WebUI/Datasource/User.asmx.cs

(开头部分) 34KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;
using System.Text;
using Common;
using System.Data;
using Newtonsoft.Json;
namespace WebUI.Datasource
{
    /// <summary>
    /// User 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
    [System.Web.Script.Services.ScriptService]
    public class User : System.Web.Services.WebService
    {
        #region 登陆

        [WebMethod(Description = "", EnableSession = true)]
        [ScriptMethod(UseHttpGet = false)]
        public returnInfos LoginCheck(string account, string password, int roleName)
        {
            string strCmd = "";
            DataTable dt = new DataTable();
            switch (roleName)
            {
                case 0://管理员
                    strCmd = " select * from Administrators where Account='" + account + "' and Password='" + password + "' ";
                    break;
                case 1://医师
                    strCmd = " select * from YiShi where EmpNum='" + account + "' and Password='" + password + "' ";
                    break;
            }
            dt = DbHelperSQL.Query(strCmd).Tables[0];
            if (dt != null && dt.Rows.Count > 0)
            {
                Session.Timeout = 1000;
                switch (roleName)
                {
                    case 0://管理员
                        Session["RoleName"] = "管理员";
                        Session["Account"] = account;
                        Session["Password"] = password;
                        Session["ID"] = dt.Rows[0]["ID"].ToString();
                        break;
                    case 1://会员
                        Session["ID"] = dt.Rows[0]["ID"].ToString();
                        Session["RoleName"] = "医师";
                        Session["Account"] = account;
                        Session["EmpName"] = dt.Rows[0]["EmpName"].ToString();
                        Session["Password"] = password;
                        break;
                }
                return new returnInfos(true, "");
后面还有 736 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。