Home > Net >  Consult the GridView editing data linkage problems
Consult the GridView editing data linkage problems

Time:10-12

Editor, how to make the amount and quantity, unit price linkage, revision number, automatic calculation amount changes,


The front desk code
 & lt; Asp: the SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues ConnectionString"="& lt; % % $ConnectionStrings: hbposv8ConnectionString & gt;" DeleteCommand="DELETE FROM [shouhuodan] WHERE [id]=@original_id AND (([item_no]=@original_item_no) OR ([item_no] IS NULL AND @original_item_no IS NULL)) AND (([shuliang]=@original_shuliang) OR ([shuliang] IS NULL AND @original_shuliang IS NULL)) AND (([jinjia]=@original_jinjia) OR ([jinjia] IS NULL AND @original_jinjia IS NULL)) AND (([zengpin]=@original_zengpin) OR ([zengpin] IS NULL AND @original_zengpin IS NULL)) AND (([jine]=@original_jine) OR ([jine] IS NULL AND @original_jine IS NULL))" InsertCommand="INSERT INTO [shouhuodan] ([item_no], [shuliang], [jinjia], [zengpin], [jine]) VALUES (@item_no, @shuliang, @jinjia, @zengpin, @jine)" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [id], [item_no], [shuliang], [jinjia], [zengpin], [jine] FROM [shouhuodan]" UpdateCommand="UPDATE [shouhuodan] SET [shuliang]=@shuliang, [jinjia]=@jinjia, [zengpin]=@zengpin, [jine]=@jine WHERE [id]=@original_id AND (([item_no]=@original_item_no) OR ([item_no] IS NULL AND @original_item_no IS NULL)) AND (([shuliang]=@original_shuliang) OR ([shuliang] IS NULL AND @original_shuliang IS NULL)) AND (([jinjia]=@original_jinjia) OR ([jinjia] IS NULL AND @original_jinjia IS NULL)) AND (([zengpin]=@original_zengpin) OR ([zengpin] IS NULL AND @original_zengpin IS NULL)) AND (([jine]=@original_jine) OR ([jine] IS NULL AND @original_jine IS NULL))"> 











=======================================
The background code
 using System; 
using System.Collections.Generic;
Using System. Drawing;
Using System. The Web;
Using System. Web. UI.
Using System. Web. UI. WebControls;

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related