/// <summary> /// GetOrderLine /// </summary> /// <param name="ctx"></param> /// <param name="param"></param> /// <returns></returns> public Dictionary <String, String> GetOrderLine(Ctx ctx, string param) { string[] paramValue = param.Split(','); Dictionary <String, String> retDic = new Dictionary <string, string>(); //Assign parameter value int id; id = Util.GetValueOfInt(paramValue[0].ToString()); //End Assign parameter value MOrderLine orderline = new MOrderLine(ctx, id, null); retDic["C_Tax_ID"] = Util.GetValueOfString(orderline.GetC_Tax_ID()); retDic["PriceList"] = Util.GetValueOfString(orderline.GetPriceList()); retDic["PriceLimit"] = Util.GetValueOfString(orderline.GetPriceLimit()); retDic["PriceActual"] = Util.GetValueOfString(orderline.GetPriceActual()); retDic["PriceEntered"] = Util.GetValueOfString(orderline.GetPriceEntered()); retDic["C_Currency_ID"] = Util.GetValueOfString(orderline.GetC_Currency_ID()); retDic["Discount"] = Util.GetValueOfString(orderline.GetDiscount()); retDic["Discount"] = Util.GetValueOfString(orderline.GetDiscount()); retDic["M_Product_ID"] = Util.GetValueOfString(orderline.GetM_Product_ID()); retDic["Qty"] = Util.GetValueOfString(orderline.GetQtyEntered()); retDic["C_UOM_ID"] = Util.GetValueOfString(orderline.GetC_UOM_ID()); retDic["C_BPartner_ID"] = Util.GetValueOfString(orderline.GetC_BPartner_ID()); retDic["PlannedHours"] = Util.GetValueOfString(orderline.GetQtyOrdered()); retDic["M_AttributeSetInstance_ID"] = Util.GetValueOfString(orderline.GetM_AttributeSetInstance_ID()); retDic["QtyOrdered"] = Util.GetValueOfString(orderline.GetQtyOrdered()); retDic["QtyDelivered"] = Util.GetValueOfString(orderline.GetQtyDelivered()); retDic["QtyEntered"] = Util.GetValueOfString(orderline.GetQtyEntered()); retDic["C_Activity_ID"] = Util.GetValueOfString(orderline.GetC_Activity_ID()); retDic["C_Campaign_ID"] = Util.GetValueOfString(orderline.GetC_Campaign_ID()); retDic["C_Project_ID"] = Util.GetValueOfString(orderline.GetC_Project_ID()); retDic["C_ProjectPhase_ID"] = Util.GetValueOfString(orderline.GetC_ProjectPhase_ID()); retDic["C_ProjectTask_ID"] = Util.GetValueOfString(orderline.GetC_ProjectTask_ID()); retDic["AD_OrgTrx_ID"] = Util.GetValueOfString(orderline.GetAD_OrgTrx_ID()); retDic["User1_ID"] = Util.GetValueOfString(orderline.GetUser1_ID()); retDic["User2_ID"] = Util.GetValueOfString(orderline.GetUser2_ID()); retDic["IsReturnTrx"] = Util.GetValueOfString(orderline.GetParent().IsReturnTrx()).ToLower(); retDic["Orig_InOutLine_ID"] = Util.GetValueOfString(orderline.GetOrig_InOutLine_ID()); retDic["Orig_OrderLine_ID"] = Util.GetValueOfString(orderline.GetOrig_OrderLine_ID()); retDic["GetID"] = Util.GetValueOfString(orderline.Get_ID()); return(retDic); }
public JsonResult GetOrderLine(string param) { string retError = ""; string retJSON = ""; if (Session["ctx"] != null) { VAdvantage.Utility.Ctx ctx = Session["ctx"] as Ctx; string[] paramValue = param.Split(','); Dictionary <String, String> retDic = new Dictionary <string, string>(); //Assign parameter value int id; id = Util.GetValueOfInt(paramValue[0].ToString()); MOrderLine orderline = new MOrderLine(ctx, id, null); //retDic["Orig_InOutLine_ID", null); retDic["C_Tax_ID"] = orderline.GetC_Tax_ID().ToString(); retDic["PriceList"] = orderline.GetPriceList().ToString(); retDic["PriceLimit"] = orderline.GetPriceLimit().ToString(); retDic["PriceActual"] = orderline.GetPriceActual().ToString(); retDic["PriceEntered"] = orderline.GetPriceEntered().ToString(); retDic["C_Currency_ID"] = orderline.GetC_Currency_ID().ToString(); retDic["Discount"] = orderline.GetDiscount().ToString(); retDic["Discount"] = orderline.GetDiscount().ToString(); //retlst.Add(retValue); //retVal.Add(notReserved); retJSON = JsonConvert.SerializeObject(retDic); } else { retError = "Session Expired"; } return(Json(new { result = retJSON, error = retError }, JsonRequestBehavior.AllowGet)); }