| |

VerySource

 Forgot password?
 Register
Search
View: 706|Reply: 4

Questions about writing data to the DataGrid, online, etc.

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-9 10:00:01
| Show all posts |Read mode
Recently, I'm doing something similar to web invoicing. The sales order is a master table. The sales order is from the table. The step of filling out the sales order is a bit depressed. I want to fill in the sales order on this page of the sales order. Some information of the manifest list and the clear information of the sales goods, I put a DataGrid control, ready to add the sales goods information one by one after the entry, and finally save the corresponding add to the database.
I would like to ask you masters, how can I achieve the data stored in the DataGrid control after adding the point of sales goods, thank you!
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-5-29 20:00:01
| Show all posts
After adding, go back to the page and fetch the data
Response.Redirect (Request.Url.ToString ());
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 United States

Post time: 2020-6-1 16:00:02
| Show all posts
Use ViewState, Session and other objects to achieve it, or use a static class
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-5 11:00:01
| Show all posts
After each point is added, put the content of the page DataGrid into a DataTable object, and then add the newly added record to the DataTable, and then use this DataTable to bind to the DataGrid.You can make a hidden field record to add Records, you can save these marked records into the database when you save.
Reply

Use magic Report

0

Threads

22

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-6-6 22:45:01
| Show all posts
Since the order is saved, it is in the database. Isn't it okay to rebind the DataGrid?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list