Exemple #1
0
        /// <summary>
        /// An add example for opportunity documents
        /// </summary>
        public DocumentsModel AddOpportunityDocument(string orgCode, string type, string fileName, string documentData, string text, int opportunity, string accountCode)
        {
            //Note that sequence number isn't set for POST operations.  Ungerboeck will assign the sequence number automatically.
            var myDocument = new DocumentsModel
            {
                Organization    = orgCode,
                Type            = type,         //The file extension must be mapped to one of the recognized Ungerboeck document types.  Use USISDKConstants.DocumentTypeCodes to get the list of type codes.
                NewFileName     = fileName,
                NewDocumentData = documentData, //Files must be in the form of a byte array converted to a base 64 encoded string.  The APIUtil class contains conversion functions to help you: APIUtil.GetEncodedStringForDocuments(FileBytes)
                Description     = text,         //This will be the Ungerboeck description for the file
                Opportunity     = opportunity,
                Account         = accountCode
            };

            return(APIUtil.AddDocument(USISDKClient, myDocument));
        }
Exemple #2
0
        public NotesModel AddJournalEntryNote(string orgCode, string text, int fiscalYear, int fiscalPeriod, string entryNumber, string source, string newTitle)
        {
            var myNote = new NotesModel
            {
                OrganizationCode   = orgCode,
                Type               = USISDKConstants.NoteType.JournalEntryHeaderNote,
                Title              = newTitle,
                Text               = text,
                FiscalYear         = fiscalYear,
                FiscalPeriod       = fiscalPeriod,
                JournalEntryNumber = entryNumber,
                GLSource           = source
            };

            return(APIUtil.AddNote(USISDKClient, myNote));
        }
Exemple #3
0
        /// <summary>
        /// A basic edit example
        /// </summary>
        /// <param name="code">Currency code of object to Update</param>
        /// <param name="sequenceNumber">Sequence Number of object to update</param>
        /// <returns></returns>
        public CurrencyRatesModel Edit(string code, int sequenceNumber, CurrencyRatesModel currencyRatesModelNew)
        {
            var currencyRates = APIUtil.GetCurrencyRate(USISDKClient, code, sequenceNumber);

            if (currencyRates != null)
            {
                currencyRates.EffectiveDate                = currencyRatesModelNew.EffectiveDate;
                currencyRates.LocalCurrencyRate            = currencyRatesModelNew.LocalCurrencyRate;
                currencyRates.ForeignCurrencyRate          = currencyRatesModelNew.ForeignCurrencyRate;
                currencyRates.TriangulationCurrencyRate    = currencyRatesModelNew.TriangulationCurrencyRate;
                currencyRates.ExchangeRateCurrencyCode     = currencyRatesModelNew.ExchangeRateCurrencyCode;
                currencyRates.ExchangeRateOrganizationCode = currencyRatesModelNew.ExchangeRateOrganizationCode;
            }

            return(APIUtil.UpdateCurrencyRate(USISDKClient, code, sequenceNumber, currencyRatesModelNew));
        }
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">Organization Code</param>
        /// <param name="orderNumber">The order number of the item's parent order</param>
        /// <param name="units">The amount of items you want on the order</param>
        /// <param name="priceListDetailSeqNbr">This should be filled in as the Price List Sequence number (CC716_SEQ) of the item you wish to add.  It should belong to the Order's price list items (Check CC716_PRICE_LIST_DTL).  You can see this value by going to v20->main menu->price lists-> edit price list-> price list item grid -> show column "Sequence"</param>
        public ServiceOrderItemsModel Add(string orgCode, int orderNumber, int units, int priceListDetailSeqNbr)
        {
            var myServiceOrderItem = new ServiceOrderItemsModel
            {
                OrganizationCode      = orgCode,
                OrderNumber           = orderNumber,
                Units                 = units,
                StartDate             = System.DateTime.Now,
                EndDate               = System.DateTime.Now,
                StartTime             = System.DateTime.Now,
                EndTime               = System.DateTime.Now,
                PriceListDetailSeqNbr = priceListDetailSeqNbr,
            };

            return(APIUtil.AddServiceOrderItem(USISDKClient, myServiceOrderItem));
        }
