public int SalesDetailsTransaction(Sales_DetailsData ItemCode) { Sales_DetailsDal Sales_DetailsDal = new Sales_DetailsDal(); try { switch (ItemCode.DataStatus) { case DataStatus.New: Sales_DetailsDal.Add(ItemCode); break; case DataStatus.Modified: Sales_DetailsDal.update(ItemCode); break; case DataStatus.Deleted: Sales_DetailsDal.Delete(ItemCode); return(0); } return(ItemCode.ID); } catch (Exception ex) { throw ex; } }
public void SalesDetails(Sales_HeadData ItemCode) { if (ItemCode.Sales_DetailsData == null) { return; } foreach (Sales_DetailsData Sales_DetailsData in ItemCode.Sales_DetailsData) { Sales_DetailsDal Sales_DetailsDal = new Sales_DetailsDal(); Sales_DetailsData.SalesDet_HeadID = ItemCode.ID; Sales_DetailsData.DataStatus = ItemCode.DataStatus; SalesDetailsTransaction(Sales_DetailsData); } }
public List <Sales_DetailsData> GetSalesDetailsByID(int HeadID) { Sales_DetailsDal Sales_DetailsDal = new Sales_DetailsDal(); return(Sales_DetailsDal.GetByID(HeadID)); }