Example #1
0
        private PaymentPeriod GetPeriod(DataClassesDataContext context)
        {
            var result = context.PaymentPeriods.FirstOrDefault(x => x.Year == ShowYear && x.Month == ShowMonth);

            if (result == null)
            {
                result = new PaymentPeriod {
                    Year = ShowYear, Month = ShowMonth
                };
                context.PaymentPeriods.InsertOnSubmit(result);
                context.SubmitChanges();
            }

            return(result);
        }
Example #2
0
        private PaymentPeriod GetPeriod(DataClassesDataContext context)
        {
            var result = context.PaymentPeriods.FirstOrDefault(x => x.Year == ShowYear && x.Month == ShowMonth);
            if (result == null)
            {
                result = new PaymentPeriod { Year = ShowYear, Month = ShowMonth };
                context.PaymentPeriods.InsertOnSubmit(result);
                context.SubmitChanges();
            }

            return result;
        }
Example #3
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Example #4
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Example #5
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);
Example #6
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Example #7
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Example #8
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);