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