| | |
| | | var dt = rtn.rtnData.list; |
| | | lookSearchSupplier.Properties.DataSource = dt; |
| | | lookSearchSupplier.Properties.DisplayMember = "suppName"; |
| | | lookSearchSupplier.Properties.ValueMember = "id"; |
| | | lookSearchSupplier.Properties.ValueMember = "suppno"; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <return>Object</return> |
| | | public string[] GetValue() |
| | | { |
| | | //https://www.cnblogs.com/lhyqzx/p/6928817.html |
| | | var id = lookSearchSupplier.EditValue.ToString(); |
| | | ////https://www.cnblogs.com/lhyqzx/p/6928817.html |
| | | //var id = lookSearchSupplier.EditValue.ToString(); |
| | | //var name = lookSearchSupplier.Text.Trim(); |
| | | //var code = ""; |
| | | //var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; |
| | | //if (row != null) code = row["suppNo"].ToString(); |
| | | //string[] _ary = { id, name, code }; |
| | | //return _ary; |
| | | var code = lookSearchSupplier.EditValue.ToString(); |
| | | var name = lookSearchSupplier.Text.Trim(); |
| | | var code = ""; |
| | | var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; |
| | | if (row != null) code = row["suppNo"].ToString(); |
| | | string[] _ary = { id, name, code }; |
| | | string[] _ary = { code, name }; |
| | | return _ary; |
| | | } |
| | | |
| | | public void SetId(string id) |
| | | public void SetCode(string Code) |
| | | { |
| | | lookSearchSupplier.EditValue = long.Parse(id); |
| | | lookSearchSupplier.EditValue = Code; |
| | | } |
| | | } |
| | | } |