/// <summary>
 /// Create a new acc_ORDERS object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="orderNumber">Initial value of the OrderNumber property.</param>
 /// <param name="invoiceNumber">Initial value of the InvoiceNumber property.</param>
 /// <param name="invoiceDate">Initial value of the InvoiceDate property.</param>
 /// <param name="invoiceCopy">Initial value of the InvoiceCopy property.</param>
 /// <param name="jewelrySize">Initial value of the JewelrySize property.</param>
 /// <param name="clubOrder">Initial value of the ClubOrder property.</param>
 /// <param name="orderdate">Initial value of the orderdate property.</param>
 /// <param name="user_id">Initial value of the user_id property.</param>
 /// <param name="packaging_id">Initial value of the packaging_id property.</param>
 /// <param name="payment_id">Initial value of the payment_id property.</param>
 /// <param name="shipping_id">Initial value of the shipping_id property.</param>
 /// <param name="shipping_tracking_no">Initial value of the shipping_tracking_no property.</param>
 /// <param name="amnt_items">Initial value of the amnt_items property.</param>
 /// <param name="amnt_shipping">Initial value of the amnt_shipping property.</param>
 /// <param name="amnt_wrapping">Initial value of the amnt_wrapping property.</param>
 /// <param name="amnt_labor">Initial value of the amnt_labor property.</param>
 /// <param name="amnt_extracharges">Initial value of the amnt_extracharges property.</param>
 /// <param name="amnt_vat">Initial value of the amnt_vat property.</param>
 /// <param name="amnt_subtotal">Initial value of the amnt_subtotal property.</param>
 /// <param name="amnt_discount">Initial value of the amnt_discount property.</param>
 /// <param name="amnt_grandtotal">Initial value of the amnt_grandtotal property.</param>
 /// <param name="adrs_billing_firstname">Initial value of the adrs_billing_firstname property.</param>
 /// <param name="adrs_billing_lastname">Initial value of the adrs_billing_lastname property.</param>
 /// <param name="adrs_billing_street">Initial value of the adrs_billing_street property.</param>
 /// <param name="adrs_billing_city">Initial value of the adrs_billing_city property.</param>
 /// <param name="adrs_billing_zip">Initial value of the adrs_billing_zip property.</param>
 /// <param name="adrs_billing_state_id">Initial value of the adrs_billing_state_id property.</param>
 /// <param name="adrs_billing_country_id">Initial value of the adrs_billing_country_id property.</param>
 /// <param name="adrs_billing_phone">Initial value of the adrs_billing_phone property.</param>
 /// <param name="adrs_delivery_firstname">Initial value of the adrs_delivery_firstname property.</param>
 /// <param name="adrs_delivery_lastname">Initial value of the adrs_delivery_lastname property.</param>
 /// <param name="adrs_delivery_street">Initial value of the adrs_delivery_street property.</param>
 /// <param name="adrs_delivery_city">Initial value of the adrs_delivery_city property.</param>
 /// <param name="adrs_delivery_zip">Initial value of the adrs_delivery_zip property.</param>
 /// <param name="adrs_delivery_state_id">Initial value of the adrs_delivery_state_id property.</param>
 /// <param name="adrs_delivery_country_id">Initial value of the adrs_delivery_country_id property.</param>
 /// <param name="adrs_delivery_phone">Initial value of the adrs_delivery_phone property.</param>
 /// <param name="cannot_be_edited">Initial value of the cannot_be_edited property.</param>
 /// <param name="sts1_new_order_received">Initial value of the sts1_new_order_received property.</param>
 /// <param name="sts1_new_order_received_viewed">Initial value of the sts1_new_order_received_viewed property.</param>
 /// <param name="sts1_new_order_received_date">Initial value of the sts1_new_order_received_date property.</param>
 /// <param name="sts2_waiting_for_authorization">Initial value of the sts2_waiting_for_authorization property.</param>
 /// <param name="sts2_waiting_for_authorization_viewed">Initial value of the sts2_waiting_for_authorization_viewed property.</param>
 /// <param name="sts2_waiting_for_authorization_date">Initial value of the sts2_waiting_for_authorization_date property.</param>
 /// <param name="sts2_waiting_for_authorization_note">Initial value of the sts2_waiting_for_authorization_note property.</param>
 /// <param name="sts3_waiting_for_payment">Initial value of the sts3_waiting_for_payment property.</param>
 /// <param name="sts3_waiting_for_payment_viewed">Initial value of the sts3_waiting_for_payment_viewed property.</param>
 /// <param name="sts3_waiting_for_payment_date">Initial value of the sts3_waiting_for_payment_date property.</param>
 /// <param name="sts3_waiting_for_payment_note">Initial value of the sts3_waiting_for_payment_note property.</param>
 /// <param name="sts4_order_confirmed">Initial value of the sts4_order_confirmed property.</param>
 /// <param name="sts4_order_confirmed_viewed">Initial value of the sts4_order_confirmed_viewed property.</param>
 /// <param name="sts4_order_confirmed_date">Initial value of the sts4_order_confirmed_date property.</param>
 /// <param name="sts4_order_confirmed_note">Initial value of the sts4_order_confirmed_note property.</param>
 /// <param name="sts5_partial_order_confirmed">Initial value of the sts5_partial_order_confirmed property.</param>
 /// <param name="sts5_partial_order_confirmed_viewed">Initial value of the sts5_partial_order_confirmed_viewed property.</param>
 /// <param name="sts5_partial_order_confirmed_date">Initial value of the sts5_partial_order_confirmed_date property.</param>
 /// <param name="sts5_partial_order_confirmed_note">Initial value of the sts5_partial_order_confirmed_note property.</param>
 /// <param name="sts6_order_failed">Initial value of the sts6_order_failed property.</param>
 /// <param name="sts6_order_failed_viewed">Initial value of the sts6_order_failed_viewed property.</param>
 /// <param name="sts6_order_failed_date">Initial value of the sts6_order_failed_date property.</param>
 /// <param name="sts6_order_failed_note">Initial value of the sts6_order_failed_note property.</param>
 /// <param name="sts7_order_waiting_to_be_send">Initial value of the sts7_order_waiting_to_be_send property.</param>
 /// <param name="sts7_order_waiting_to_be_send_viewed">Initial value of the sts7_order_waiting_to_be_send_viewed property.</param>
 /// <param name="sts7_order_waiting_to_be_send_date">Initial value of the sts7_order_waiting_to_be_send_date property.</param>
 /// <param name="sts7_order_waiting_to_be_send_note">Initial value of the sts7_order_waiting_to_be_send_note property.</param>
 /// <param name="sts8_order_send">Initial value of the sts8_order_send property.</param>
 /// <param name="sts8_order_send_viewed">Initial value of the sts8_order_send_viewed property.</param>
 /// <param name="sts8_order_send_date">Initial value of the sts8_order_send_date property.</param>
 /// <param name="sts8_order_send_note">Initial value of the sts8_order_send_note property.</param>
 /// <param name="sts9_partial_order_send">Initial value of the sts9_partial_order_send property.</param>
 /// <param name="sts9_partial_order_send_viewed">Initial value of the sts9_partial_order_send_viewed property.</param>
 /// <param name="sts9_partial_order_send_date">Initial value of the sts9_partial_order_send_date property.</param>
 /// <param name="sts9_partial_order_send_note">Initial value of the sts9_partial_order_send_note property.</param>
 /// <param name="sts10_order_received_by_customer">Initial value of the sts10_order_received_by_customer property.</param>
 /// <param name="sts10_order_received_by_customer_viewed">Initial value of the sts10_order_received_by_customer_viewed property.</param>
 /// <param name="sts10_order_received_by_customer_date">Initial value of the sts10_order_received_by_customer_date property.</param>
 /// <param name="sts10_order_received_by_customer_note">Initial value of the sts10_order_received_by_customer_note property.</param>
 /// <param name="sts11_partial_order_received_by_customer">Initial value of the sts11_partial_order_received_by_customer property.</param>
 /// <param name="sts11_partial_order_received_by_customer_viewed">Initial value of the sts11_partial_order_received_by_customer_viewed property.</param>
 /// <param name="sts11_partial_order_received_by_customer_date">Initial value of the sts11_partial_order_received_by_customer_date property.</param>
 /// <param name="sts11_partial_order_received_by_customer_note">Initial value of the sts11_partial_order_received_by_customer_note property.</param>
 /// <param name="sts12_customer_returning_order">Initial value of the sts12_customer_returning_order property.</param>
 /// <param name="sts12_customer_returning_order_viewed">Initial value of the sts12_customer_returning_order_viewed property.</param>
 /// <param name="sts12_customer_returning_order_date">Initial value of the sts12_customer_returning_order_date property.</param>
 /// <param name="sts12_customer_returning_order_note">Initial value of the sts12_customer_returning_order_note property.</param>
 /// <param name="sts13_customer_returning_part_order">Initial value of the sts13_customer_returning_part_order property.</param>
 /// <param name="sts13_customer_returning_part_order_viewed">Initial value of the sts13_customer_returning_part_order_viewed property.</param>
 /// <param name="sts13_customer_returning_part_order_date">Initial value of the sts13_customer_returning_part_order_date property.</param>
 /// <param name="sts13_customer_returning_part_order_note">Initial value of the sts13_customer_returning_part_order_note property.</param>
 /// <param name="sts14_customer_refunded">Initial value of the sts14_customer_refunded property.</param>
 /// <param name="sts14_customer_refunded_viewed">Initial value of the sts14_customer_refunded_viewed property.</param>
 /// <param name="sts14_customer_refunded_date">Initial value of the sts14_customer_refunded_date property.</param>
 /// <param name="sts14_customer_refunded_note">Initial value of the sts14_customer_refunded_note property.</param>
 /// <param name="sts15_customer_partly_refunded">Initial value of the sts15_customer_partly_refunded property.</param>
 /// <param name="sts15_customer_partly_refunded_viewed">Initial value of the sts15_customer_partly_refunded_viewed property.</param>
 /// <param name="sts15_customer_partly_refunded_date">Initial value of the sts15_customer_partly_refunded_date property.</param>
 /// <param name="sts15_customer_partly_refunded_note">Initial value of the sts15_customer_partly_refunded_note property.</param>
 /// <param name="sts16_order_closed">Initial value of the sts16_order_closed property.</param>
 /// <param name="sts16_order_closed_viewed">Initial value of the sts16_order_closed_viewed property.</param>
 /// <param name="sts16_order_closed_date">Initial value of the sts16_order_closed_date property.</param>
 /// <param name="sts16_order_closed_note">Initial value of the sts16_order_closed_note property.</param>
 /// <param name="sts17_order_cancelled">Initial value of the sts17_order_cancelled property.</param>
 /// <param name="sts17_order_cancelled_viewed">Initial value of the sts17_order_cancelled_viewed property.</param>
 /// <param name="sts17_order_cancelled_date">Initial value of the sts17_order_cancelled_date property.</param>
 /// <param name="sts17_order_cancelled_note">Initial value of the sts17_order_cancelled_note property.</param>
 /// <param name="sts_curr_stat">Initial value of the sts_curr_stat property.</param>
 /// <param name="sts_curr_date">Initial value of the sts_curr_date property.</param>
 /// <param name="orderDeleted">Initial value of the OrderDeleted property.</param>
 /// <param name="interest_start_date">Initial value of the Interest_start_date property.</param>
 /// <param name="interest_percent">Initial value of the Interest_percent property.</param>
 /// <param name="merchant_Notes">Initial value of the Merchant_Notes property.</param>
 /// <param name="customer_Notes">Initial value of the Customer_Notes property.</param>
 /// <param name="lastModify_Date">Initial value of the LastModify_Date property.</param>
 /// <param name="lastModify_User">Initial value of the LastModify_User property.</param>
 /// <param name="lastModify_User_Id">Initial value of the LastModify_User_Id property.</param>
 /// <param name="campaign">Initial value of the campaign property.</param>
 /// <param name="affiliate">Initial value of the affiliate property.</param>
 /// <param name="referrer">Initial value of the referrer property.</param>
 /// <param name="remote_ip">Initial value of the remote_ip property.</param>
 /// <param name="order_transacted">Initial value of the order_transacted property.</param>
 /// <param name="order_currency">Initial value of the order_currency property.</param>
 /// <param name="order_currency_rate">Initial value of the order_currency_rate property.</param>
 /// <param name="hear_fromus">Initial value of the hear_fromus property.</param>
 /// <param name="include_receipt">Initial value of the include_receipt property.</param>
 public static acc_ORDERS Createacc_ORDERS(global::System.Int32 id, global::System.Int32 orderNumber, global::System.Int32 invoiceNumber, global::System.DateTime invoiceDate, global::System.Boolean invoiceCopy, global::System.String jewelrySize, global::System.Boolean clubOrder, global::System.DateTime orderdate, global::System.Int32 user_id, global::System.Int32 packaging_id, global::System.Int32 payment_id, global::System.Int32 shipping_id, global::System.String shipping_tracking_no, global::System.Decimal amnt_items, global::System.Decimal amnt_shipping, global::System.Decimal amnt_wrapping, global::System.Decimal amnt_labor, global::System.Decimal amnt_extracharges, global::System.Decimal amnt_vat, global::System.Decimal amnt_subtotal, global::System.Decimal amnt_discount, global::System.Decimal amnt_grandtotal, global::System.String adrs_billing_firstname, global::System.String adrs_billing_lastname, global::System.String adrs_billing_street, global::System.String adrs_billing_city, global::System.String adrs_billing_zip, global::System.Int32 adrs_billing_state_id, global::System.Int32 adrs_billing_country_id, global::System.String adrs_billing_phone, global::System.String adrs_delivery_firstname, global::System.String adrs_delivery_lastname, global::System.String adrs_delivery_street, global::System.String adrs_delivery_city, global::System.String adrs_delivery_zip, global::System.Int32 adrs_delivery_state_id, global::System.Int32 adrs_delivery_country_id, global::System.String adrs_delivery_phone, global::System.Boolean cannot_be_edited, global::System.Boolean sts1_new_order_received, global::System.Boolean sts1_new_order_received_viewed, global::System.DateTime sts1_new_order_received_date, global::System.Boolean sts2_waiting_for_authorization, global::System.Boolean sts2_waiting_for_authorization_viewed, global::System.DateTime sts2_waiting_for_authorization_date, global::System.String sts2_waiting_for_authorization_note, global::System.Boolean sts3_waiting_for_payment, global::System.Boolean sts3_waiting_for_payment_viewed, global::System.DateTime sts3_waiting_for_payment_date, global::System.String sts3_waiting_for_payment_note, global::System.Boolean sts4_order_confirmed, global::System.Boolean sts4_order_confirmed_viewed, global::System.DateTime sts4_order_confirmed_date, global::System.String sts4_order_confirmed_note, global::System.Boolean sts5_partial_order_confirmed, global::System.Boolean sts5_partial_order_confirmed_viewed, global::System.DateTime sts5_partial_order_confirmed_date, global::System.String sts5_partial_order_confirmed_note, global::System.Boolean sts6_order_failed, global::System.Boolean sts6_order_failed_viewed, global::System.DateTime sts6_order_failed_date, global::System.String sts6_order_failed_note, global::System.Boolean sts7_order_waiting_to_be_send, global::System.Boolean sts7_order_waiting_to_be_send_viewed, global::System.DateTime sts7_order_waiting_to_be_send_date, global::System.String sts7_order_waiting_to_be_send_note, global::System.Boolean sts8_order_send, global::System.Boolean sts8_order_send_viewed, global::System.DateTime sts8_order_send_date, global::System.String sts8_order_send_note, global::System.Boolean sts9_partial_order_send, global::System.Boolean sts9_partial_order_send_viewed, global::System.DateTime sts9_partial_order_send_date, global::System.String sts9_partial_order_send_note, global::System.Boolean sts10_order_received_by_customer, global::System.Boolean sts10_order_received_by_customer_viewed, global::System.DateTime sts10_order_received_by_customer_date, global::System.String sts10_order_received_by_customer_note, global::System.Boolean sts11_partial_order_received_by_customer, global::System.Boolean sts11_partial_order_received_by_customer_viewed, global::System.DateTime sts11_partial_order_received_by_customer_date, global::System.String sts11_partial_order_received_by_customer_note, global::System.Boolean sts12_customer_returning_order, global::System.Boolean sts12_customer_returning_order_viewed, global::System.DateTime sts12_customer_returning_order_date, global::System.String sts12_customer_returning_order_note, global::System.Boolean sts13_customer_returning_part_order, global::System.Boolean sts13_customer_returning_part_order_viewed, global::System.DateTime sts13_customer_returning_part_order_date, global::System.String sts13_customer_returning_part_order_note, global::System.Boolean sts14_customer_refunded, global::System.Boolean sts14_customer_refunded_viewed, global::System.DateTime sts14_customer_refunded_date, global::System.String sts14_customer_refunded_note, global::System.Boolean sts15_customer_partly_refunded, global::System.Boolean sts15_customer_partly_refunded_viewed, global::System.DateTime sts15_customer_partly_refunded_date, global::System.String sts15_customer_partly_refunded_note, global::System.Boolean sts16_order_closed, global::System.Boolean sts16_order_closed_viewed, global::System.DateTime sts16_order_closed_date, global::System.String sts16_order_closed_note, global::System.Boolean sts17_order_cancelled, global::System.Boolean sts17_order_cancelled_viewed, global::System.DateTime sts17_order_cancelled_date, global::System.String sts17_order_cancelled_note, global::System.String sts_curr_stat, global::System.DateTime sts_curr_date, global::System.Boolean orderDeleted, global::System.DateTime interest_start_date, global::System.Decimal interest_percent, global::System.String merchant_Notes, global::System.String customer_Notes, global::System.DateTime lastModify_Date, global::System.String lastModify_User, global::System.Int32 lastModify_User_Id, global::System.String campaign, global::System.String affiliate, global::System.String referrer, global::System.String remote_ip, global::System.Boolean order_transacted, global::System.String order_currency, global::System.Decimal order_currency_rate, global::System.String hear_fromus, global::System.Boolean include_receipt)
 {
     acc_ORDERS acc_ORDERS = new acc_ORDERS();
     acc_ORDERS.id = id;
     acc_ORDERS.OrderNumber = orderNumber;
     acc_ORDERS.InvoiceNumber = invoiceNumber;
     acc_ORDERS.InvoiceDate = invoiceDate;
     acc_ORDERS.InvoiceCopy = invoiceCopy;
     acc_ORDERS.JewelrySize = jewelrySize;
     acc_ORDERS.ClubOrder = clubOrder;
     acc_ORDERS.orderdate = orderdate;
     acc_ORDERS.user_id = user_id;
     acc_ORDERS.packaging_id = packaging_id;
     acc_ORDERS.payment_id = payment_id;
     acc_ORDERS.shipping_id = shipping_id;
     acc_ORDERS.shipping_tracking_no = shipping_tracking_no;
     acc_ORDERS.amnt_items = amnt_items;
     acc_ORDERS.amnt_shipping = amnt_shipping;
     acc_ORDERS.amnt_wrapping = amnt_wrapping;
     acc_ORDERS.amnt_labor = amnt_labor;
     acc_ORDERS.amnt_extracharges = amnt_extracharges;
     acc_ORDERS.amnt_vat = amnt_vat;
     acc_ORDERS.amnt_subtotal = amnt_subtotal;
     acc_ORDERS.amnt_discount = amnt_discount;
     acc_ORDERS.amnt_grandtotal = amnt_grandtotal;
     acc_ORDERS.adrs_billing_firstname = adrs_billing_firstname;
     acc_ORDERS.adrs_billing_lastname = adrs_billing_lastname;
     acc_ORDERS.adrs_billing_street = adrs_billing_street;
     acc_ORDERS.adrs_billing_city = adrs_billing_city;
     acc_ORDERS.adrs_billing_zip = adrs_billing_zip;
     acc_ORDERS.adrs_billing_state_id = adrs_billing_state_id;
     acc_ORDERS.adrs_billing_country_id = adrs_billing_country_id;
     acc_ORDERS.adrs_billing_phone = adrs_billing_phone;
     acc_ORDERS.adrs_delivery_firstname = adrs_delivery_firstname;
     acc_ORDERS.adrs_delivery_lastname = adrs_delivery_lastname;
     acc_ORDERS.adrs_delivery_street = adrs_delivery_street;
     acc_ORDERS.adrs_delivery_city = adrs_delivery_city;
     acc_ORDERS.adrs_delivery_zip = adrs_delivery_zip;
     acc_ORDERS.adrs_delivery_state_id = adrs_delivery_state_id;
     acc_ORDERS.adrs_delivery_country_id = adrs_delivery_country_id;
     acc_ORDERS.adrs_delivery_phone = adrs_delivery_phone;
     acc_ORDERS.cannot_be_edited = cannot_be_edited;
     acc_ORDERS.sts1_new_order_received = sts1_new_order_received;
     acc_ORDERS.sts1_new_order_received_viewed = sts1_new_order_received_viewed;
     acc_ORDERS.sts1_new_order_received_date = sts1_new_order_received_date;
     acc_ORDERS.sts2_waiting_for_authorization = sts2_waiting_for_authorization;
     acc_ORDERS.sts2_waiting_for_authorization_viewed = sts2_waiting_for_authorization_viewed;
     acc_ORDERS.sts2_waiting_for_authorization_date = sts2_waiting_for_authorization_date;
     acc_ORDERS.sts2_waiting_for_authorization_note = sts2_waiting_for_authorization_note;
     acc_ORDERS.sts3_waiting_for_payment = sts3_waiting_for_payment;
     acc_ORDERS.sts3_waiting_for_payment_viewed = sts3_waiting_for_payment_viewed;
     acc_ORDERS.sts3_waiting_for_payment_date = sts3_waiting_for_payment_date;
     acc_ORDERS.sts3_waiting_for_payment_note = sts3_waiting_for_payment_note;
     acc_ORDERS.sts4_order_confirmed = sts4_order_confirmed;
     acc_ORDERS.sts4_order_confirmed_viewed = sts4_order_confirmed_viewed;
     acc_ORDERS.sts4_order_confirmed_date = sts4_order_confirmed_date;
     acc_ORDERS.sts4_order_confirmed_note = sts4_order_confirmed_note;
     acc_ORDERS.sts5_partial_order_confirmed = sts5_partial_order_confirmed;
     acc_ORDERS.sts5_partial_order_confirmed_viewed = sts5_partial_order_confirmed_viewed;
     acc_ORDERS.sts5_partial_order_confirmed_date = sts5_partial_order_confirmed_date;
     acc_ORDERS.sts5_partial_order_confirmed_note = sts5_partial_order_confirmed_note;
     acc_ORDERS.sts6_order_failed = sts6_order_failed;
     acc_ORDERS.sts6_order_failed_viewed = sts6_order_failed_viewed;
     acc_ORDERS.sts6_order_failed_date = sts6_order_failed_date;
     acc_ORDERS.sts6_order_failed_note = sts6_order_failed_note;
     acc_ORDERS.sts7_order_waiting_to_be_send = sts7_order_waiting_to_be_send;
     acc_ORDERS.sts7_order_waiting_to_be_send_viewed = sts7_order_waiting_to_be_send_viewed;
     acc_ORDERS.sts7_order_waiting_to_be_send_date = sts7_order_waiting_to_be_send_date;
     acc_ORDERS.sts7_order_waiting_to_be_send_note = sts7_order_waiting_to_be_send_note;
     acc_ORDERS.sts8_order_send = sts8_order_send;
     acc_ORDERS.sts8_order_send_viewed = sts8_order_send_viewed;
     acc_ORDERS.sts8_order_send_date = sts8_order_send_date;
     acc_ORDERS.sts8_order_send_note = sts8_order_send_note;
     acc_ORDERS.sts9_partial_order_send = sts9_partial_order_send;
     acc_ORDERS.sts9_partial_order_send_viewed = sts9_partial_order_send_viewed;
     acc_ORDERS.sts9_partial_order_send_date = sts9_partial_order_send_date;
     acc_ORDERS.sts9_partial_order_send_note = sts9_partial_order_send_note;
     acc_ORDERS.sts10_order_received_by_customer = sts10_order_received_by_customer;
     acc_ORDERS.sts10_order_received_by_customer_viewed = sts10_order_received_by_customer_viewed;
     acc_ORDERS.sts10_order_received_by_customer_date = sts10_order_received_by_customer_date;
     acc_ORDERS.sts10_order_received_by_customer_note = sts10_order_received_by_customer_note;
     acc_ORDERS.sts11_partial_order_received_by_customer = sts11_partial_order_received_by_customer;
     acc_ORDERS.sts11_partial_order_received_by_customer_viewed = sts11_partial_order_received_by_customer_viewed;
     acc_ORDERS.sts11_partial_order_received_by_customer_date = sts11_partial_order_received_by_customer_date;
     acc_ORDERS.sts11_partial_order_received_by_customer_note = sts11_partial_order_received_by_customer_note;
     acc_ORDERS.sts12_customer_returning_order = sts12_customer_returning_order;
     acc_ORDERS.sts12_customer_returning_order_viewed = sts12_customer_returning_order_viewed;
     acc_ORDERS.sts12_customer_returning_order_date = sts12_customer_returning_order_date;
     acc_ORDERS.sts12_customer_returning_order_note = sts12_customer_returning_order_note;
     acc_ORDERS.sts13_customer_returning_part_order = sts13_customer_returning_part_order;
     acc_ORDERS.sts13_customer_returning_part_order_viewed = sts13_customer_returning_part_order_viewed;
     acc_ORDERS.sts13_customer_returning_part_order_date = sts13_customer_returning_part_order_date;
     acc_ORDERS.sts13_customer_returning_part_order_note = sts13_customer_returning_part_order_note;
     acc_ORDERS.sts14_customer_refunded = sts14_customer_refunded;
     acc_ORDERS.sts14_customer_refunded_viewed = sts14_customer_refunded_viewed;
     acc_ORDERS.sts14_customer_refunded_date = sts14_customer_refunded_date;
     acc_ORDERS.sts14_customer_refunded_note = sts14_customer_refunded_note;
     acc_ORDERS.sts15_customer_partly_refunded = sts15_customer_partly_refunded;
     acc_ORDERS.sts15_customer_partly_refunded_viewed = sts15_customer_partly_refunded_viewed;
     acc_ORDERS.sts15_customer_partly_refunded_date = sts15_customer_partly_refunded_date;
     acc_ORDERS.sts15_customer_partly_refunded_note = sts15_customer_partly_refunded_note;
     acc_ORDERS.sts16_order_closed = sts16_order_closed;
     acc_ORDERS.sts16_order_closed_viewed = sts16_order_closed_viewed;
     acc_ORDERS.sts16_order_closed_date = sts16_order_closed_date;
     acc_ORDERS.sts16_order_closed_note = sts16_order_closed_note;
     acc_ORDERS.sts17_order_cancelled = sts17_order_cancelled;
     acc_ORDERS.sts17_order_cancelled_viewed = sts17_order_cancelled_viewed;
     acc_ORDERS.sts17_order_cancelled_date = sts17_order_cancelled_date;
     acc_ORDERS.sts17_order_cancelled_note = sts17_order_cancelled_note;
     acc_ORDERS.sts_curr_stat = sts_curr_stat;
     acc_ORDERS.sts_curr_date = sts_curr_date;
     acc_ORDERS.OrderDeleted = orderDeleted;
     acc_ORDERS.Interest_start_date = interest_start_date;
     acc_ORDERS.Interest_percent = interest_percent;
     acc_ORDERS.Merchant_Notes = merchant_Notes;
     acc_ORDERS.Customer_Notes = customer_Notes;
     acc_ORDERS.LastModify_Date = lastModify_Date;
     acc_ORDERS.LastModify_User = lastModify_User;
     acc_ORDERS.LastModify_User_Id = lastModify_User_Id;
     acc_ORDERS.campaign = campaign;
     acc_ORDERS.affiliate = affiliate;
     acc_ORDERS.referrer = referrer;
     acc_ORDERS.remote_ip = remote_ip;
     acc_ORDERS.order_transacted = order_transacted;
     acc_ORDERS.order_currency = order_currency;
     acc_ORDERS.order_currency_rate = order_currency_rate;
     acc_ORDERS.hear_fromus = hear_fromus;
     acc_ORDERS.include_receipt = include_receipt;
     return acc_ORDERS;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the acc_ORDERS EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToacc_ORDERS(acc_ORDERS acc_ORDERS)
 {
     base.AddObject("acc_ORDERS", acc_ORDERS);
 }
Example #3
0
        public int Save(Order orderdto)
        {
            using (var db = new JONEntities())
            {

                var totalPrice = orderdto.TotalPrice;

                var customer = mapper.Map<Order, usr_CUSTOMERS>(orderdto);

                if (CustomerExists(customer.email))
                {

                    var customerExists = CustomerFromEmail(orderdto.Email);
                    customer.password = customerExists.password;
                    customer.id = customerExists.id;
                    db.usr_CUSTOMERS.Attach(customer);
                    db.ObjectStateManager.ChangeObjectState(customer, EntityState.Modified);
                }
                else
                {
                    customer.password = Guid.NewGuid().ToString().Substring(0, 8);
                    db.usr_CUSTOMERS.AddObject(customer);
                }

                // ObjectSet<acc_ORDERS> orderset = new ObjectSet<acc_ORDERS>();

                var nextOrderNumber = db.acc_ORDERS.Count() + 1;

                var order = new acc_ORDERS
                                       {
                                           user_id = customer.id,
                                           OrderNumber = nextOrderNumber+10000,
                                           orderdate = DateTime.Now,
                                           campaign = "notset",
                                           affiliate = "notset",
                                           referrer = "notset",
                                           remote_ip = "notset",
                                           order_transacted = true,
                                           InvoiceNumber = 1,
                                           InvoiceCopy = true,
                                           InvoiceDate = DateTime.Now,
                                           JewelrySize = "",
                                           ClubOrder = false,
                                           packaging_id = 1,
                                           payment_id = orderdto.PaymentID,
                                           shipping_id = 1,
                                           shipping_tracking_no = "",
                                           amnt_discount = 0,
                                           amnt_extracharges = 0,
                                           amnt_grandtotal = totalPrice,
                                           amnt_items = totalPrice,
                                           amnt_labor = 0,
                                           amnt_shipping = 0,
                                           amnt_subtotal = totalPrice,
                                           amnt_vat = 0,
                                           amnt_wrapping = 0,
                                           adrs_billing_firstname =
                                               orderdto.BillingAddress.FirstName,
                                           adrs_billing_lastname =   orderdto.BillingAddress.LastName,
                                           adrs_billing_city = orderdto.BillingAddress.City,
                                           adrs_billing_phone = orderdto.BillingAddress.Phone,
                                           adrs_billing_state_id = orderdto.BillingAddress.StateID,
                                           adrs_billing_street =
                                               orderdto.BillingAddress.Address1,
                                           adrs_billing_zip = orderdto.BillingAddress.ZipCode,
                                           adrs_delivery_country_id = orderdto.ShippingAddress.CountryID,
                                           adrs_delivery_firstname =
                                               orderdto.ShippingAddress.FirstName,
                                           adrs_delivery_lastname=    orderdto.ShippingAddress.LastName,
                                           adrs_delivery_city = orderdto.ShippingAddress.City,
                                           adrs_delivery_phone = orderdto.ShippingAddress.Phone,
                                           adrs_delivery_state_id = orderdto.ShippingAddress.StateID,
                                           adrs_delivery_street =
                                               orderdto.ShippingAddress.Address1,
                                           adrs_delivery_zip = orderdto.ShippingAddress.ZipCode,
                                           adrs_billing_country_id = orderdto.BillingAddress.CountryID,
                                           cannot_be_edited = false,
                                           OrderDeleted = false,
                                           Customer_Notes = orderdto.Comment ?? String.Empty,
                                           sts1_new_order_received = true,
                                           sts1_new_order_received_date = DateTime.Now,
                                           sts1_new_order_received_viewed = false,
                                           sts2_waiting_for_authorization = false,
                                           sts2_waiting_for_authorization_date = DateTime.Now,
                                           sts2_waiting_for_authorization_note = "",
                                           sts2_waiting_for_authorization_viewed = false,
                                           sts3_waiting_for_payment = false,
                                           sts3_waiting_for_payment_date = DateTime.Now,
                                           sts3_waiting_for_payment_note = "",
                                           sts3_waiting_for_payment_viewed = false,
                                           sts4_order_confirmed = false,
                                           sts4_order_confirmed_date = DateTime.Now,
                                           sts4_order_confirmed_note = "",
                                           sts4_order_confirmed_viewed = false,
                                           sts5_partial_order_confirmed = false,
                                           sts5_partial_order_confirmed_date = DateTime.Now,
                                           sts5_partial_order_confirmed_note = "",
                                           sts5_partial_order_confirmed_viewed = false,
                                           sts6_order_failed = false,
                                           sts6_order_failed_date = DateTime.Now,
                                           sts6_order_failed_note = "",
                                           sts6_order_failed_viewed = false,
                                           sts7_order_waiting_to_be_send = false,
                                           sts7_order_waiting_to_be_send_date = DateTime.Now,
                                           sts7_order_waiting_to_be_send_note = "",
                                           sts7_order_waiting_to_be_send_viewed = false,
                                           sts8_order_send = false,
                                           sts8_order_send_date = DateTime.Now,
                                           sts8_order_send_note = "",
                                           sts8_order_send_viewed = false,
                                           sts9_partial_order_send = false,
                                           sts9_partial_order_send_date = DateTime.Now,
                                           sts9_partial_order_send_note = "",
                                           sts9_partial_order_send_viewed = false,
                                           sts10_order_received_by_customer = false,
                                           sts10_order_received_by_customer_date = DateTime.Now,
                                           sts10_order_received_by_customer_note = "",
                                           sts10_order_received_by_customer_viewed = false,
                                           sts11_partial_order_received_by_customer = false,
                                           sts11_partial_order_received_by_customer_date = DateTime.Now,
                                           sts11_partial_order_received_by_customer_note = "",
                                           sts11_partial_order_received_by_customer_viewed = false,
                                           sts12_customer_returning_order = false,
                                           sts12_customer_returning_order_date = DateTime.Now,
                                           sts12_customer_returning_order_note = "",
                                           sts12_customer_returning_order_viewed = false,
                                           sts13_customer_returning_part_order = false,
                                           sts13_customer_returning_part_order_date = DateTime.Now,
                                           sts13_customer_returning_part_order_note = "",
                                           sts13_customer_returning_part_order_viewed = false,
                                           sts14_customer_refunded = false,
                                           sts14_customer_refunded_date = DateTime.Now,
                                           sts14_customer_refunded_note = "",
                                           sts14_customer_refunded_viewed = false,
                                           sts15_customer_partly_refunded = false,
                                           sts15_customer_partly_refunded_date = DateTime.Now,
                                           sts15_customer_partly_refunded_note = "",
                                           sts15_customer_partly_refunded_viewed = false,
                                           sts16_order_closed = false,
                                           sts16_order_closed_date = DateTime.Now,
                                           sts16_order_closed_note = "",
                                           sts16_order_closed_viewed = false,
                                           sts17_order_cancelled = false,
                                           sts17_order_cancelled_date = DateTime.Now,
                                           sts17_order_cancelled_note = "",
                                           sts17_order_cancelled_viewed = false,
                                           sts_curr_stat = "",
                                           sts_curr_date = DateTime.Now,
                                           Interest_start_date = DateTime.Now,
                                           Interest_percent = 0,
                                           Merchant_Notes = "",
                                           LastModify_Date = DateTime.Now,
                                           LastModify_User= "",
                                           LastModify_User_Id = customer.id,
                                           order_currency = "USD",
                                           order_currency_rate = 1,
                                           include_receipt = false,
                                           hear_fromus = ""

                                       };

                db.acc_ORDERS.AddObject(order);

                foreach (var item in orderdto.Items)
                {

                    switch (item.Type)
                    {
                        case CartItemType.Jewelry:
                            {
                                var cartItem = item as JewelCartItem;
                                var orderItem = new acc_JEWELRY_ORDER_ITEMS()
                                                    {
                                                        Item_id = cartItem.ID,
                                                        Item_quantity = 1,
                                                        description = "",
                                                        jewelsize = cartItem.Size,
                                                        metal = (int) cartItem.MediaType,
                                                        Item_no = "",
                                                        OrderNumber = order.OrderNumber

                                                    };

                                db.acc_JEWELRY_ORDER_ITEMS.AddObject(orderItem);
                            }
                            break;
                        case CartItemType.Diamond:
                            {
                                var cartItem = item as DiamondCartItem;
                                var orderItem = new acc_DIAMOND_ORDER_ITEMS()
                                {
                                    Item_id = cartItem.ID,
                                    Item_quantity = 1,
                                    description = "",
                                    OrderNumber = order.OrderNumber

                                };

                                db.acc_DIAMOND_ORDER_ITEMS.AddObject(orderItem);
                            }
                            break;
                        case CartItemType.CustomJewel:
                            {
                                var cartItem = item as CustomJewelCartItem;
                                var orderItem = new acc_CUSTOMJEWEL_ORDER_ITEMS()
                                {
                                    Setting_id = cartItem.SettingID,
                                    Diamond_id = cartItem.DiamondID,
                                    Item_quantity = 1,
                                    size = cartItem.Size,
                                    metal = (int)cartItem.MediaType,
                                    diamond_description = "",
                                    setting_description = "",
                                    OrderNumber = order.OrderNumber
                                };

                                db.acc_CUSTOMJEWEL_ORDER_ITEMS.AddObject(orderItem);
                            }
                            break;
                        default:
                            throw new ArgumentOutOfRangeException();
                    }
                }

                switch (orderdto.PaymentID)
                {
                    case 1:
                        {
                            var payment = new acc_CASHFLOW()
                                              {
                                                  user_id = customer.id,
                                                  payment_type = 1,
                                                  LastModify_Date = DateTime.Now,
                                                  LastModify_User = customer.email,
                                                  LastModify_User_Id = customer.id,
                                                  amount_interest = 0,
                                                  amount_actual = totalPrice,
                                                  amount_costs = 0,
                                                  amount_total = totalPrice,
                                                  approved = false,
                                                  approved_date = DateTime.Now,
                                                  cc_batch = "",
                                                  cc_cleared = false,
                                                  cc_clubmember = false,
                                                  cc_confirmation = "",
                                                  cc_cvv = orderdto.CreditCard.CCV,
                                                  cc_exp_month = orderdto.CreditCard.Month.ToString(),
                                                  cc_exp_year = orderdto.CreditCard.Year.ToString(),
                                                  cc_name = orderdto.FirstName + " " + orderdto.LastName,
                                                  cc_number = orderdto.CreditCard.CreditCardsNumber,
                                                  cc_type_id = orderdto.CreditCard.CreditCardID,
                                                  cc_user_ssn = "",
                                                  cq_account = "",
                                                  cq_bank = "",
                                                  cq_date = DateTime.Now,
                                                  cq_name = "",
                                                  master = false,
                                                  mt_account = "",
                                                  mt_bank = "",
                                                  mt_code = "",
                                                  mt_name = "",
                                                  notes = "",
                                                  order_id = order.id,
                                                  paypal = false

                                              };

                            db.acc_CASHFLOW.AddObject(payment);
                        }
                        break;
                    case 2:
                        {
                            var payment = new acc_CASHFLOW()
                            {
                                payment_type = 2,
                                LastModify_Date = DateTime.Now,
                                LastModify_User = customer.email,
                                LastModify_User_Id = customer.id,
                                amount_interest = 0,
                                amount_actual = totalPrice,
                                amount_costs = 0,
                                amount_total = totalPrice,
                                approved = false,
                                approved_date = DateTime.Now,
                                cc_batch = "",
                                cc_cleared = false,
                                cc_clubmember = false,
                                cc_confirmation = "",
                                cc_user_ssn = "",
                                cq_account = "",
                                cq_bank = "",
                                cq_date = DateTime.Now,
                                cq_name = "",
                                master = false,
                                mt_account = "",
                                mt_bank = "",
                                mt_code = "",
                                mt_name = "",
                                notes = "",
                                order_id = order.id,
                                paypal = false,
                                user_id = customer.id

                            };

                            db.acc_CASHFLOW.AddObject(payment);
                        }
                        break;
                    case 3:
                        {
                            var payment = new acc_CASHFLOW()
                            {
                                payment_type = 3,
                                LastModify_Date = DateTime.Now,
                                LastModify_User = customer.email,
                                LastModify_User_Id = customer.id,
                                amount_interest = 0,
                                amount_actual = totalPrice,
                                amount_costs = 0,
                                amount_total = totalPrice,
                                approved = false,
                                approved_date = DateTime.Now,
                                cc_batch = "",
                                cc_cleared = false,
                                cc_clubmember = false,
                                cc_confirmation = "",
                                cc_user_ssn = "",
                                cq_account = "",
                                cq_bank = "",
                                cq_date = DateTime.Now,
                                cq_name = "",
                                master = false,
                                mt_account = "",
                                mt_bank = "",
                                mt_code = "",
                                mt_name = "",
                                notes = "",
                                order_id = order.id,
                                paypal = true,
                                user_id = customer.id

                            };

                            db.acc_CASHFLOW.AddObject(payment);
                        }
                        break;

                }

                db.SaveChanges();

                return order.OrderNumber;

            }
        }