Exemple #5
0
        /// <summary>
        /// Example of how to add a ExternalDetail
        /// </summary>
        /// <param name="orgCode"></param>
        /// <param name="Description">The Description that you want to attach the ExternalDetail to</param>
        /// <param name="ExternalGLAccount">This is the user-configurable External GLAccount code the ExternalDetail takes place in</param>
        /// <param name="ExternalGLDesc">This should be set to the ExternalGLDesc of the ExternalDetail </param>
        /// <param name="Currency">This should be set to the Currency of the ExternalDetail </param>
        public ExternalDetailsModel Add()
        {
            var myExternalDetail = new ExternalDetailsModel
            {
                OrgCode           = "10",
                Description       = "B-Facility Fees Mystern",
                ExternalGLAccount = "0000-600-60-21015",
                ExternalGLDesc    = "B-Facility Fees Mystern",
                GLAccount         = "123456789",
                GLSubAccount      = "",
                Resource          = 5042,
                Currency          = "USD"
            };

            return(APIUtil.AddExternalDetailWithoutConflictCheck(USISDKClient, myExternalDetail));
        }
Exemple #6
0
        /// <summary>
        /// Example of how to add a booking
        /// </summary>
        /// <param name="orgCode"></param>
        /// <param name="Event">The ID of the event you want to attach the booking to</param>
        /// <param name="space">This is the user-configurable space code the booking takes place in</param>
        /// <param name="startDate">This should be set to the start date of the booking </param>
        /// <param name="endDate">This should be set to the start time of the booking </param>
        /// <param name="startTime">This should be set to the end date of the booking </param>
        /// <param name="endTime">This should be set to the end time of the booking </param>
        public BookingsModel Add(string orgCode, int Event, string space, DateTime startDate, DateTime endDate, DateTime startTime, DateTime endTime)
        {
            var myBooking = new BookingsModel
            {
                OrganizationCode = orgCode,
                Event            = Event,
                Daily            = "Y", //Y or N
                Space            = space,
                StartTime        = startTime,
                StartDate        = startDate,
                EndTime          = endTime,
                EndDate          = endDate
            };

            return(APIUtil.AddBookingWithoutConflictCheck(USISDKClient, myBooking));
        }
Exemple #7
0
        /// <summary>
        /// A basic edit example
        /// </summary>
        public ExternalDetailsModel Edit(string orgCode, int externalID, ExternalDetailsModel externalDetailsModelNew)
        {
            var myExternalDetails = APIUtil.GetExternalDetail(USISDKClient, orgCode, externalID);

            if (myExternalDetails != null)
            {
                myExternalDetails.Description       = externalDetailsModelNew.Description;
                myExternalDetails.ExternalGLAccount = externalDetailsModelNew.ExternalGLAccount;
                myExternalDetails.ExternalGLDesc    = externalDetailsModelNew.ExternalGLDesc;
                myExternalDetails.GLAccount         = externalDetailsModelNew.GLAccount;
                myExternalDetails.Resource          = externalDetailsModelNew.Resource;
                myExternalDetails.Currency          = externalDetailsModelNew.Currency;
                myExternalDetails.GLPosted          = externalDetailsModelNew.GLPosted;
            }

            return(APIUtil.UpdateExternalDetailWithoutConflictCheck(USISDKClient, myExternalDetails));
        }
Exemple #8
0
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="eventId">Event ID of the event the session proposal is associated with.</param>
        /// <param name="sessionProposalTitle">Title of the session proposal</param>
        /// <param name="statusId">Status of an session proposal</param>
        /// <param name="presentationTypeId">Sequence number of the presentation type associated with the session proposal</param>
        /// <param name="topicId">Id of the topic the session proposal is associated with</param>
        /// <param name="htmlText">Session proposal text with all of its HTML formatting codes</param>
        /// <param name="submitterId">Submitter account code</param>
        /// <param name="submissionForm">Session proposal web configuration ID</param>
        /// <returns></returns>
        public SessionProposalsModel Add(string orgCode, int eventId, string sessionProposalTitle, int statusId, int presentationTypeId, int topicId, string htmlText, string submitterId, int submissionForm)
        {
            SessionProposalsModel sessionProposal = new SessionProposalsModel()
            {
                OrganizationCode     = orgCode,
                Event                = eventId,
                SessionProposalTitle = sessionProposalTitle,
                Status               = statusId,
                PresentationType     = presentationTypeId,
                Topic                = topicId,
                HTMLText             = htmlText,
                Submitter            = submitterId,
                SubmissionForm       = submissionForm
            };

            return(APIUtil.AddSessionProposal(USISDKClient, sessionProposal));
        }
Exemple #9
0
        /// <summary>
        /// Add new ARDemographic
        /// </summary>
        /// <param name="aRDemographicsModel"></param>
        /// <returns></returns>
        public ARDemographicsModel Add(string orgCode, string account)
        {
            var aRDemographicModel = new ARDemographicsModel()
            {
                Organization = orgCode,
                Account      = account,
                Terms        = "30",
                CreditLimit  = 100,
                HoldOrders   = "W",
                EnteredBy    = "JEFFK",
                EnteredOn    = DateTime.UtcNow,
                ChangedBy    = "JEFFK",
                ChangedOn    = DateTime.UtcNow
            };

            return(APIUtil.AddARDemographic(USISDKClient, aRDemographicModel));
        }
