/// <summary> /// 新增訂購資訊 /// </summary> /// <param name="uData"></param> /// <returns></returns> public string NewOrderData(OrderDataEntity uData) { //var isSuccess = true; var errorMsg = string.Empty; uData.orderID = Guid.NewGuid().ToString(); uData.orderLoginuserID = UserInfo.loginuserID; var orders = new List <OrderDataEntity>() { uData }; try { OrderDataAccess.AddOrderData(orders); } catch (Exception ex) { errorMsg = ex.Message.Replace("\n", ""); //isSuccess = false; } return(errorMsg); //return Json(new { isSuccess = isSuccess, errorMsg = errorMsg }, JsonRequestBehavior.AllowGet); }