Esempio n. 1
0
        /// <summary>
        /// Here's how to add a user field set with values to a new event
        /// </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>
        /// <param name="issueType">This is the Issue Type code of the registration user field set.  Example string value "CK"</param>
        /// <param name="userText05Value">This is just an example of the user fields you can set</param>
        public RegistrationOrdersModel AddWithUserFields(string orgCode, int Event, string orderStatus, string accountCode, string priceList, string registrants, string registrantType, string issueType, string userText05Value, List <RegistrationOrderItemsModel> orderItems)
        {
            //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
            };

            if (orderItems != null && orderItems.Count > 0)
            {
                myRegistrationOrder.RegistrationOrderItems = new List <RegistrationOrderItemsModel>();
                myRegistrationOrder.RegistrationOrderItems.AddRange(orderItems);
            }

            myRegistrationOrder.RegistrationOrderUserFieldSets = new List <UserFields>();
            var myUserField = new UngerboeckSDKPackage.UserFields();

            myUserField.Type       = issueType;                                  //Use the Opportunity Type code from your user field.  This matches the value stored in Ungerboeck table column CR073_ISSUE_TYPE.
            myUserField.UserText05 = userText05Value;                            //Set the value in the user field property
            myRegistrationOrder.RegistrationOrderUserFieldSets.Add(myUserField); //Then add it back into the RegistrationOrdersModel object.  You can add multiple user field sets to the same registration order object before saving.

            return(APIUtil.AddRegistrationOrder(USISDKClient, myRegistrationOrder));
        }
Esempio n. 2
0
        public EventsModel AddWithUserFields(string orgCode, string eventName, string accountCode, string issueType, string newTxt12Value)
        {
            var myEvent = new EventsModel
            {
                Organization = orgCode,
                Description  = eventName,
                Account      = accountCode,
                StartDate    = System.DateTime.Now,
                EndDate      = System.DateTime.Now,
            };

            //Here's how to add a user field set with values to a new event
            myEvent.EventUserFieldSets = new List <UngerboeckSDKPackage.UserFields>();
            UngerboeckSDKPackage.UserFields myUserField = new UngerboeckSDKPackage.UserFields();

            //Note that class is always EventSales (C) and is automatically set in Ungerboeck.
            myUserField.Type       = issueType;          //Use the Opportunity Type code from your user field.  This matches the value stored in Ungerboeck table column CR073_ISSUE_TYPE.
            myUserField.UserText12 = newTxt12Value;      //Set the value in the user field property
            myEvent.EventUserFieldSets.Add(myUserField); //Then add it back into the EventModel object.  You can add multiple user field sets to the same event object before saving.

            return(APIUtil.AddEvent(USISDKClient, myEvent));
        }
Esempio n. 3
0
        public FunctionsModel AddWithUserFields(string orgCode, int eventID, int functionID, string statusCode, string issueType, int newUserNumber03)
        {
            var myFunction = new FunctionsModel
            {
                OrganizationCode = orgCode,
                EventID          = eventID,
                StatusCode       = statusCode,
                StartDate        = System.DateTime.Now,
                EndDate          = System.DateTime.Now.AddDays(1)
            };

            //Here's how to add a user field set with values to a new function
            myFunction.FunctionUserFieldSets = new List <UngerboeckSDKPackage.UserFields>();
            UngerboeckSDKPackage.UserFields myUserField = new UngerboeckSDKPackage.UserFields();

            //Note that class is always EventSales (C) and is automatically set in Ungerboeck.
            myUserField.Type         = issueType;                                      //Use the Opportunity Type code from your user field.  This matches the value stored in Ungerboeck table column CR073_ISSUE_TYPE.
            myUserField.UserNumber03 = newUserNumber03;                                //Set the value in the user field property
            myFunction.FunctionUserFieldSets.Add(myUserField);                         //Then add it back into the EventModel object.  You can add multiple user field sets to the same event object before saving.

            return(APIUtil.InsertAfterFunction(USISDKClient, functionID, myFunction)); //You can also use APIUtil.InsertIndentedFunction()
        }
Esempio n. 4
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">This is the user-configurable status code on the order</param>
        /// <param name="accountCode">This should be a single account code</param>
        /// <param name="function">The event ID of the event attached to the order</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="issueType">This is the Issue Type code of the registration user field set.  Example string value "CK"</param>
        /// <param name="userText05Value">This is just an example of the user fields you can set</param>
        public ServiceOrdersModel AddWithUserFields(string orgCode, int Event, string orderStatus, string accountCode, int function, string billToAccount, string priceList, string issueType, int userNumber03Value)
        {
            var myServiceOrder = new ServiceOrdersModel
            {
                OrganizationCode = orgCode,
                Event            = Event,
                OrderStatus      = orderStatus,
                Account          = accountCode,
                Function         = function,
                BillToAccount    = billToAccount,
                PriceList        = priceList
            };

            myServiceOrder.ServiceOrderUserFieldSets = new List <UserFields>();
            var myUserField = new UngerboeckSDKPackage.UserFields();

            myUserField.Type         = issueType;                      //Use the Opportunity Type code from your user field.  This matches the value stored in Ungerboeck table column CR073_ISSUE_TYPE.
            myUserField.UserNumber03 = userNumber03Value;              //Set the value in the user field property
            myServiceOrder.ServiceOrderUserFieldSets.Add(myUserField); //Then add it back into the RegistrationOrdersModel object.  You can add multiple user field sets to the same registration order object before saving.

            return(APIUtil.AddServiceOrder(USISDKClient, myServiceOrder));
        }