Пример #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);
        }
Пример #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;
        }
Пример #3
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Пример #4
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Пример #5
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);
Пример #6
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Пример #7
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Пример #8
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);