| | |
| | | txt_ftranstype.ReadOnly = true; |
| | | txt_fOwnerTypeIdHead.ReadOnly = true; |
| | | txt_fOwnerTypeInIdHead.ReadOnly = true; |
| | | txt_fBusinessType.Properties.ReadOnly = true; |
| | | txt_djtype.Properties.ReadOnly = true; |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_fapporgid); |
| | | txt_fBusinessType.Properties.ReadOnly = true; |
| | | txt_djtype.Properties.ReadOnly = true; |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 预计开工时间变化事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void txt_fBillTypeID_EditValueChanged(object sender, EventArgs e) |
| | | { |
| | | string selectedValue = txt_fBillTypeID.EditValue?.ToString(); |
| | | |
| | | if (string.IsNullOrEmpty(selectedValue)) |
| | | return; |
| | | |
| | | if (selectedValue == "委外调拨申请单(DBSQD02_WW)") |
| | | { |
| | | SetComboBoxValue(txt_fBusinessType, "委外(WW)"); |
| | | SetComboBoxValue(txt_djtype, "委外直接调拨单(WWDB01_SYS)"); |
| | | } |
| | | else |
| | | { |
| | | SetComboBoxValue(txt_fBusinessType, "标准(NORMAL)"); |
| | | SetComboBoxValue(txt_djtype, "标准直接调拨单(ZJDB01_SYS)"); |
| | | } |
| | | } |
| | | |
| | | private void SetComboBoxValue(ComboBoxEdit comboBox, string value) |
| | | { |
| | | if (comboBox.Properties.Items.Contains(value)) |
| | | { |
| | | comboBox.EditValue = value; |
| | | } |
| | | else |
| | | { |
| | | // 如果值不存在,设置为第一个选项或空 |
| | | if (comboBox.Properties.Items.Count > 0) |
| | | comboBox.EditValue = comboBox.Properties.Items[0]; |
| | | else |
| | | comboBox.EditValue = null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |