zoukankan      html  css  js  c++  java
  • CustomerInfo

            public void returnuserlogin(string username, string pwd)
            {
                staff sf = new Model.BaseModel.staff();
                sql = @"select  a.id,a.s_did, s_number,isnull(b.name,'') as  s_departmentid,isnull(c.s_name,'') as  s_role, s_en_name, s_us_name, s_logname, s_logpassword,s_state, s_createtime, s_isloginname,s_phone,s_usergroup, d.groupname as s_email from staff a
                               left join ( select id,name,parentid from department where d_state=0) b on a.s_departmentid=b.id
                               left join ( select id,s_name from sysitem where s_type='position_number' and s_state=0) c on c.id=a.s_role
                               left join (select * from userrolegroup) d on a.s_usergroup=d.id
                               where s_state=0 and s_isloginname =1 and s_logname='" + username + "' and   s_logpassword='" + pwd + "'";
                object ob = SqlHelper.ExecuteDataSet(sql);
    
                sf = ob.getStringWithJsonConvertT().setTwithJsonConvert<staff>();
                userlogin.s_createtime = sf.s_createtime;
                userlogin.s_departmentid = sf.s_departmentid;
                userlogin.s_email = sf.s_email;
                userlogin.s_en_name = sf.s_en_name;
                userlogin.s_isloginname = sf.s_isloginname;
                userlogin.s_logname = sf.s_logname;
                userlogin.s_logpassword = sf.s_logpassword;
                userlogin.s_number = sf.s_number;
                userlogin.s_role = sf.s_role;
                userlogin.s_state = sf.s_state;
                userlogin.s_us_name = sf.s_us_name;
                //userlogin.id = sf.id;
                userlogin.id = sf.id;
                userlogin.s_usergroup = sf.s_usergroup;
                userlogin.s_email = sf.s_email;
                SqlHelper.ExecteNonQuery(System.Data.CommandType.Text, "exec proc_userlog_add '" + userlogin.id + "'  exec proc_sysitemerror_add '" + username + "|" + System.Net.Dns.GetHostName() + "','" + DateTime.Now + "'");
                userlogin.listuserrole = SqlHelper.ExecuteDataSet("exec proc_userrolegroup_select '" + userlogin.s_usergroup + "'").getStringWithJsonConvertT().setTwithJsonConverts<userrole>();
                if (username.Equals("admin"))
                {
                    userlogin.listuserrole.ForEach(m => m.u_check = true);
                }
    
            }
  • 相关阅读:
    电力三维基础信息平台
    基于三维GIS技术的输电线路地理信息系统的设计与实现
    linux学习笔记(1)
    linux学习笔记(4)
    linux学习笔记(8)
    linux学习笔记(6)
    linux学习笔记(3)
    linux 学习笔记(2)
    linux学习笔记(7)
    ASCII码表完整版
  • 原文地址:https://www.cnblogs.com/Tianxf815/p/8862386.html
Copyright © 2011-2022 走看看