หลังจากเข้าไป log in และเลือกสินค้าตามปกติ ก็กดปุ่ม Place Order ก็จะเจอ errore ตรง status
public CommerceLibOrderInfo(DataRow orderRow)
{Int32.Parse(orderRow["OrderID"].ToString());"DateCreated"].ToString();"DateShipped"].ToString();"Comments"].ToString();Status = Int32.Parse(orderRow["Status"].ToString());"AuthCode"].ToString();"Reference"].ToString();Membership.GetUser(new Guid(orderRow["CustomerID"].ToString()));HttpContext.Current.Profile as ProfileCommon)new SecureCard(CustomerProfile.CreditCard);
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 391: DateShipped = orderRow["DateShipped"].ToString();
Line 392: Comments = orderRow["Comments"].ToString();
Line 393: Status = Int32.Parse(orderRow["Status"].ToString());
Line 394: AuthCode = orderRow["AuthCode"].ToString();
Line 395: Reference = orderRow["Reference"].ToString();
|
Source File: f:\Sirikanya AspNet 2 Learning\BalloonShop\App_Code\CommerceLibAccess.cs Line: 393
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112
System.Int32.Parse(String s) +20
CommerceLibOrderInfo..ctor(DataRow orderRow) in f:\Sirikanya AspNet 2 Learning\BalloonShop\App_Code\CommerceLibAccess.cs:393
CommerceLibAccess.GetOrder(String orderID) in f:\Sirikanya AspNet 2 Learning\BalloonShop\App_Code\CommerceLibAccess.cs:648
CommerceLib.OrderProcessor..ctor(String orderID) in f:\Sirikanya AspNet 2 Learning\BalloonShop\App_Code\CommerceLib\OrderProcessor.cs:28
Checkout.placeOrderButton_Click(Object sender, EventArgs e) in f:\Sirikanya AspNet 2 Learning\BalloonShop\Checkout.aspx.cs:145
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
|
Server Error in '/BalloonShop' Application.
Input string was not in a correct format.
ลอง hard code ด้วยการกำหนดให้ status=1 ก็ผ่านจุดนี้ไปได้นะคะ แต่ก็ไปติด ตรง credit card อีก รบกวนอาจารย์ช่วยเรื่องแรกก่อนนะคะ เดี๋ยวเรื่อง credit card ค่อยแก้ก็ได้ค่ะ