protected void GridView1_RowUpdating( object sender , GridViewUpdateEventArgs e ) { int sysid = Convert.ToInt32( e.NewValues["SYSID"].ToString() ); //string syxn = e.OldValues["SYXN"].ToString(); //int syxq = Convert.ToInt32( e.OldValues["SYXQ"].ToString() ); int syz = Convert.ToInt32( e.NewValues["SYZ"].ToString() ); int syxingq = Convert.ToInt32( e.NewValues["SYXINGQ"].ToString() ); int syks = Convert.ToInt32( e.NewValues["SYKS"].ToString() ); dbModule dm = new dbModule(); if ( dm.cfjh( sysid , "noneed" , 0 , syz , syxingq , syks ) != 0 ) { messageLabel.Text = "实验安排冲突,已强制安排实验。"; //Resources.Resource.strDuplicateSJString; e.Cancel = false; return; } messageLabel.Text = ""; }