一道初四数学的题,如图,正方形ABCD边长为9cm,动点P在CD边上移动,把正方形沿EF折叠,使点B与点P重合,点A与点

1个回答

  • void gridupdate(Object sender,DataGridCommandEventArgs e)

    {

    string stud_id,strsql,class_id;

    int introw;

    TextBox obj;

    introw=e.Item.ItemIndex;

    obj=(TextBox)dg.Items[introw].Cells[4].Controls[0];

    class_id=obj.Text;

    stud_id=dg.DataKeys[introw].ToString();

    strsql="update studentinfo set class_id='" + class_id + "' where stud_id='" + stud_id + "'";

    SqlConnection sqlcon=new SqlConnection("Data Source=localhost;uid=sa;pwd=246770397;Initial Catalog=student");

    sqlcon.Open();

    SqlCommand sqlcommand=new SqlCommand();

    sqlcommand.Connection=sqlcon;

    sqlcommand.CommandText=strsql;

    sqlcommand.ExecuteNonQuery();

    sqlcon.Close();

    sqlcon=null;

    sqlcommand=null;

    dg.EditItemIndex=-1;

    bindgrid();

    }