1 // Modify website file module 2 Public Int Upstatewebproductscontentconfig ( Long Itestid, Int Iseq)// Itestid is the ID of the website file, and iseq is the field value to be modified 3 { 4 If (_ Iloginret! = 0 )Return - 1 ; 5 6 STC. model. showwebproductscontentconfig mshowwebproductscontentconfig = New Model. showwebproductscontentconfig (); 7 Duser. stablename = Mshowwebproductscontentconfig. stablename; 8 String Strsql = " Iseq = " + Iseq. tostring () + " " ;// As a condition for Searching databases 9 Int Flag = Duser. getcount (strsql );// Use the getcount common function to search for the iseq field = number of values in the database. If there are multiple iseq fields, you cannot set them again. 10 If (Flag> 0 )// If flag = 0,-4 is returned, and Ajax prompts an error at the front-end 11 Return - 4 ; 12 Duser. GetModel (mshowwebproductscontentconfig, itestid );//GetModel is a parent function and a public method. When it is modified, the values of other fields are not affected. 13 If (Mshowwebproductscontentconfig = Null ) Return - 3 ; 14 15 Mshowwebproductscontentconfig. iseq =Iseq;// If there are no duplicatesModify the value of this field 16 Duser. Update (mshowwebproductscontentconfig );// This is a parent function for modification. 17 18 Return 0 ; 19 }