public void createRequestDetails(int requestID, String itemCode, int requestedQty) { RequestDetail addRequestDetail = new RequestDetail(); addRequestDetail.RequestID = requestID; addRequestDetail.ItemCode = itemCode; addRequestDetail.Quantity = requestedQty; addRequestDetail.DeletedFlag = false; context.AddToRequestDetails(addRequestDetail); context.SaveChanges(); }
public void saveRequestDetailInfo(List <RequestDetail> ldet) { for (int i = 0; i < ldet.Count; i++) { RequestDetail rd = new RequestDetail(); rd.RequestID = ldet[i].RequestID; rd.ItemCode = ldet[i].ItemCode; rd.Quantity = ldet[i].Quantity; rd.DeletedFlag = ldet[i].DeletedFlag; context.AddToRequestDetails(rd); context.SaveChanges(); } }