コード例 #1
0
        public bool UpdateBudgets(Budget budgets)
        {
            context.Entry(budgets).State = System.Data.Entity.EntityState.Modified;

            var exitingBudgets = context.Budgets.Find(budgets.ID);

            context.Entry(exitingBudgets).CurrentValues.SetValues(budgets);

            return(context.SaveChanges() > 0);
        }
コード例 #2
0
        public bool UpdateDebtCards(DebtCard debtCards)
        {
            context.Entry(debtCards).State = System.Data.Entity.EntityState.Modified;

            var exitingAccomodationPackage = context.DebtCards.Find(debtCards.ID);

            context.Entry(exitingAccomodationPackage).CurrentValues.SetValues(debtCards);

            return(context.SaveChanges() > 0);
        }
コード例 #3
0
        public bool UpdateTransactions(Transactions transactions)
        {
            context.Entry(transactions).State = System.Data.Entity.EntityState.Modified;

            var exitingAccomodationPackage = context.Transactions.Find(transactions.ID);

            context.Entry(exitingAccomodationPackage).CurrentValues.SetValues(transactions);

            return(context.SaveChanges() > 0);
        }
        public bool UpdateNotifications(Notifications notifications)
        {
            context.Entry(notifications).State = System.Data.Entity.EntityState.Modified;

            var exitingBudgets = context.Notifications.Find(notifications.ID);

            context.Entry(exitingBudgets).CurrentValues.SetValues(notifications);

            return(context.SaveChanges() > 0);
        }
コード例 #5
0
        public bool UpdateImportantShoppings(ImportantShopping importantShopping)
        {
            context.Entry(importantShopping).State = System.Data.Entity.EntityState.Modified;

            var exitingAccomodationPackage = context.ImportantShoppings.Find(importantShopping.ID);

            context.Entry(exitingAccomodationPackage).CurrentValues.SetValues(importantShopping);

            context.ShoppingPictures.AddRange(importantShopping.ShoppingPictures);

            return(context.SaveChanges() > 0);
        }
コード例 #6
0
        public bool UpdateKBudgets(KBudget kBudget)
        {
            context.Entry(kBudget).State = System.Data.Entity.EntityState.Modified;

            return(context.SaveChanges() > 0);
        }
        public bool UpdateScheduledTransaction(ScheduledTransaction scheduledTransaction)
        {
            context.Entry(scheduledTransaction).State = System.Data.Entity.EntityState.Modified;

            return(context.SaveChanges() > 0);
        }
        public bool UpdateKindsOfDebts(KindOfDebts kindsOfDebts)
        {
            context.Entry(kindsOfDebts).State = System.Data.Entity.EntityState.Modified;

            return(context.SaveChanges() > 0);
        }
コード例 #9
0
        public bool UpdateCurrencies(Currency currency)
        {
            context.Entry(currency).State = System.Data.Entity.EntityState.Modified;

            return(context.SaveChanges() > 0);
        }