Help With Update Data in Nop_Order table

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 anni tempo fa
Hi!
I am trying to alter the [ShippingFaxNumber] field in the [Nop_Order] table. (use this "ShippingFaxNumber" for other thing)

In the Administration/Modules/OrderDetail.aspx,
I would like to create a Text field with a Submit Button To update the data in the [ShippingFaxNumber] in [Nop_Order] table. with the associated OrderID

This is the fomat i add in the "OrderDetail.aspx"

New Number:  <asp:TextBox ID="txtnumber" runat="server"></asp:TextBox>
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtnumber" runat="server" ErrorMessage="Please enter a tracking number!"></asp:RequiredFieldValidator>
                         &nbsp;<asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="NumberButton_Click"/>

Can some one help me with the "Update statement"  in the Adminstration/Modules/OrderDetail.aspx.cs to make the "btnSubmit" button work.


Something like

protected void NumberButton_Click(object sender, EventArgs e)
        {
            Update statement here....something like

Update Nop_order Set ShippingFaxNumber=texnumber.tex Where OrderID=This.orderID

}

Can some one help me with this "update code" to make it function

Thank you very much.
14 anni tempo fa
This application is split into multiple tiers. Typically, you don't want to put SQL in a code behind page. Just try and copy how it is done in the existing program. Follow the code from the code behind page, to Nop.BusinessLogic, and then Nop.DataAccessSql (I think). You will have to change things in all three places.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.