/// <summary> /// Delete a FinancialIncome /// </summary> /// <param name="fI"></param> public void DeleteFinancialIncome(FinancialIncome fI) { FinancialIncomeList.Remove(fI); //Om det inte är sparat i databasen än, bara sparat i listan db.FinancialIncome.Remove(fI); db.SaveChanges(); }
/// <summary> /// Create a new FinancialIncome /// </summary> public FinancialIncome CreateFinancialIncome() { FinancialIncome newFinancialIncome = new FinancialIncome(); FinancialIncomeList.Add(newFinancialIncome); db.FinancialIncome.Add(newFinancialIncome); db.SaveChanges(); return(newFinancialIncome); }
public void ResetFinancialIncome(FinancialIncome ppObj) { db.Entry(ppObj).State = EntityState.Unchanged; }
/// <summary> /// Adds financial income to db /// </summary> /// <param name="fiObj"></param> public void AddIncome(FinancialIncome fiObj) { fiObj.FinancialIncomeYearID = NewID; db.FinancialIncome.Add(fiObj); }