public User_Info GetUserInfo(Maticsoft.Model.User_Info_Search model)
        {
            var    query = _userRepository.Table;
            CxUser userR;

            if (model.trantype == "ByName")
            {
                userR = query.Where(x => x.UserName == model.para).ToList().FirstOrDefault();
            }
            else
            {
                userR = query.Where(x => x.UserID == int.Parse(model.para)).ToList().FirstOrDefault();
            }
            var result = new Maticsoft.Model.User_Info();


            result.UserName = userR.UserName;
            result.RealName = userR.RealName;
            result.Email    = userR.Email;
            result.Address  = userR.Address;
            result.Mobile   = userR.Mobile;
            result.Id       = userR.UserID;
            result.UserPwd  = userR.UserPassword;
            result.isAdmin  = userR.isAdmin;

            return(result);
        }
 public virtual User_Info GetAuthenticatedCustomerFromUserName(string name)
 {
     #region 构造searchModel
     Maticsoft.Model.User_Info_Search uModel = new Maticsoft.Model.User_Info_Search();
     uModel.trantype = "ByName";
     uModel.para = name;
     #endregion
     return _customerService.GetUserInfo(uModel);//byname
 }
        public virtual User_Info GetAuthenticatedCustomerFromUserID(int id)
        {

            #region 构造searchModel
            Maticsoft.Model.User_Info_Search uModel = new Maticsoft.Model.User_Info_Search();
            uModel.trantype = "ByID";
            uModel.para = id.ToString();
            #endregion
            return _customerService.GetUserInfo(uModel);//byid 
        }
        public virtual User_Info GetAuthenticatedCustomerFromTicket(FormsAuthenticationTicket ticket)
        {
            if (ticket == null)
                throw new ArgumentNullException("ticket");

            var username = ticket.UserData;//存放user的userName
            if (String.IsNullOrWhiteSpace(username))
                return null;
            #region 构造searchModel
            Maticsoft.Model.User_Info_Search uModel = new Maticsoft.Model.User_Info_Search();
            uModel.trantype = "ByName";
            uModel.para = username;
            //uModel.UserName = username;
            #endregion
            var customer = _customerService.GetUserInfo(uModel);//byname
            return customer;
        }
 public System.Data.DataTable GetUserInfoList(Maticsoft.Model.User_Info_Search model, out int iAll)
 {
     iAll = 0;
     return(null);
 }