/// <summary> /// /// </summary> /// <returns></returns> DTO_WebOrderAccount createOrderAccountSection( UInt32 inCovers, // Covers string inMemberNumber, // Member Number string inMemberNamer, // Member Name List <string> inComments, // Comments DTO_WebOrderDelivery inDeliverySection, // Delivery Section DTO_WebOrderPayments inPaymentsSection, // Payments Section, List <DTO_WebOrderItem> inOrderItems) // Order Items { DTO_WebOrderAccount result = new DTO_WebOrderAccount(); //......................................... result.Covers = inCovers; result.MemberNumber = inMemberNumber; result.Name = inMemberNamer; result.Comments = inComments.ToArray(); result.Delivery = inDeliverySection; result.Payments = inPaymentsSection; result.OrderItems = inOrderItems.ToArray(); //......................................... return(result); }
/// <summary> /// /// </summary> void saveOrderAccountSection( string inOrderHandle, // Incomplete Order Handle UInt32 inCovers, // Covers string inMemberNumber, // Member Number string inMemberNamer, // Member Name List <string> inComments, // Comments DTO_WebOrderDelivery inDeliverySection, // Delivery Section DTO_WebOrderPayments inPaymentsSection, // Payments Section, List <DTO_WebOrderItem> inOrderItems) // Order Items { DTO_WebOrderAccount orderAccount = createOrderAccountSection( inCovers, // Covers inMemberNumber, // Member Number inMemberNamer, // Member Name inComments, // Comments inDeliverySection, // Delivery Section inPaymentsSection, // Payments Section, inOrderItems); // Order Items DTO_WebOrderResponse response = webmateClient_.SaveIncompleteOrderAccountSection( inOrderHandle, orderAccount); if (!response.Succesful) { throw new Exception(string.Format(@"{0}: {1}", response.Message, response.Description)); } }
/// <summary> /// /// </summary> /// <param name="inRecipient"></param> /// <param name="inStreetNo"></param> /// <param name="inStreetName"></param> /// <param name="inSuburb"></param> /// <param name="inCity"></param> /// <param name="inCountry"></param> /// <param name="inPhoneNo"></param> /// <returns></returns> public DTO_WebOrderDelivery CreateAccountDelivery( string inRecipient, string inStreetNo, string inStreetName, string inSuburb, string inCity, string inCountry, string inPhoneNo, string inNote) { DTO_WebOrderDelivery result = new DTO_WebOrderDelivery(); //...................................................... result.Recipient = inRecipient; result.StreetNo = inStreetNo; result.StreetName = inStreetName; result.Suburb = inSuburb; result.City = inCity; result.Country = inCountry; result.Phone = inPhoneNo; result.Note = inNote; //...................................................... return(result); }
/// <summary> /// /// </summary> /// <param name="inOrderHandle"></param> /// <param name="inCovers"></param> /// <param name="inMemberNumber"></param> /// <param name="inMemberNamer"></param> /// <param name="inComments"></param> /// <param name="inDeliverySection"></param> /// <param name="inPaymentsSection"></param> /// <param name="inOrderItems"></param> public void SaveAccountSection( string inOrderHandle, // Incomplete Order Handle UInt32 inCovers, // Covers string inMemberNumber, // Member Number string inMemberNamer, // Member Name List <string> inComments, // Comments DTO_WebOrderDelivery inDeliverySection, // Delivery Section DTO_WebOrderPayments inPaymentsSection, // Payments Section, List <DTO_WebOrderItem> inOrderItems) // Order Items { try { saveOrderAccountSection( inOrderHandle, inCovers, inMemberNumber, inMemberNamer, inComments, inDeliverySection, inPaymentsSection, inOrderItems); } catch (Exception exc) { errorMs_ = exc.Message; throw; } }
/// <summary> /// /// </summary> /// <param name="outOrderHandle"></param> /// <returns></returns> private void setWebOrderAccountSection(string outOrderHandle) { WebmateClientInterface webMate = WebmateClientInterface.Instance; DTO_WebOrderDelivery delivery = webMate.CreateAccountDelivery(RecipientTextBox.Text, StreetNumberTextBox.Text, StreetNameTextBox.Text, SuburbTextBox.Text, CityTextBox.Text, CountryTextBox.Text, PhoneNumberTextBox.Text); DTO_WebOrderPayments payments = webMate.CreateAccountPayments(PaymentRequiredCheckBox.Checked); webMate.SaveAccountSection(outOrderHandle, Convert.ToUInt32(CoversNumeric.Value), MemberNumberTextBox.Text, CustomerNameTextBox.Text, createComments(), delivery, payments, createItems()); }
/// <summary> /// /// </summary> /// <param name="outOrderHandle"></param> /// <returns></returns> private void setWebOrderAccountSection(string outOrderHandle) { WebmateClientInterface webMate = WebmateClientInterface.Instance; DTO_WebOrderDelivery delivery = webMate.CreateAccountDelivery(tbRecipient.Text, tbStreetNo.Text, tbStreetName.Text, tbSuburb.Text, tbCity.Text, tbCountry.Text, tbPhoneNo.Text, tbNote.Text); DTO_WebOrderPayments payments = webMate.CreateAccountPayments(cbPaymentRequired.Checked); webMate.SaveAccountSection(outOrderHandle, Convert.ToUInt32(numCovers.Value), tbMemberNumber.Text, tbCustomerName.Text, createComments(), delivery, payments, createItems()); }