コード例 #1
0
ファイル: SellersBLL.cs プロジェクト: nadkarnirohan/apidotnet
        public static IEnumerable <PURCHASEDETAILS> SellerOrderDetails(int sellerId)
        {
            List <PURCHASES>       purchases       = PURCHASESDDAL.GetPurchase(sellerId);
            List <PURCHASEDETAILS> purchaseDetails = PURCHASEDETAILSDAL.GetAll();

            foreach (PURCHASES ps in purchases)
            {
                var details = from pd in purchaseDetails where pd.PURCHASENO.Equals(ps.PURCHASENO) select pd;
                return(details);
            }

            return(new List <PURCHASEDETAILS>());
        }
コード例 #2
0
ファイル: SellersBLL.cs プロジェクト: nadkarnirohan/apidotnet
        //special operations
        public static SELLERS SellerAllData(int id)
        {
            SELLERS seller = null;

            try
            {
                seller           = SELLERSDAL.Get(id);
                seller.ADDRESS   = SELLERSADDRESSDAL.GetAll(id);
                seller.PURCHASES = PURCHASESDDAL.GetPurchase(id);
            }
            catch (NullReferenceException nex)
            {
                seller.ADDRESS   = new List <SELLERSADDRESS>();
                seller.PURCHASES = new List <PURCHASES>();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(seller);
        }