Exemple #10
0
        /// <summary>
        /// Adds a Journal Entry
        /// </summary>
        public JournalEntriesModel Add(string orgCode, int Event, int year, int period, string source, string entryNumber, string status, string description, System.DateTime transactionDate)
        {
            var myJournalEntry = new JournalEntriesModel
            {
                Organization    = orgCode,
                Event           = Event,
                Year            = year,
                Period          = period,
                Source          = source,
                EntryNumber     = entryNumber,
                Status          = status,
                Description     = description,
                TransactionDate = transactionDate
            };

            return(APIUtil.AddJournalEntry(USISDKClient, myJournalEntry));
        }
Exemple #11
0
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="preferenceType">Preference Type</param>
        /// <param name="active">True if active</param>
        /// <param name="mandatory">"Y" or "N".</param>
        /// <param name="configurationCode">Application configuration code</param>
        /// <param name="defaultLanguage">"Y" or "N". Default language to be used when usersland on the site for the first time, using the base link that has no language information predefined.</param>
        /// <returns></returns>
        public RegistrationPreferenceTypesModel Add(string orgCode,
                                                    int preferenceType,
                                                    string active,
                                                    string mandatory,
                                                    string configurationCode)
        {
            RegistrationPreferenceTypesModel registrationPreferenceType = new RegistrationPreferenceTypesModel()
            {
                OrgCode           = orgCode,
                PreferenceType    = preferenceType,
                Active            = active,
                Mandatory         = mandatory,
                ConfigurationCode = configurationCode
            };

            return(APIUtil.AddRegistrationPreferenceType(USISDKClient, registrationPreferenceType));
        }
Exemple #12
0
        /// <summary>
        /// This method demonstrates searching in the API and retrieving specific properties using the Select parameter.
        /// </summary>
        public IEnumerable <object> SearchingForSpecificPropertiesWithSelect(string OrgCode)
        {
            SearchMetadataModel searchMetadata = null;
            JArray        eventsList; //Represents a custom object.
            List <string> modelProperties = new List <string> {
                "Description", "StartDate"
            };

            //Get all events and only return specific properties in the model
            var events = APIUtil.GetSearchList <EventsModel>(USISDKClient, ref searchMetadata, OrgCode, "ChangedOn gt DateTime'2017-01-01'", "", 10, 100000, modelProperties);

            eventsList = JArray.FromObject(events, new Newtonsoft.Json.JsonSerializer {
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
            });                                                                                                                                    //Remove the excess properties from the stock model object.  Those properties are never filled in this process.

            return(eventsList);
        }
Exemple #13
0
        public DocumentsModel ImportUpdatedDocument(string orgCode, string type, int sequenceNumber, string newFilename, string newDocumentBytes)
        {
            //If you include new file data with the DocumentModel, the PUT process will run the "Import Updated Document" on your behalf.
            //If the NewDocumentData property is empty, the file data will not be touched.

            //The max size uploaded is often affected by clients.  For example, you can change this setting by affecting a web.config settings of maxAllowedContentLength and maxRequestLength
            var myDocument = APIUtil.GetDocument(USISDKClient, orgCode, type, sequenceNumber);

            myDocument.NewFileName = newFilename;          //Make sure to include the filename of the document, even if its unchanged.  It's needed for file format verifying.

            myDocument.NewDocumentData = newDocumentBytes; // This should be a base 64 encoded string representing a byte array for the new data of the document when adding or updating a document entry.
                                                           //For example "SGVsbG8gVXBkYXRlZCBXb3JsZCE=" is a text document with the text "Hello World!"

            //We include a APIUtil function if you have a byte array:
            //myDocument.NewDocumentData = APIUtil.GetEncodedStringForDocuments(fileByteArray)

            return(APIUtil.UpdateDocument(USISDKClient, myDocument));
        }
