Mishkkk

Mishkkk

  • NA
  • 59
  • 934

Entity query - calculate the difference between income and expenses a

Feb 10 2021 2:53 PM
Help me please!!!
 
I have:
  1. public class Warehouse  
  2. {  
  3. public int WarehouseId { getset; }  
  4. public DateTime? DateOperation { getset; }// date record  
  5. public int Nomenclature { getset; }// name  
  6. public int Operation { getset; }// operation: only income and expense  
  7. public decimal Quantity { getset; }  
  8. }  
  9. using (Cxt db = new Cxt())  
  10. {  
  11. gridQuery.DataSource = ???  
  12. }
i need to calculate the difference between income and expense and show everything in the table. I think the approach should be:
 
select all fields income, summarize, select all fields expenditure, summarize, subtract from the amounts of income the amount of expenditure and write in the table, and so on all fields of the nomenclature. 

Answers (6)