public int addAdjustmentDetails(int adjustId, string itemCode, int qty, string reason, string status) { AdjustmentDetail adjust_details = new AdjustmentDetail(); adjust_details.AdjustmentID = adjustId; adjust_details.Item_Code = itemCode; adjust_details.Quantity = qty; adjust_details.Reason = reason; adjust_details.Status = status; edm.AdjustmentDetails.AddObject(adjust_details); this.edm.SaveChanges(); int adjustment_detailsId = adjust_details.Adjustment_DetailID; return adjustment_detailsId; }
/// <summary> /// Deprecated Method for adding a new object to the AdjustmentDetails EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToAdjustmentDetails(AdjustmentDetail adjustmentDetail) { base.AddObject("AdjustmentDetails", adjustmentDetail); }
/// <summary> /// Create a new AdjustmentDetail object. /// </summary> /// <param name="adjustment_DetailID">Initial value of the Adjustment_DetailID property.</param> /// <param name="adjustmentID">Initial value of the AdjustmentID property.</param> /// <param name="item_Code">Initial value of the Item_Code property.</param> /// <param name="quantity">Initial value of the Quantity property.</param> /// <param name="reason">Initial value of the Reason property.</param> /// <param name="status">Initial value of the Status property.</param> public static AdjustmentDetail CreateAdjustmentDetail(global::System.Int32 adjustment_DetailID, global::System.Int32 adjustmentID, global::System.String item_Code, global::System.Int32 quantity, global::System.String reason, global::System.String status) { AdjustmentDetail adjustmentDetail = new AdjustmentDetail(); adjustmentDetail.Adjustment_DetailID = adjustment_DetailID; adjustmentDetail.AdjustmentID = adjustmentID; adjustmentDetail.Item_Code = item_Code; adjustmentDetail.Quantity = quantity; adjustmentDetail.Reason = reason; adjustmentDetail.Status = status; return adjustmentDetail; }