示例#1
0
        public EMCustomers GetCustomers(Guid OrganizationGUID)
        {
            IPlaceRepository _IPlaceRepository;
            _IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());

            EMCustomers lresponse = new EMCustomers();
            lresponse.Customers = new List<MobilePlace>();

            List<Place> _Customers = _IPlaceRepository.GetPlaceByOrganizationGUID(OrganizationGUID).ToList();
            foreach (Place item in _Customers)
            {
                lresponse.Customers.Add(ConvertPlaceforMobile(item));
            }
            return lresponse;
        }
示例#2
0
        //public DownloadUsers GetOrganization(string SessionID)
        //{
        //    IOrganizationRepository _IOrganizationRepository;
        //    _IOrganizationRepository = new OrganizationRepository(new WorkersInMotionDB());
        //    DownloadUsers lDownloadUsers = new DownloadUsers();

        //    SqlParameter[] sqlParam = new SqlParameter[2];
        //    sqlParam[0] = new SqlParameter("@pSessionID", SqlDbType.NVarChar);
        //    sqlParam[0].Value = SessionID;
        //    sqlParam[1] = new SqlParameter("@pErrorCode", SqlDbType.NVarChar, 200);
        //    sqlParam[1].Value = "";
        //    sqlParam[1].Direction = ParameterDirection.Output;
        //    _jmResponse.JobList = context.Database.SqlQuery<p_GetJobs_Result>("dbo.p_getjobs  @pSessionID,@pErrorCode=@pErrorCode output", sqlParam).ToList();
        //    return lDownloadUsers;
        //}



        public List<MCustomers> GetCustomers(Guid lOrganizationGUID)
        {
            DownloadUsers lresponse = new DownloadUsers();
            IPlaceRepository _IPlaceRepository;
            _IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
            IEnumerable<Place> lPlaces = _IPlaceRepository.GetPlaceByOrganizationGUID(lOrganizationGUID);
            return ConvertToMobileCustomer(lPlaces); ;
        }