| | |
| | | public UcLookItems() |
| | | { |
| | | InitializeComponent(); |
| | | lookSearchSupplier.Properties.NullText = "请选择"; |
| | | lookSearchSupplier.EditValueChanged += |
| | | LookSearchSupplier_EditValueChanged; |
| | | |
| | | } |
| | | |
| | | public bool IsReadly { get; set; } |
| | | private string _KeyFile = ""; |
| | | public string KeyFile |
| | | { |
| | |
| | | public string GetModel() |
| | | { |
| | | var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; |
| | | string id = row["itemModel"].ToString(); |
| | | return id; |
| | | if (row != null) { |
| | | string id = row["itemModel"].ToString(); |
| | | return id; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public void SetIdOrCode(string Code) |
| | | { |
| | | if (Code == "-1") |
| | | { |
| | | lookSearchSupplier.EditValue = null; |
| | | return; |
| | | } |
| | | if (KeyFile == "id") |
| | | lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim())); |
| | | { |
| | | lookSearchSupplier.EditValue =((Code.ToString().Trim())); |
| | | } |
| | | else |
| | | lookSearchSupplier.EditValue = ((Code.ToString().Trim())); |
| | | } |