ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 277.9k

Which model will select to be base of view Sales Order Entry

Jan 17 2019 4:52 PM

Which model will select to be base of view Sales Order Entry Form ( SalesFooter Model OR Sales Header Model) ? 

I work in project work in asp.net core 2.1 visual studio 2017 SQL Server 2012

I actually need to make entry form Sales Order consist from Sales Header Model and Sales Footer model

on Sales Order Entry Form

  1. on Sales Order Entry Form  
  2.   
  3. on Header(represent by Sales Header Model)   
  4. SalesOrderNO   1  
  5. SalesYear      2019  
  6. SalesDate      2019-01-17  
  7. BranchCode     1  
  8. SalesTypeNo    1  
  9. CustomerNo     2509  
  10. on Footer(represent by Sales Footer Model)  
  11. SalesLineNo ItemCode  Quantity  Price Total  
  12. 1            12929       5        10   50  
  13. 2            17918       4         5   20  

Result of Process above when Save the Order

One record added to Sales Header Table.
Two record added to Sales Footer Table.

so that what Model I will select it to be based of Sales Order (Sales Footer Or Sales Header) :

  1. Sales Header Model  
  2. public int SalesOrderNo { getset; }  
  3. public int SalesYear { getset; }  
  4. public int BranchCode { getset; }  
  5. public int SalesType { getset; }  
  6. public DateTime SalesDate { getset; }  
  7. public int CustomerID { getset; }  
  8. public Customer Customers { getset; }  
  9. public ICollection SalesFooters { getset; }  
  10.   
  11. Sales Footer model  
  12. public int SalesOrderNo { getset; }  
  13. public int SalesLineNo { getset; }  
  14. public int SalesType { getset; }  
  15. public int BranchCode { getset; }  
  16. public string ItemCode { getset; }  
  17. public decimal Quantity { getset; }  
  18. public decimal UnitPrice { getset; }  
  19. public decimal Total { getset; }  
  20. public Items Itemes { getset; }  
  21. public SalesHeader SaleHeaders { getset; } 

Answers (2)