1 Replies - 507 Views - Last Post: 18 January 2019 - 01:13 PM Rate Topic: -----

#1 ahmedba   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 176
  • Joined: 24-January 14

Which model will select to be base of view sales order entry form ( sa

Posted 17 January 2019 - 04:08 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

on Header(represent by Sales Header Model) 
SalesOrderNO   1
SalesYear      2019
SalesDate      2019-01-17
BranchCode     1
SalesTypeNo    1
CustomerNo     2509
on Footer(represent by Sales Footer Model)
SalesLineNo ItemCode  Quantity  Price Total
1            12929       5        10   50
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) :

Sales Header Model
public int SalesOrderNo { get; set; }
public int SalesYear { get; set; }
public int BranchCode { get; set; }
public int SalesType { get; set; }
public DateTime SalesDate { get; set; }
public int CustomerID { get; set; }
public Customer Customers { get; set; }
public ICollection<SalesFooter> SalesFooters { get; set; }

Sales Footer model
public int SalesOrderNo { get; set; }
public int SalesLineNo { get; set; }
public int SalesType { get; set; }
public int BranchCode { get; set; }
public string ItemCode { get; set; }
public decimal Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal Total { get; set; }
public Items Itemes { get; set; }
public SalesHeader SaleHeaders { get; set; }

This post has been edited by ahmedba: 17 January 2019 - 04:09 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Which model will select to be base of view sales order entry form ( sa

#2 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2730
  • View blog
  • Posts: 10,898
  • Joined: 03-December 12

Re: Which model will select to be base of view sales order entry form ( sa

Posted 18 January 2019 - 01:13 PM

Not really sure what you're asking...


I am going to go with the header class, because it has the footer class as part of it?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1