Exemple #14
0
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="Event">The event ID of the event attached to the order</param>
        /// <param name="orderStatus"></param>
        /// <param name="accountCode"></param>
        /// <param name="priceList">The price list code.  You can find this on the Price List window in Ungerboeck under the "Code" field (Database column CC715_PRICE_LIST).</param>
        /// <param name="registrants">This is an account code that you want to serve as a registrant on the order item generated by the order.  You can also set it as a list of comma-delimited account codes (ex: "CODE1,CODE2,CODE3") and it will make respective order items for each registrant.</param>
        /// <param name="registrantType">This is the registrant type code, configured by the event's registration setup.  This will pick the order items attached to the order registrants</param>
        /// <returns></returns>
        public RegistrationOrdersModel Add(string orgCode, int Event, string orderStatus, string accountCode, string priceList, string registrants, string registrantType)
        {
            //Note that order number shouldn't be set for POST operations.  Ungerboeck will assign the order number automatically

            var myRegistrationOrder = new RegistrationOrdersModel
            {
                OrganizationCode = orgCode,
                Event            = Event,
                Account          = accountCode,
                BillToAccount    = accountCode,
                PriceList        = priceList,
                Registrants      = registrants,
                OrderStatus      = orderStatus,
                RegistrantType   = registrantType,
            };

            return(APIUtil.AddRegistrationOrder(USISDKClient, myRegistrationOrder));
        }
Exemple #15
0
        /// <summary>
        /// Adds a booth order to the specified exhibitor. Optionally takes a paramater for booth to assign the exhibitor at the same time.
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="Event">The event ID of the event attached to the order</param>
        /// <param name="orderStatus">This is the user-configurable status code on the order</param>
        /// <param name="accountCode">This should be a single account code</param>
        /// <param name="exhibitor">The exhibitorID to add this order to</param>
        /// <param name="function">The event ID of the event attached to the order. Must be of type </param>
        /// <param name="billToAccount"></param>
        /// <param name="priceList">The price list code. You can find this on the Price List window in Ungerboeck under the "Code" field (Database column CC715_PRICE_LIST).</param>
        /// <param name="booth">This is a comma seperated list of booths to assign to this order</param>
        public ServiceOrdersModel AddBoothOrderToExhibitor(string orgCode, int Event, string orderStatus, string accountCode, int exhibitor, int function, string billToAccount, string priceList, string booth = "")
        {
            var exhibitorBoothOrder = new ServiceOrdersModel
            {
                OrganizationCode = orgCode,
                Event            = Event,
                OrderStatus      = orderStatus,
                Account          = accountCode,
                Function         = function,
                BillToAccount    = billToAccount,
                PriceList        = priceList,
                Exhibitor        = exhibitor,
                BoothOrder       = "Y",
                BoothNumber      = booth
            };

            return(APIUtil.AddServiceOrder(USISDKClient, exhibitorBoothOrder));
        }
Exemple #16
0
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode"></param>
        /// <param name="description"></param>
        /// <param name="accountCode"></param>
        /// <param name="issueClass">Set this to the designation of the opportunity.  You can use USISDKConstants.AccountDesignations to help you.  Example value is UngerboeckSDKPackage.USISDKConstants.AccountDesignations.EventSales</param>
        /// <param name="issueType">Set the opportunity type using the type code.  Which User Defined Fields you use is dependent on this.</param>
        /// <param name="status">This should be set to a code value found in the opportunity statuses window.  Example value is "A"</param>
        /// <param name="userNumber03Value">In this example, we will set User Number 03, but you can fill any user field on your Issue Type.</param>
        public OpportunitiesModel Add(string orgCode, string description, string accountCode, string issueClass, string issueType, string status, int userNumber03Value)
        {
            var myOpportunity = new OpportunitiesModel
            {
                Organization = orgCode,
                Description  = description,
                Account      = accountCode,
                Status       = status,
                Class        = issueClass,
                Type         = issueType,
                UserNumber03 = userNumber03Value

                               //Contact = "00111111"  'Set this to the account code of the opportunity contact if you wish for it to attach to that contact
                               //Salesperson = "ALB" 'Enter in the account code of the salesperson if you wish to set this
            };

            return(APIUtil.AddOpportunity(USISDKClient, myOpportunity));
        }
Exemple #17
0
        /// <summary>
        /// This method demonstrates searching and pulling back User Fields using the Select parameter.
        /// </summary>
        public IEnumerable <object> RetrieveUserFieldsDuringSearchWithSelect(string OrgCode)
        {
            //This uses Functions as an example, but all non-account user fields work the same.  See the Accounts example code for an account example.

            SearchMetadataModel searchMetadata = null;
            JArray        functionsList; //Represents a custom object.
            List <string> modelProperties = new List <string> {
                "BU|UserDateTime02"
            };                                                                 //For non-account user fields, the format is [User field Type]|[User field property name]

            var functions = APIUtil.GetSearchList <FunctionsModel>(USISDKClient, ref searchMetadata, OrgCode, "EventID eq 13082", "", 1000, 100000, modelProperties);

            functionsList = JArray.FromObject(functions, new Newtonsoft.Json.JsonSerializer {
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
            });                                                                                                                                          //Remove the excess properties from the stock model object.  Those properties are never filled in this process.

            return(functionsList);
        }
        /// <summary>
        /// Adds a Journal Entry
        /// </summary>
        public JournalEntryDetailsModel Add(string orgCode, int Event, int year, int period, string source, string entryNumber, string status, string description, string glAccount, System.DateTime date)
        {
            var myJournalEntryDetail = new JournalEntryDetailsModel
            {
                Organization = orgCode,
                Event        = Event,
                Year         = year,
                Period       = period,
                Source       = source,
                EntryNumber  = entryNumber,
                Status       = status,
                Description  = description,
                GLAccount    = glAccount,
                Date         = date
            };

            return(APIUtil.AddJournalEntryDetail(USISDKClient, myJournalEntryDetail));
        }
