コード例 #1
0
        public UserInfo GetUserInfo(int userId)
        {
            MyServiceReference.MyServiceClient serviceClient = new MyServiceReference.MyServiceClient();
            UserInfo lst = new UserInfo();

            //db call get data
            //lst = CreateMockData();
            //lst = (TrainingProduct)serviceClient.GetAllProductsById(ProductID);
            //ret = lstp => p.ProductID == ProductID);

            SPAData.MyServiceReference.UserInfo _ret = serviceClient.GetAllUsersById(userId);
            //lst.UserId = _ret.UserId;
            //lst.UserName = _ret.UserName;
            //lst.Password = _ret.Password;
            //lst.IsActive = (bool)_ret.IsActive;

            return(lst);
        }
コード例 #2
0
        public UserInfo Get(int userId)
        {
            MyServiceReference.MyServiceClient serviceClient = new MyServiceReference.MyServiceClient();
            UserInfo lst = new UserInfo();

            //db call get data
            //lst = CreateMockData();
            //lst = (TrainingProduct)serviceClient.GetAllProductsById(ProductID);
            //ret = lstp => p.ProductID == ProductID);

            SPAData.MyServiceReference.UserInfo _ret = serviceClient.GetAllUsersById(userId);
            lst.User_ID   = _ret.User_ID;
            lst.FirstName = _ret.FirstName;

            lst.LastName    = _ret.LastName;
            lst.Project_ID  = _ret.Project_ID;
            lst.Employee_ID = _ret.Employee_ID;
            lst.Task_ID     = _ret.Task_ID;
            return(lst);
        }