| | |
| | | get; |
| | | set; |
| | | } |
| | | public string HzId |
| | | { |
| | | get; |
| | | set; |
| | | } |
| | | public bool IsReadly { get; set; } |
| | | |
| | | public UcLookHuoZhu() |
| | | { |
| | | InitializeComponent(); |
| | | txt_qt018.Properties.NullText = "请选择"; |
| | | this.txt_qt025.SelectedIndexChanged += (s, e) => |
| | | txt_hzabc.Properties.NullText = "请选择"; |
| | | this.txt_hzlxabc.SelectedIndexChanged += (s, e) => |
| | | { |
| | | int _strType = txt_qt025.SelectedIndex; |
| | | txt_hzabc.EditValue = null; |
| | | int _strType = txt_hzlxabc.SelectedIndex; |
| | | string _orgId = OrgId; |
| | | this.searchLookUpEdit1View.Columns.Clear(); |
| | | txt_qt018.Properties.DataSource = null; |
| | | txt_hzabc.Properties.DataSource = null; |
| | | if (_strType <= 0) return; |
| | | string _strMeth = ""; |
| | | string _DisplayMember = ""; |
| | |
| | | var strReturn = UtilityHelper.HttpPost("", _strMeth, json); |
| | | var rtn = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = rtn.rtnData.list; |
| | | txt_qt018.Properties.DataSource = dt; |
| | | txt_qt018.Properties.DisplayMember = _DisplayMember; |
| | | txt_qt018.Properties.ValueMember = _ValueMember; |
| | | txt_qt018.ForceInitialize(); |
| | | txt_qt018.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; |
| | | txt_hzabc.Properties.DataSource = dt; |
| | | txt_hzabc.Properties.DisplayMember = _DisplayMember; |
| | | txt_hzabc.Properties.ValueMember = _ValueMember; |
| | | txt_hzabc.ForceInitialize(); |
| | | txt_hzabc.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; |
| | | if (!string.IsNullOrEmpty(HzId)) |
| | | SetHzId(HzId); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public string GetHzId() |
| | | { |
| | | var row2 = txt_qt018.GetSelectedDataRow() as DataRowView; |
| | | var row2 = txt_hzabc.GetSelectedDataRow() as DataRowView; |
| | | if (row2 != null) |
| | | { |
| | | string inHz = txt_qt025.SelectedIndex > 1 ? row2["Id"].ToString() : row2["fid"].ToString(); |
| | | string inHz = txt_hzlxabc.SelectedIndex > 1 ? row2["Id"].ToString() : row2["fid"].ToString(); |
| | | return inHz; |
| | | } |
| | | return ""; |
| | |
| | | /// <returns></returns> |
| | | public string GetHzLx() |
| | | { |
| | | if (txt_qt025.SelectedIndex <= 0) |
| | | if (txt_hzlxabc.SelectedIndex <= 0) |
| | | return ""; |
| | | string id = txt_qt025.Text.Trim(); |
| | | string id = txt_hzlxabc.Text.Trim(); |
| | | return id; |
| | | } |
| | | |
| | |
| | | { |
| | | if (Code == "-1" || string.IsNullOrEmpty(Code)) |
| | | { |
| | | txt_qt018.EditValue = null; |
| | | txt_hzabc.EditValue = null; |
| | | return; |
| | | } |
| | | txt_qt018.EditValue = Int64.Parse(((Code.ToString().Trim()))); |
| | | txt_hzabc.EditValue = Int64.Parse(((Code.ToString().Trim()))); |
| | | txt_hzabc.Text = Code; |
| | | } |
| | | /// <summary> |
| | | /// 设置 |
| | | /// </summary> |
| | | /// <param name="Code"></param> |
| | | public void SetHzLx(int Code) |
| | | public void SetHzLx(string Code) |
| | | { |
| | | txt_qt025.SelectedIndex = Code; |
| | | if (string.IsNullOrEmpty(Code)) |
| | | txt_hzlxabc.SelectedIndex = 0; |
| | | else |
| | | txt_hzlxabc.Text = Code; |
| | | } |
| | | } |
| | | } |