Exemple #19
0
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">Organization Code</param>
        /// <param name="account">This should be a single account code</param>
        /// <param name="priceList">The price list code</param>
        /// <param name="billingCycle">This is the user-configurable Billing cycle code on the order, which is pulled from Order Cycle v20 window</param>
        /// <param name="periodCycle">This is the user-configurable Period cycle code on the order, which is pulled from Order Cycle v20 window</param>
        public MembershipOrdersModel Add(string orgCode, string account, string priceList, string billingCycle, string periodCycle)
        {
            var myMembershipOrder = new MembershipOrdersModel
            {
                OrganizationCode = orgCode,
                OrderStatus      = "A", //This is the user-configurable status code on the order
                Account          = account,
                MembershipStart  = System.DateTime.Now,
                MembershipEnd    = System.DateTime.Now,
                PriceList        = priceList,
                BillToAccount    = account, //This can be a different account code
                BillingDate      = System.DateTime.Now,
                BillingCycle     = billingCycle,
                PeriodCycle      = periodCycle,
            };

            return(APIUtil.AddMembershipOrder(USISDKClient, myMembershipOrder));
        }
        /// <summary>
        /// A basic add example
        /// </summary>
        /// <param name="orgCode">The organization code of the function seating chart.</param>
        /// <param name="chartName">Function chart description.</param>
        /// <param name="capacity">Function Chart capacity</param>
        /// <param name="eventId">Function Chart EventId, must be specified for which event and function the chart will apply to.</param>
        /// <param name="functionId">Function Chart FunctionId, must be specified for which event and function the chart will apply to.</param>
        /// <param name="fillMethod">Manual or Auto-Assign, Fill method. Manual = 2, Auto-Assign = 1.</param>
        /// <param name="groupCodeA">One of the group code descriptors to ghelp group tables in the grid.</param>
        /// <param name="inventoryCode">A unique code to help users search for the function seating chart.</param>
        public FunctionSeatingChartsModel Add(string orgCode, string chartName, int capacity,
                                              int eventId, int functionId, int fillMethod,
                                              string groupCodeA, string inventoryCode)
        {
            var myFunctionSeatingChart = new FunctionSeatingChartsModel
            {
                OrgCode       = orgCode,
                Description   = chartName,
                Capacity      = capacity,
                EventId       = eventId,
                FunctionId    = functionId,
                FillMethod    = fillMethod,
                GroupCodeA    = groupCodeA,
                InventoryCode = inventoryCode
            };

            return(APIUtil.AddFunctionSeatingChart(USISDKClient, myFunctionSeatingChart));
        }
 protected override void Awake()
 {
     base.Awake();
     this.lbName.text        = string.Empty;
     this.lbDescription.text = string.Empty;
     this.lbLastLogin.text   = string.Empty;
     this.lbCollection.text  = string.Empty;
     this.lbLink.text        = string.Empty;
     this.lbBlock.text       = StringMaster.GetString("Profile-01");
     this.lbVisit.text       = StringMaster.GetString("Profile-21");
     this.requestAPIs        = new Func <string, bool, APIRequestTask>[]
     {
         null,
         new Func <string, bool, APIRequestTask>(this.RequestFriendBreak),
         new Func <string, bool, APIRequestTask>(APIUtil.Instance().RequestFriendApplication),
         new Func <string, bool, APIRequestTask>(this.RequestFriendApplicationCancel),
         new Func <string, bool, APIRequestTask>(this.RequestFriendApplicationApprove)
     };
 }
Exemple #22
0
        /// <summary>
        /// This is how you copy a user
        /// </summary>
        /// <param name="SourceID">The User ID of the original User.</param>
        /// <param name="NewID">The chosen User ID of the new user.</param>
        /// <returns>A newly created UngerboeckSDKPackage.UsersModel</returns>
        public UsersModel CopyUser(string SourceID, string NewID)
        {
            var myUser = new UngerboeckSDKPackage.Copy.Users
            {
                ID                   = NewID,                 //Needs to be unique
                DisplayName          = "New User",            //The name of the new user
                LoginID              = NewID,                 //This does not need to be the same as the User ID above, but it needs to be a unique login ID
                Email                = "*****@*****.**", //Required
                CopyRoles            = "Y",                   //Y or N
                CopyAccessPrivileges = "Y",
                CopyMenus            = "Y",
                CopyOrganizations    = "Y",
                CopySettings         = "N"
            };

            //Note that the user won't be activated until they set their password.  You should send the activation email when ready.  See the SendActivateUserEmail() example.

            return(APIUtil.CopyUser(USISDKClient, SourceID, myUser));
        }
Exemple #23
0
        /// <summary>
        /// This is an example of how to move many orders at once
        /// </summary>
        /// <param name="orderNumber">OrderNumber is an array of integers for the various order numbers</param>
        /// <param name="newEventID">This is the destination event ID.  You can find this attached this to the Events window in Ungerboeck</param>
        /// <param name="functionID"></param>
        public IEnumerable <MoveOrdersBulkErrorsModel> MoveOrderBulk(string orgCode, int[] orderNumber, int newEventID, int functionID)
        {
            var myMoveBulkOrder = new MoveOrdersBulkModel
            {
                OrganizationCode   = orgCode,
                OrderNumber        = orderNumber,
                DestinationEventID = newEventID,
                Function           = functionID
            };

            //Note: Function and KeepDateTimes properties are not used for Registration Orders.

            IEnumerable <MoveOrdersBulkErrorsModel> results = APIUtil.MoveRegistrationOrdersBulk(USISDKClient, myMoveBulkOrder);

            //For bulk operations, 200 only signifies that the process successfully ran.  Individual items might have had issues saving.  Check the response object for bulk errors.
            //One or more errors with saving the items if an error object was returned.

            return(results);
        }
        /// <summary>
        /// A basic add example. Not all fields are included in this example as there are almost 60 fields including header and details.
        /// You can add fields as on requirements
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="configDescription">Description of the configuration header</param>
        /// <param name="configType">Type of the configuration</param>
        /// <param name="eventId">The event id of the event this configuration is associated with</param>
        /// <param name="registrationStartDate">Registration start date, should not be grater than end date. Configuration details table field associated with MM472_PARM_CODE = ER015</param>
        /// <param name="registrationEndDate">Registration start date, should not be less than start date. Configuration details table field associated with MM472_PARM_CODE = ER016</param>
        /// <param name="priceList">The price list code.  You can find this on the Price List window in Ungerboeck under the "Code" field (Database column CC715_PRICE_LIST). Configuration details table field associated with MM472_PARM_CODE = ER073</param>
        /// <param name="registrantType">This is the registrant type code, configured by the event's registration setup. Configuration details table field associated with MM472_PARM_CODE = ER043</param>
        /// <param name="orderStatus">Configuration details table field associated with MM472_PARM_CODE = ER006</param>
        /// <param name="allowNewAccountForAdditionalRegistrant">Set 'Y' if user can add new account for registrant.Configuration details table field associated with MM472_PARM_CODE = ER038</param>
        /// <param name="allowAddingNewAccountForGuest">Set 'Y' if user can add new guest account.Configuration details table field associated with MM472_PARM_CODE = ER182</param>
        /// <param name="allowSearchingAccountsContactsForRegistrant">Set 'Y' if you are allowing user registrant search functionality. Configuration details table field associated with MM472_PARM_CODE = ER170</param>
        /// <param name="searchAcross">Registrant searching criteria if allowing accounts/contacts search. Configuration details table field associated with MM472_PARM_CODE = ER194</param>
        /// <param name="enableHousing">Set 'Y' is you want to set Housing related configuration. Configuration details table field associated with MM472_PARM_CODE = ER027</param>
        /// <param name="showPropertyDetails">You can set only when housing is enable. Configuration details table field associated with MM472_PARM_CODE = ER031</param>
        /// <param name="propertyNoteClasses">You can set only when show property details in 'Y'. Configuration details table field associated with MM472_PARM_CODE = ER032</param>
        /// <param name="formTemplate">Form template id. Configuration details table field associated with MM472_PARM_CODE = ER112</param>
        /// <param name="exhibitorFormTemplate">Exhibitor form template id.</param>
        /// <returns></returns>
        public RegistrationConfigurationsModel Add(string orgCode,
                                                   string configDescription,
                                                   string configType,
                                                   int eventId,
                                                   DateTime registrationStartDate,
                                                   DateTime registrationEndDate,
                                                   string priceList,
                                                   string registrantType,
                                                   string orderStatus,
                                                   string allowNewAccountForAdditionalRegistrant,
                                                   string allowAddingNewAccountForGuest,
                                                   string allowSearchingAccountsContactsForRegistrant,
                                                   string searchAcross,
                                                   string enableHousing,
                                                   string showPropertyDetails,
                                                   string propertyNoteClasses,
                                                   int formTemplate,
                                                   string exhibitorFormTemplate)
        {
            RegistrationConfigurationsModel regConfig = new RegistrationConfigurationsModel()
            {
                OrganizationCode   = orgCode,
                ConfigurationType  = configType,
                Description        = configDescription,
                Event              = eventId,
                RegistrationStarts = registrationStartDate,
                RegistrationEnds   = registrationEndDate,
                PriceList          = priceList,
                RegistrantType     = registrantType,
                OrderStatus        = orderStatus,
                AllowNewAccountForAdditionalRegistrant      = allowNewAccountForAdditionalRegistrant,
                AllowAddingNewAccountForGuest               = allowAddingNewAccountForGuest,
                AllowSearchingAccountsContactsForRegistrant = allowSearchingAccountsContactsForRegistrant,
                SearchAcross          = searchAcross,
                EnableHousing         = enableHousing,
                ShowPropertyDetails   = showPropertyDetails,
                PropertyNoteClasses   = propertyNoteClasses,
                FormTemplate          = formTemplate,
                ExhibitorFormTemplate = exhibitorFormTemplate
            };

            return(APIUtil.AddRegistrationConfiguration(USISDKClient, regConfig));
        }
