Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 3
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Esempio n. 4
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Esempio n. 5
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);
Esempio n. 6
0
 partial void DeletePaymentPeriod(PaymentPeriod instance);
Esempio n. 7
0
 partial void UpdatePaymentPeriod(PaymentPeriod instance);
Esempio n. 8
0
 partial void InsertPaymentPeriod(PaymentPeriod instance);