public List <tblSell> GetHuskInfo() { var data = context.sp_getProductSellInfo(0, 4);// 4 is id of husk List <tblSell> sells = new List <tblSell>(); foreach (var item in data.Take(100)) { tblSell sellobj = new tblSell(); sellobj.ID = item.ID; sellobj.date = item.date; sellobj.noOfBag = item.noOfBag; sellobj.partyId = item.partyId; sellobj.partyName = item.partyName; sellobj.productId = item.productId; sellobj.productName = item.productName; sellobj.quantity = item.quantity; sellobj.stockId = item.stockId; sellobj.stockName = item.stockName; sellobj.unit = item.unit; sellobj.unitPrice = item.unitPrice; sellobj.paidAmount = Convert.ToDouble(item.amount); sellobj.transportCost = item.transportCost; sellobj.truckNumber = item.truckNumber; sellobj.description = item.description; sellobj.incSrcId = item.incSrcId; sells.Add(sellobj); } //List<tblLoanar> results = new List<tblLoanar>(); //foreach (var item in loaners) //{ // results.Add(new tblParty() { ID=item.ID, name=item.name, contactNo=item.contactNo, area=item.area, // district=item.district, zoneId=item.zoneId, productId=item.productId, isCashParty=item.isCashParty}); //} return(sells); }
public List <tblSell> GetParticleInfo() { var data = context.sp_getProductSellInfo(0, 11);// 11 is id of Particle List <tblSell> sells = new List <tblSell>(); foreach (var item in data.Take(100)) { tblSell sellobj = new tblSell(); sellobj.ID = item.ID; sellobj.date = item.date; sellobj.noOfBag = item.noOfBag; sellobj.partyId = item.partyId; sellobj.partyName = item.partyName; sellobj.productId = item.productId; sellobj.productName = item.productName; sellobj.quantity = item.quantity; sellobj.stockId = item.stockId; sellobj.stockName = item.stockName; sellobj.unit = item.unit; sellobj.unitPrice = item.unitPrice; sellobj.incSrcId = item.incSrcId; sells.Add(sellobj); } return(sells); }