Exemple #25
0
        /// <summary>
        /// You can return User Fields while searching by requesting the fields on custom objects
        /// </summary>
        /// <param name="orgCode">Organization Code where the search will take place.  User fields are organization-based.</param>
        /// <returns>Accounts with a user field</returns>
        public IEnumerable <AllAccountsModel> ReturningUserFieldsDuringSearch(string orgCode)
        {
            SearchMetadataModel searchMetadata = null;

            //By using the $Select ability to make a custom return object, you can retrieve user fields on searching, with
            //minimal performance cost.

            //For account user fields, the format is [User field Class]|[User field Type]|[User field property name]
            //This will only work for active User Fields in your organization.

            //This will return Account User fields of Issue Class = C (event sales), Issue Type code = 04, and User Number 01 (AMT_01).  It will return accounts where the Account Rep code is 0002410
            List <string> returnedFields = new List <string> {
                "C|04|UserText01", "LastName"
            };

            IEnumerable <AllAccountsModel> accounts = APIUtil.GetSearchList <AllAccountsModel>(USISDKClient, ref searchMetadata, orgCode, "AccountRep eq '0002410'", "", 1000, 100000, returnedFields);

            return(accounts);
        }
Exemple #26
0
        public DocumentsModel EditAdvanced(string orgCode, string type, int sequenceNumber)
        {
            var myDocument = APIUtil.GetDocument(USISDKClient, orgCode, type, sequenceNumber);

            string strAccountCode = "FAKEACCT"; //Use an account code

            myDocument.Publish                = "N";
            myDocument.Status                 = "CI"; //Use CI or CO to denote Checked In or Checked Out, respectively
            myDocument.SentReceived           = "S";  //S or R to denote Sent or Received
            myDocument.Search                 = "TEST";
            myDocument.Sort                   = "1";
            myDocument.Category               = "CTL"; //Set the category code
            myDocument.Contact                = strAccountCode;
            myDocument.DocumentIsAccessibleTo = "O";   //Only Me = "O", Everyone = "E", Users With Roles = "U"

            //.Department = "*NONE,*WORK"  'If Publish is set to 'Y', you can send this in as a comma delimited list of department codes
            //.UsersAndRoles = "USER1,USER2" 'If DocumentIsAccessibleTo is set to U (Users With Roles), you are required to set this field to the User IDs or Role codes that have access to the document.

            return(APIUtil.UpdateDocument(USISDKClient, myDocument));
        }
Exemple #27
0
        public IHttpContext GetMatrizAdjacencia(IHttpContext context)
        {
            APIUtil.UpdateClientes(context);

            Cliente loCliente = APIUtil.ValidarCliente(context);

            if (context.WasRespondedTo)
            {
                return(context);
            }

            MultiKeyDictionary <Vertice, Vertice, int> loMatriz = APIUtil.GetMatrizAdjacencia(loCliente.Grafo);
            string lsHtml = APIUtil.GetMatrizHTML(loMatriz);

            context.Response.ContentType     = ContentType.HTML;
            context.Response.ContentEncoding = Encoding.UTF8;
            context.Response.SendResponse(lsHtml);

            return(context);
        }
