Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (DataRow item in table.Rows)
- {
- pcdatasource.PurchaseID = pmdatasource.PurchaseID;
- pcdatasource.CategoryID = Convert.ToInt32(item["Category ID"]);
- pcdatasource.PorductID = Convert.ToInt32(item["Product ID"]);
- pcdatasource.SupplierID = supplierid;
- pcdatasource.PurchasePrice = item["Purchase Price"].ToString();
- pcdatasource.SalePrice = item["Sale Price"].ToString();
- pcdatasource.Quantity = item["Quantity"].ToString();
- pcdatasource.TotalPrice = item["Amount"].ToString();
- dbcontext.Purchase_Child_tbl.AddObject(pcdatasource);
- dbcontext.SaveChanges();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement