private void dataGridViewProject_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
 {
     try
     {
         if (e.StateChanged == DataGridViewElementStates.Selected)
         {
             dataGridViewProjectUnit.DataSource = null;
             if (dataTableProject.Rows.Count > 0)
             {
                 dataRowProject = dataTableProject.Rows[e.Row.Index];
                 //根据项目编号来获取断面以及传感器的信息
                 string projectName = Convert.ToString(dataRowProject["ProjectName"]);
                 ServiceClient client = new ServiceClient();
                 dataTableProjectUnit = client.SelectUnitByProject(projectName);
                 dataGridViewProjectUnit.DataSource = dataTableProjectUnit;
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionLog.Instance.WriteLog(ex, LogType.UI);
         ZBMMessageBox.ShowError(ex);
     }
 }