Exemple #28
0
        /// <summary>
        /// This shows various ways you can edit Account user fields
        /// </summary>
        public AllAccountsModel EditWithUserFields(string orgCode, string accountCode)
        {
            var myAccount = APIUtil.GetAccount(USISDKClient, orgCode, accountCode);

            //To change userfields, search through the AccountUserFieldSets object on the account model.
            //Find the user field set that matches the designation and the Opportunity Type code.
            //Once it is found, you can change whatever user field you wish.
            if (myAccount.AccountUserFieldSets != null)
            {
                foreach (UserFields objAccountUserFields in myAccount.AccountUserFieldSets)
                {
                    if (objAccountUserFields.Header == UngerboeckSDKPackage.USISDKConstants.UserFieldHeaders.OrganizationAccountUserFields ||
                        objAccountUserFields.Header == UngerboeckSDKPackage.USISDKConstants.UserFieldHeaders.IndividualAccountUserFields)
                    {
                        //These are User fields that are set under the configuration window for each account designation
                        //The classes here are just examples.  All designations can be used.
                        if (objAccountUserFields.Class == UngerboeckSDKPackage.USISDKConstants.AccountDesignations.EventSales &&
                            objAccountUserFields.Type == "CK")
                        {
                            //In this case, this is checking for a User Field set of code "CK" that is configured under the Event Sales Configuration window as either
                            //an Individual default user field or an Organization default user field
                            objAccountUserFields.UserNumber02 = 7777; //Set the value for the user number 02 field (AMT_02)
                        }
                        else if (objAccountUserFields.Class == UngerboeckSDKPackage.USISDKConstants.AccountDesignations.Registration &&
                                 objAccountUserFields.Type == "04")
                        {
                            objAccountUserFields.UserDateTime01 = System.DateTime.Now.AddDays(1);
                            objAccountUserFields.UserDateTime02 = System.DateTime.Now.AddHours(3);
                            objAccountUserFields.UserText06     = "2332,2333"; //This is a multi-value user field.  For more than one selected value, insert commas between multiple codes.
                        }
                        else if (objAccountUserFields.Class == UngerboeckSDKPackage.USISDKConstants.AccountDesignations.PublicRelations &&
                                 objAccountUserFields.Type == "PT")
                        {
                            objAccountUserFields.UserText03 = "SDKValue";
                        }
                    }
                }
            }

            return(APIUtil.UpdateAccount(USISDKClient, myAccount));
        }
Exemple #29
0
        public MembershipOrdersModel EditAdvanced(string orgCode, int orderNumber)
        {
            var myMembershipOrder = APIUtil.GetMembershipOrder(USISDKClient, orgCode, orderNumber);

            string myAccount = "12345678"; //This represents an account code in Ungerboeck

            myMembershipOrder.BillToContact    = myAccount;
            myMembershipOrder.Contact          = myAccount;
            myMembershipOrder.RequesterAccount = myAccount;
            myMembershipOrder.RequesterContact = myAccount;
            myMembershipOrder.AccountRep       = myAccount;
            myMembershipOrder.OrderDate        = System.DateTime.Now;
            myMembershipOrder.Description      = "Test Description";
            myMembershipOrder.GLAccount        = myAccount;
            myMembershipOrder.Terms            = "TT"; //Code for Customer Terms
            myMembershipOrder.PONumber         = "Test";
            myMembershipOrder.Printed          = "Y";
            myMembershipOrder.Taxable          = "Y";

            return(APIUtil.UpdateMembershipOrder(USISDKClient, myMembershipOrder));
        }
Exemple #30
0
        /// <summary>
        /// This is shows how you perform a Function Check In on a registrant
        /// </summary>
        /// <param name="orgCode">Organization Code</param>
        /// <param name="checkInDateTime">Check-in date</param>
        /// <param name="checkInNote">Check-in note, can be empty</param>
        /// <param name="orderNumber">Registrant order number</param>
        /// <param name="eventId">Event number</param>
        /// <param name="functionId">Registrant function ID</param>
        /// <param name="regSequenceNbr">Order registrant sequnce number</param>
        /// <param name="regAcct">Order registrant account code</param>
        public FunctionCheckInsModel Add(string orgCode,
                                         DateTime checkInDateTime,
                                         string checkInNote,
                                         int orderNumber,
                                         int eventId,
                                         int functionId,
                                         int regSequenceNbr)
        {
            FunctionCheckInsModel functionCheckInModel = new FunctionCheckInsModel
            {
                OrganizationCode   = orgCode,
                CheckIn            = checkInDateTime,
                CheckInNote        = checkInNote,
                OrderNumber        = orderNumber,
                Event              = eventId,
                Function           = functionId,
                RegistrantSequence = regSequenceNbr
            };

            return(APIUtil.AddFunctionCheckIn(USISDKClient, functionCheckInModel));
        }