/// <summary>
 /// 双击事件
 /// by xlb 2012-12-17
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gcCommonModel_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         DataRow datarow = gridView1.GetFocusedDataRow();
         if (datarow == null)
         {
             return;
         }
         CommonNote_ModelInfo ucModelInfo = new CommonNote_ModelInfo(m_app, datarow);
         if (ucModelInfo == null)
         {
             return;
         }
         ucModelInfo.TopMost = true;
         if (ucModelInfo.ShowDialog() == DialogResult.OK)
         {
             ReSet();
             Search();
         }
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
 /// <summary>
 /// 编辑事件
 /// by 项令波 2012-12-14
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         DataRow focusRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);
         if (focusRow == null)
         {
             //throw new Exception("没有选中编辑行");
             DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("没有选中要编辑的行");
             return;
         }
         CommonNote_ModelInfo ucModelInfo = new CommonNote_ModelInfo(m_app, focusRow);
         if (ucModelInfo == null)
         {
             return;
         }
         //避免弹出窗体窜到别的页面上方打开
         ucModelInfo.TopMost = true;
         if (ucModelInfo.ShowDialog() == DialogResult.OK)
         {
             ReSet();
             Search();
         }
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
 /// <summary>
 /// 新 增 事 件
 /// by  项令波
 /// 2012-12-14
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         CommonNote_ModelInfo ucModelInfo = new CommonNote_ModelInfo(m_app);
         if (ucModelInfo == null)
         {
             return;
         }
         ucModelInfo.TopMost = true;
         if (ucModelInfo.ShowDialog() == DialogResult.OK)
         {
             ReSet();
             Search();
         }
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }