Exemple #1
0
        private void gvList_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            try
            {
                Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START");
                if (gvList.FocusedRowHandle < 0)
                {
                    return;
                }

                string tempId           = "";
                string tempWorktypeName = "";
                string tempProgrammCode = "";

                tempId           = gvList.GetFocusedRowCellValue("F_ID").ToString();
                tempWorktypeName = gvList.GetFocusedRowCellValue("F_WORKTYPE_NAME").ToString();
                tempProgrammCode = gvList.GetFocusedRowCellValue("F_PROGRAMM_CODE").ToString();

                string QueryCon = "";
                QueryCon = " F_WORKTYPE_NAME='" + tempWorktypeName + "' and F_PROGRAMM_CODE='" + tempProgrammCode + "' ";
                //绑定数据
                _dsCommandStartPar = _bllCommandStartPar.GetList(QueryCon);

                //有数据情况下绑定
                if (_dsCommandStartPar != null && _dsCommandStartPar.Tables.Count > 0)
                {
                    gcStartPar.DataSource = _dsCommandStartPar.Tables[0];
                }
            }
            catch (Exception ex)
            {
                Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex);
                throw ex;
            }
        }