/// <summary> /// 轧钢计划点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gv_ZGJH_Click(object sender, EventArgs e) { try { int selectedHandle = this.gv_ZGJH.FocusedRowHandle;//获取焦点行索引 if (selectedHandle < 0) { return; } txt_XZSL1.Text = this.gv_ZGJH.GetRowCellValue(selectedHandle, "N_WGT").ToString();//数量 commonSub.ImageComboBoxEditBindLGGW(GetGXid("ZG"), cbo_FA.EditValue.ToString(), cbo_XZGW1); commonSub.ComboBoxEditBindPCSX(cbo_FA.Text, this.gv_ZGJH.GetRowCellValue(selectedHandle, "C_STA_ID").ToString(), cbo_SCSX1); cbo_XZGW1.EditValue = ""; string sta = this.gv_ZGJH.GetRowCellValue(this.gv_ZGJH.FocusedRowHandle, "C_STA_ID").ToString(); if (cbo_XZGW1.EditValue.ToString() == sta) { cbo_SCSX1.Properties.Items.RemoveAt(cbo_SCSX1.Properties.Items.Count - 1); } cbo_XZGW1.EditValue = sta; cbo_SCSX1.EditValue = this.gv_ZGJH.GetRowCellValue(selectedHandle, "N_SORT").ToString(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }