This article introduces you to use stored procedures to the data inventory value of the specific implementation process, interested friends do not miss
The code code in the CS file is as follows://Watch video three standard //page pass parameter over int v1_biaozhou = Convert.ToInt32 (textbox1.text); int v1_ feizhi= Convert.ToInt32 (textbox4.text); int V2_biaozhou = Convert.ToInt32 (textbox2.text); int V2_ feizhi= Convert.ToInt32 (textbox5.text); int V3_biaozhou = Convert.ToInt32 (textbox3.text); int V3_ feizhi= Convert.ToInt32 (textbox6.text); //job marking (article) int z1_biaozhun=convert. ToInt32 (TextBox7. Text); int Z1_feizhi=convert. ToInt32 (TextBox10. Text); int Z2_biaozhun=convert. ToInt32 (TextBox8. Text); int Z2_feizhi=convert. ToInt32 (TextBox11. Text); int Z3_biaozhun=convert. ToInt32 (TextBox9. Text); int Z3_feizhi=convert. ToInt32 (TextBox12. Text); //materialized objects (learning libraries correspond to edboperation) edb=new edboperation (); //using stored procedures string Procname= "Insert_update_project_standard"; //Insert Data sqlparameter[] spp=new sqlparameter[]{ New Sqlparameter ("@PROJECT_ID", ProjectID), new SqlParameter ("@V1_BIAOZHOU", V1_biaozhou), new SqlParameter ("@V1_ Fengzhi ", V1_feizhi), new SqlParameter (" @V2_BIAOZHOU ", V2_biaozhou), new SqlParameter (" @V2_FENGZHI ", v2_ Feizhi), New SqlParameter ("@V3_BIAOZHOU", V3_biaozhou), new SqlParameter ("@V3_FENGZHI", V3_feizhi), New SqlParameter ("@Z1_BIAOZHUN", Z1_biaozhun), new SqlParameter ("@Z1_FENZHI", Z1_feizhi), new SqlParameter ("@Z2_BIAOZHUN", Z2_biaozhun), new SqlParameter ("@Z2_FENZHI", Z2_feizhi), new SqlParameter (" @Z3_BIAOZHUN ", Z3_biaozhun), new SqlParameter (" @Z3_FENZHI ", Z3_feizhi) }; NEW SqlParameter ("Field name in database stored procedure", defined field name) ASPX code code is as follows: <tr> <td style= "WIDTH:101PX; Text-align:center; " > <asp:label id= "Label2" runat= "server" text= "watch Video (minutes):" Font-size= "9pt" width= "132px" ></asp:label > </td> <td style= "text-align:left;" Colspan= "2" >&nbSp <table> <tr style= "height:25px;" > <td style= "width:180px;" ><asp:textbox id= "TextBox1" runat= "Server" ></asp:TextBox></td> <td style= "width : 180px; " ><asp:textbox id= "TextBox4" runat= "server" ></asp:TextBox></td> </tr> <tr> <td class= "Auto-style3" ><asp:textbox id= "TextBox2" runat= "Server" ></asp:textbox ></td> <td class= "Auto-style3" ><asp:textbox id= "TextBox5" runat= "Server" ></asp: textbox></td> </tr> <tr style= "height:25px;" > <td style= "width:180px;" ><asp:textbox id= "TextBox3" runat= "Server" ontextchanged= "textbox3_textchanged" ></asp:TextBox>< /td> <td style= "width:180px;" ><asp:textbox id= "TextBox6" runat= "server" ></asp:TextBox></td> </tr> </table> </td> </tr> <tr> <td style= "WIDTH:101PX; Text-align:center; " > <asp:label id= "Labele" runat= "text=" Job marking (article): "Font-size=" 9pt "width=" 132px "></asp:label > </td> <td style= "text-align:left;" Colspan= "2" > <table> <tr style= "height:25px;" > <td style= "width:180px;" ><asp:textbox id= "TextBox7" runat= "Server" ></asp:TextBox></td> <td style= "width : 180px; " ><asp:textbox id= "TextBox10" runat= "Server" ></asp:TextBox></td> </tr> <TR style= "height:25px;" > <td style= "width:180px;" ><asp:textbox id= "TextBox8" runat= "Server" ></asp:TextBox></td> <td style= "width : 180px; " ><asp:textbox id= "TextBox11" runat= "Server" ></asp:TextBox></td> </tr> <TR style= "height:25px;" > <td style= "width:180px;" ><asp:textbox id= "TextBox9" runat= "Server" ></asp:textbox></td> <td style= "width:180px;" ><asp:textbox id= "TextBox12" runat= "Server" ></asp:TextBox></td> </tr> Stored procedure code as follows://Create stored procedure Create PROC insert_update_project_standard @PROJECT_ID int, @ V1_biaozhou int, @V1_FENGZHI int, @V2_BIAOZHOU int, @V2_FENGZHI int, @V3_BIAOZHOU int, @V3 _fengzhi int, @Z1_BIAOZHUN int, @Z1_FENZHI int, @Z2_BIAOZHUN int, @Z2_FENZHI int, @Z3_ Biaozhun int, @Z3_FENZHI int as //image stored procedure corresponding to insert data INSERT INTO t_learning_project_ STANDARD (SID,KHBZ,FZ) VALUES (@PROJECT_ID, @V1_BIAOZHOU, @V1_FENGZHI) INSERT into t_learning_project_ STANDARD (SID,KHBZ,FZ) VALUES (@PROJECT_ID, @V2_BIAOZHOU, @V2_FENGZHI) INSERT into T_learning_project_standard ( SID,KHBZ,FZ values (@PROJECT_ID, @V3_BIAOZHOU, @V3_FENGZHI) INSERT into T_learning_project_standard (Sid, KHBZ, FZ) VALUES (@PROJEct_id, @Z1_BIAOZHUN, @Z1_FENZHI) INSERT into T_learning_project_standard (Sid, KHBZ, FZ) VALUES (@PROJECT_ID, @Z2_ Biaozhun, @Z2_FENZHI) INSERT into T_learning_project_standard (Sid, KHBZ, FZ) VALUES (@PROJECT_ID, @Z3_BIAOZHUN, @z 3_fenzhi)