当前位置: 首页>>代码示例>>C#>>正文


C# WebServiceInterfaces.CollectionRequest类代码示例

本文整理汇总了C#中IRIS.Law.WebServiceInterfaces.CollectionRequest的典型用法代码示例。如果您正苦于以下问题:C# CollectionRequest类的具体用法?C# CollectionRequest怎么用?C# CollectionRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CollectionRequest类属于IRIS.Law.WebServiceInterfaces命名空间,在下文中一共展示了CollectionRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindContactTitle

        public void BindContactTitle(DropDownList _ddlContactTitles)
        {
            ContactServiceClient contactService = null;
            try
            {
                contactService = new ContactServiceClient();
                CollectionRequest collectionRequest = new CollectionRequest();
                collectionRequest.StartRow = 0;

                TitleSearchCriteria titleCriteria = new TitleSearchCriteria();
                TitleSearchReturnValue titleReturnValue = contactService.TitleSearch(_logonSettings.LogonId, collectionRequest, titleCriteria);
                if (titleReturnValue.Title != null)
                {
                    _ddlContactTitles.DataSource = titleReturnValue.Title.Rows;
                    _ddlContactTitles.DataTextField = "TitleId";
                    _ddlContactTitles.DataValueField = "TitleId";
                    _ddlContactTitles.DataBind();
                }
                AddDefaultToDropDownList(_ddlContactTitles);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (contactService != null)
                {
                    if (contactService.State != System.ServiceModel.CommunicationState.Faulted)
                        contactService.Close();
                }
            }
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:33,代码来源:CreateContact.aspx.cs

示例2: SearchAppointment

        /// <summary>
        /// Searches for appointments that match the search criteria.
        /// </summary>
        public IRIS.Law.WebServiceInterfaces.Diary.Appointment[] SearchAppointment(int startRow, int pageSize, string sortBy, string user, string date, bool forceRefresh)
        {
            DiaryServiceClient diaryService = null;
            IRIS.Law.WebServiceInterfaces.Diary.Appointment[] appointments = null;
            try
            {
                if (HttpContext.Current.Session[SessionName.LogonSettings] != null)
                {
                    Guid _logonId = ((LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]).LogonId;
                    CollectionRequest collectionRequest = new CollectionRequest();
                    collectionRequest.ForceRefresh = forceRefresh;
                    collectionRequest.StartRow = startRow;
                    collectionRequest.RowCount = pageSize;

                    AppointmentSearchCriteria criteria = new AppointmentSearchCriteria();
                    criteria.MemberID = user;
                    criteria.OrderBy = sortBy;
                    if (!string.IsNullOrEmpty(date))
                    {
                        criteria.Date = Convert.ToDateTime(date);
                    }
                    else
                    {
                        criteria.Date = DataConstants.BlankDate;
                    }

                    diaryService = new DiaryServiceClient();
                    AppointmentSearchReturnValue returnValue = diaryService.AppointmentSearch(_logonId,
                                                collectionRequest, criteria);

                    if (returnValue.Success)
                    {
                        _appointmentRowCount = returnValue.Appointments.TotalRowCount;
                        appointments = returnValue.Appointments.Rows;
                    }
                    else
                    {
                        if (returnValue.Message == "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.")
                            throw new Exception("Date is invalid");
                        else
                            throw new Exception(returnValue.Message);
                    }
                }
                return appointments;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (diaryService != null)
                {
                    if (diaryService.State != System.ServiceModel.CommunicationState.Faulted)
                        diaryService.Close();
                }
            }
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:61,代码来源:ViewAppointment.aspx.cs

示例3: GetMatterDocuments

        /// <summary>
        /// Gets the documents for the matter.
        /// </summary>
        public DocumentSearchItem[] GetMatterDocuments(int startRow, int pageSize, string sortBy)
        {
            DocumentServiceClient documentService = new DocumentServiceClient();
            DocumentSearchItem[] matterDocs = null;
            try
            {
                Guid logonId = ((LogonReturnValue)Session[SessionName.LogonSettings]).LogonId;
                CollectionRequest collectionRequest = new CollectionRequest();
                collectionRequest.StartRow = startRow;
                collectionRequest.RowCount = pageSize;
                collectionRequest.ForceRefresh = true;

                if (Session[SessionName.ProjectId] != null)
                {
                    DocumentSearchReturnValue returnValue = documentService.MatterDocumentSearch(logonId, (Guid)Session[SessionName.ProjectId], sortBy);
                    if (returnValue != null)
                    {
                        if (returnValue.Success)
                        {
                            if (returnValue.Document != null)
                            {
                                matterDocs = returnValue.Document.Rows;
                                _matterDocumentRowCount = returnValue.Document.Rows.Length;
                            }
                        }
                        else
                        {
                            throw new Exception(returnValue.Message);
                        }
                    }
                }
                else
                {
                    throw new Exception("No Project Id found.");
                }
                return matterDocs;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (documentService != null)
                {
                    if (documentService.State != System.ServiceModel.CommunicationState.Faulted)
                        documentService.Close();
                }
            }
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:53,代码来源:ViewMatterHistory.aspx.cs

示例4: LoadUnauthorisedClientChequeRequestsCredit

        public ChequeAuthorisationSearchItem[] LoadUnauthorisedClientChequeRequestsCredit(int startRow, int pageSize, bool forceRefresh)
        {
            AccountsServiceClient accountsService = null;
            ChequeAuthorisationSearchItem[] clientChequeRequests = null;

            try
            {
                accountsService = new AccountsServiceClient();
                CollectionRequest collectionRequest = new CollectionRequest();
                collectionRequest.ForceRefresh = forceRefresh;
                collectionRequest.StartRow = startRow;
                collectionRequest.RowCount = pageSize;

                ChequeAuthorisationSearchCriteria searchCriteria = new ChequeAuthorisationSearchCriteria();
                searchCriteria.IsAuthorised = false;
                searchCriteria.IsPosted = false;

                // Suggestd by client after introducing new properties in service layer
                searchCriteria.IncludeDebit = false;
                searchCriteria.IncludeCredit = true;

                Guid logonId = ((LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]).LogonId;
                ChequeAuthorisationReturnValue returnValue = accountsService.GetUnauthorisedClientChequeRequests(logonId, collectionRequest, searchCriteria);

                if (returnValue.Success)
                {
                    _clientChequeRequestsCreditRowCount = returnValue.ChequeRequests.TotalRowCount;
                    clientChequeRequests = returnValue.ChequeRequests.Rows;
                }
                else
                {
                    _lblMessage.CssClass = "errorMessage";
                    _lblMessage.Text = returnValue.Message;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (accountsService != null)
                {
                    if (accountsService.State != System.ServiceModel.CommunicationState.Faulted)
                        accountsService.Close();
                }
            }

            return clientChequeRequests;
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:50,代码来源:AuthoriseChequeRequests.aspx.cs

示例5: BranchSearch

 /// <summary>
 /// 
 /// </summary>
 /// <param name="oHostSecurityToken"></param>
 /// <param name="collectionRequest"></param>
 /// <param name="criteria"></param>
 /// <returns></returns>
 public BranchSearchReturnValue BranchSearch(HostSecurityToken oHostSecurityToken, CollectionRequest collectionRequest)
 {
     BranchSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oBranchDeptService = new BranchDeptService();
         returnValue = oBranchDeptService.BranchSearch(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest);
     }
     else
     {
         returnValue = new BranchSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:23,代码来源:BranchDeptServiceIWS.svc.cs

示例6: AdvocacyTypeSearch

 /// <summary>
 /// 
 /// </summary>
 /// <param name="oHostSecurityToken"></param>
 /// <param name="collectionRequest"></param>
 /// <returns></returns>
 public AdvocacyTypeSearchReturnValue AdvocacyTypeSearch(HostSecurityToken oHostSecurityToken,
                                                   CollectionRequest collectionRequest)
 {
     AdvocacyTypeSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oTimeService = new TimeService();
         returnValue = oTimeService.AdvocacyTypeSearch(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest);
     }
     else
     {
         returnValue = new AdvocacyTypeSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:23,代码来源:TimeServiceIWS.svc.cs

示例7: LoadDisbursements

        /// <summary>
        /// Loads disbursements by project id
        /// </summary>
        /// <param name="startRow"></param>
        /// <param name="pageSize"></param>
        /// <param name="forceRefresh"></param>
        /// <returns></returns>
        public DisbursementSearchItem[] LoadDisbursements(int startRow, int pageSize, bool forceRefresh)
        {
            AccountsServiceClient accountsService = null;
            DisbursementSearchItem[] disbursements = null;

            try
            {
                if (Session[SessionName.ProjectId] != null)
                {
                    accountsService = new AccountsServiceClient();
                    CollectionRequest collectionRequest = new CollectionRequest();
                    collectionRequest.ForceRefresh = forceRefresh;
                    collectionRequest.StartRow = startRow;
                    collectionRequest.RowCount = pageSize;

                    Guid projectId = (Guid)Session[SessionName.ProjectId];
                    Guid logonId = ((LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]).LogonId;
                    DisbursementsSearchReturnValue returnValue = accountsService.GetDisbursementsDetails(logonId, collectionRequest, projectId);

                    if (returnValue.Success)
                    {
                        _disbursementsRowCount = returnValue.Disbursements.TotalRowCount;
                        disbursements = returnValue.Disbursements.Rows;
                    }
                    else
                    {
                        _lblMessage.CssClass = "errorMessage";
                        _lblMessage.Text = returnValue.Message;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (accountsService != null)
                {
                    if (accountsService.State != System.ServiceModel.CommunicationState.Faulted)
                        accountsService.Close();
                }
            }

            return disbursements;
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:53,代码来源:ViewDisbursementsLedger.aspx.cs

示例8: EarnerSearch

 /// <summary>
 /// 
 /// </summary>
 /// <param name="oHostSecurityToken"></param>
 /// <param name="collectionRequest"></param>
 /// <param name="criteria"></param>
 /// <returns></returns>
 public EarnerSearchReturnValue EarnerSearch(HostSecurityToken oHostSecurityToken, CollectionRequest collectionRequest,
     EarnerSearchCriteria criteria)
 {
     EarnerSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oEarnerService = new EarnerService();
         returnValue = oEarnerService.EarnerSearch(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest, criteria);
     }
     else
     {
         returnValue = new EarnerSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:24,代码来源:EarnerServiceIWS.svc.cs

示例9: AppointmentSearch

 public AppointmentSearchReturnValue AppointmentSearch(HostSecurityToken oHostSecurityToken, CollectionRequest collectionRequest,
                         AppointmentSearchCriteria criteria)
 {
     AppointmentSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oDiaryService = new DiaryService();
         returnValue = oDiaryService.AppointmentSearch(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest, criteria);
     }
     else
     {
         returnValue = new AppointmentSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:17,代码来源:DiaryServiceIWS.svc.cs

示例10: AssociationRoleForApplicationSearch

 /// <summary>
 /// Search for association roles based on the application
 /// </summary>
 /// <param name="oHostSecurityToken">HostSecurityToken obtained when security provider of IWS is called</param>
 /// <param name="collectionRequest">Information about the collection being requested.</param>
 /// <param name="criteria">AssociationRole search criteria.</param>
 /// <returns></returns>
 public AssociationRoleSearchReturnValue AssociationRoleForApplicationSearch(HostSecurityToken oHostSecurityToken,
             CollectionRequest collectionRequest, AssociationRoleSearchCriteria criteria)
 {
     AssociationRoleSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oContactService = new ContactService();
         returnValue = oContactService.AssociationRoleForApplicationSearch(Functions.GetLogonIdFromToken(oHostSecurityToken),
             collectionRequest, criteria);
     }
     else
     {
         returnValue = new AssociationRoleSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:25,代码来源:ContactServiceIWS.svc.cs

示例11: SearchContactService

        /// <summary>
        /// Searches for clients that match the search criteria.
        /// </summary>
        public ServiceContactSearchItem[] SearchContactService(int startRow, int pageSize, string sortBy, string serviceOrgId, bool forceRefresh)
        {
            TimeServiceClient timeService = null;
            ServiceContactSearchItem[] serviceContact = null;
            try
            {
                if (HttpContext.Current.Session[SessionName.LogonSettings] != null)
                {
                    Guid _logonId = ((LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]).LogonId;
                    CollectionRequest collectionRequest = new CollectionRequest();
                    collectionRequest.ForceRefresh = forceRefresh;
                    collectionRequest.StartRow = startRow;
                    collectionRequest.RowCount = pageSize;

                    Guid orgId = new Guid(serviceOrgId);

                    timeService = new TimeServiceClient();
                    ServiceContactSearchReturnValue returnValue = timeService.ServiceContactSearch(_logonId, collectionRequest, orgId, sortBy);

                    if (returnValue.Success)
                    {
                        _serviceContactRowCount = returnValue.ServiceContact.TotalRowCount;
                        serviceContact = returnValue.ServiceContact.Rows;
                    }
                    else
                    {
                        throw new Exception(returnValue.Message);
                    }
                }
                return serviceContact;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (timeService != null)
                {
                    if (timeService.State != System.ServiceModel.CommunicationState.Faulted)
                        timeService.Close();
                }
            }
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:47,代码来源:SearchContact.aspx.cs

示例12: GetTaskTypes

 public DiaryParameterReturnValue GetTaskTypes(HostSecurityToken oHostSecurityToken, CollectionRequest collectionRequest)
 {
     DiaryParameterReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oDiaryService = new DiaryService();
         returnValue = oDiaryService.GetTaskTypes(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest);
     }
     else
     {
         returnValue = new DiaryParameterReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:16,代码来源:DiaryServiceIWS.svc.cs

示例13: GetBookingCancelledReasons

 public CancellationCodeSearchReturnValue GetBookingCancelledReasons(HostSecurityToken oHostSecurityToken, CollectionRequest collectionRequest)
 {
     CancellationCodeSearchReturnValue returnValue = null;
     if (Functions.ValidateIWSToken(oHostSecurityToken))
     {
         oDiaryService = new DiaryService();
         returnValue = oDiaryService.GetBookingCancelledReasons(Functions.GetLogonIdFromToken(oHostSecurityToken), collectionRequest);
     }
     else
     {
         returnValue = new CancellationCodeSearchReturnValue();
         returnValue.Success = false;
         returnValue.Message = "Invalid Token";
     }
     return returnValue;
 }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:16,代码来源:DiaryServiceIWS.svc.cs

示例14: GetDocumentTypes

        /// <summary>
        /// Get Document Types for Import Document
        /// </summary>
        /// <param name="logonId"></param>
        /// <param name="criteria"></param>
        /// <param name="collectionRequest"></param>
        /// <returns></returns>
        public DocumentTypeReturnValue GetDocumentTypes(Guid logonId, DocumentTypeSearchCriteria criteria, CollectionRequest collectionRequest)
        {
            DocumentTypeReturnValue returnValue = new DocumentTypeReturnValue();

            try
            {
                // Get the logged on user from the current logons and add their
                // ApplicationSettings the list of concurrent sessions.
                Host.LoadLoggedOnUser(logonId);

                try
                {
                    Functions.RestrictRekoopIntegrationUser(UserInformation.Instance.DbUid);
                    switch (UserInformation.Instance.UserType)
                    {
                        case DataConstants.UserType.Staff:
                            // Can do everything
                            break;
                        case DataConstants.UserType.Client:
                        case DataConstants.UserType.ThirdParty:
                            throw new Exception("Access denied");
                        default:
                            throw new Exception("Access denied");
                    }

                    // Create a data list creator for a list of matters
                    DataListCreator<DocumentTypeSearchItem> dataListCreator = new DataListCreator<DocumentTypeSearchItem>();

                    // Declare an inline event (annonymous delegate) to read the
                    // dataset if it is required
                    dataListCreator.ReadDataSet += delegate(object sender, ReadDataSetEventArgs e)
                    {
                        e.DataSet = SrvDocumentLookup.GetDocumentTypes(criteria.DocTypeIDs);
                    };

                    // Create the data list
                    returnValue.DocumentType = dataListCreator.Create(logonId,
                        // Give the query a name so it can be cached
                        "DocumentTypeSearch",
                        // Tell it the query criteria used so if the cache is accessed
                        // again it knows if it is the same query
                        criteria.ToString(),
                        collectionRequest,
                        // Import mappings to map the dataset row fields to the data
                        // list entity properties
                        new ImportMapping[] {
                            new ImportMapping("Id", "DocTypeID"),
                            new ImportMapping("Description", "DocTypeDescription")
                            }
                        );
                }
                finally
                {
                    // Remove the logged on user's ApplicationSettings from the
                    // list of concurrent sessions
                    Host.UnloadLoggedOnUser();
                }
            }
            catch (System.Data.SqlClient.SqlException)
            {
                returnValue.Success = false;
                returnValue.Message = Functions.SQLErrorMessage;
            }
            catch (Exception ex)
            {
                returnValue.Success = false;
                returnValue.Message = ex.Message;
            }

            return returnValue;
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:78,代码来源:DocumentService.svc.cs

示例15: GetTitles

        /// <summary>
        /// Gets the title values for the drop down list..
        /// </summary>
        private void GetTitles()
        {
            ContactServiceClient contactService = null;
            try
            {
                contactService = new ContactServiceClient();
                CollectionRequest collectionRequest = new CollectionRequest();
                TitleSearchCriteria searchCriteria = new TitleSearchCriteria();
                TitleSearchReturnValue returnValue = contactService.TitleSearch(_logonId, collectionRequest, searchCriteria);

                if (returnValue.Success)
                {
                    _ddlTitle.DataSource = returnValue.Title.Rows;
                    _ddlTitle.DataTextField = "TitleId";
                    _ddlTitle.DataValueField = "TitleId";
                    _ddlTitle.DataBind();
                }
                else
                {
                    throw new Exception(returnValue.Message);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (contactService != null)
                {
                    if (contactService.State != System.ServiceModel.CommunicationState.Faulted)
                        contactService.Close();
                }
            }
        }
开发者ID:advanced-joelloyd,项目名称:UghWebforms,代码行数:38,代码来源:ViewContactDetails.ascx.cs


注:本文中的IRIS.Law.WebServiceInterfaces.CollectionRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。