private void map(DAL.CustomersDataContext dc, PaymentStatusCode paymentStatusCode, DAL.PaymentStatusCode dalPaymentStatusCode)
        {
            bool isNew = paymentStatusCode.Id == 0;
            bool isModified = false;

            if (dalPaymentStatusCode.PaymentTransactionId != paymentStatusCode.PaymentTransactionId)
            {
                dalPaymentStatusCode.PaymentTransactionId = paymentStatusCode.PaymentTransactionId;
                isModified = true;
            }

            if (dalPaymentStatusCode.StatusCode != paymentStatusCode.StatusCode)
            {
                dalPaymentStatusCode.StatusCode = paymentStatusCode.StatusCode;
                isModified = true;
            }

            if (isNew)
            {
                dalPaymentStatusCode.CreatedBy = paymentStatusCode.LastChangedBy;
                dalPaymentStatusCode.CreatedDate = DateTime.Now;
            }

            if (isModified)
            {
                dalPaymentStatusCode.LastChangedBy = paymentStatusCode.LastChangedBy;
                dalPaymentStatusCode.LastChangedDate = DateTime.Now;
            }
        }
 internal static void Delete(CustomerManagement.DAL.CustomersDataContext dc, PaymentStatusCode paymentStatusCode)
 {
     DAL.PaymentStatusCode dalPaymentStatusCode = findRecord(dc, paymentStatusCode.Id);
     dalPaymentStatusCode.Deleted = true;
     dc.SubmitChanges();
 }
 private static PaymentStatusCode createRandomPaymentStatusCode()
 {
     PaymentStatusCode psc = new PaymentStatusCode();
     psc.PaymentTransactionId = 0; // need to get this when saving holder
     psc.StatusCode = rnd.Next().ToString();
     return psc;
 }