/// <summary> /// 获取需要更新的现货交易费用数据 UpdateSpotCosts /// </summary> /// <param name="handle"></param> private void UpdateSpotCosts(int handle) { try { if (handle < 0) { return; } //显示添加现货交易费用窗体 AddSpotCostsUI addSpotCostsUI = new AddSpotCostsUI(); addSpotCostsUI.EditType = (int)UITypes.EditTypeEnum.UpdateUI; DataRow _dr = this.gdvSpotCostsSelect.GetDataRow(handle); int breedClassID = Convert.ToInt32(_dr["BreedClassID"]); XH_SpotCosts xH_SpotCosts = SpotManageCommon.GetXHSpotCostsModel(breedClassID); addSpotCostsUI.XHSpotCosts = xH_SpotCosts; if (addSpotCostsUI.ShowDialog(this) == DialogResult.OK) { this.QuerySpotCosts(); this.gdvSpotCostsSelect.FocusedRowHandle = handle; } } catch (Exception ex) { string errCode = "GL-5423"; string errMsg = "获取需要更新的现货交易费用数据失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
/// <summary> /// 显示添加现货交易费UI btnAdd_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, EventArgs e) { try { //显示添加现货交易费用窗体 AddSpotCostsUI addSpotCostsUI = new AddSpotCostsUI(); addSpotCostsUI.ShowDialog(); this.QuerySpotCosts(); } catch (Exception ex) { string errCode = "GL-5421"; string errMsg = "显示添加现货交易费UI加载失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }