예제 #1
0
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="LoginName"></param>
        /// <param name="LoginPwd"></param>
        /// <returns></returns>
        public userBean GetLoginBllProc(string LoginName, string LoginPwd)
        {
            userBean _userBean   = null;
            DataSet  _dsGetLogin = _userD.getLogin(LoginName, LoginPwd);

            foreach (DataRow _dr in _dsGetLogin.Tables[0].Rows)
            {
                _userBean       = new userBean();
                _userBean.UId   = _dr["id"].ToString().Trim();
                _userBean.Uname = _dr["name"].ToString().Trim();

                /*
                 * _userBean.Uzgbm = _dr["zgbm"].ToString().Trim();
                 * _userBean.Upasswd = _dr["passwd"].ToString();
                 * _userBean.Ugzbz = Convert.ToInt16(_dr["gzbz"]);
                 * _userBean.Ujrsj = _dr["jrsj"].ToString().Trim();
                 * _userBean.Ubdsj = _dr["bdsj"].ToString().Trim();
                 * _userBean.Uszry = _dr["szry"].ToString().Trim();
                 * _userBean.Ugwlx = Convert.ToInt16(_dr["gwlx"]);
                 * _userBean.Uisdl = Convert.ToInt16(_dr["isdl"]);
                 * _userBean.Umemo = _dr["memo"].ToString().Trim();
                 * */
                //return _userBean;
            }
            return(_userBean);

            /*
             * int _count = _dsGetLogin.Tables[0].Rows.Count;
             * if (_count > 0)
             *  return true;    //表示用户名和密码正确
             * return false;       //表示用户名或密码不正确
             */
        }