/// <summary> /// Sets the ShippingSchedule Contact Numbers properties used to output the xCBL data /// </summary> /// <param name="contactNumber">The Contact Number text</param> /// <param name="shippingSchedule">The ShippingSchedule object that is set</param> /// <param name="contactNumberIndex">The index of the Contact Number item</param> public static void SetContactNumbers(this ShippingSchedule shippingSchedule, string contactNumber, int contactNumberIndex) { switch (contactNumberIndex) { case 0: shippingSchedule.ContactNumber_1 = contactNumber; break; case 1: shippingSchedule.ContactNumber_2 = contactNumber; break; case 2: shippingSchedule.ContactNumber_3 = contactNumber; break; case 3: shippingSchedule.ContactNumber_4 = contactNumber; break; case 4: shippingSchedule.ContactNumber_5 = contactNumber; break; case 5: shippingSchedule.ContactNumber_6 = contactNumber; break; default: break; } }
/// <summary> /// Sets the ShippingSchedule Other Schedule Reference properties used to output the xCBL data /// </summary> /// <param name="shippingSchedule">The Reference Description text to output</param> /// <param name="referenceTypeCodedOther">The ShippingSchedule object that is set</param> /// <param name="referenceDescription">The index of the Other Schedule Reference item</param> public static void SetOtherScheduleReferenceDesc(this ShippingSchedule shippingSchedule, string referenceTypeCodedOther, string referenceDescription) { string referenceTypeCoded = string.Format("Other_{0}", referenceTypeCodedOther).ToLower().Trim(); switch (referenceTypeCoded) { case "other_firststop": shippingSchedule.Other_FirstStop = referenceDescription; break; case "other_before7": shippingSchedule.Other_Before7 = referenceDescription; break; case "other_before9": shippingSchedule.Other_Before9 = referenceDescription; break; case "other_before12": shippingSchedule.Other_Before12 = referenceDescription; break; case "other_sameday": shippingSchedule.Other_SameDay = referenceDescription; break; case "other_homeowneroccupied": shippingSchedule.Other_OwnerOccupied = referenceDescription; break; case "other_workordernumber": shippingSchedule.WorkOrderNumber = referenceDescription; shippingSchedule.Other_7 = referenceDescription; break; case "other_ssid": shippingSchedule.SSID = referenceDescription; shippingSchedule.Other_8 = referenceDescription; break; case "other_7": shippingSchedule.Other_7 = referenceDescription; break; case "other_8": shippingSchedule.Other_8 = referenceDescription; break; case "other_9": shippingSchedule.Other_9 = referenceDescription; break; case "other_10": shippingSchedule.Other_10 = referenceDescription; break; default: break; } }