| | |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using static DevExpress.XtraPrinting.Native.PageSizeInfo; |
| | | |
| | | namespace Gs.DevApp.UserControl |
| | | { |
| | |
| | | LookSearchSupplier_EditValueChanged; |
| | | getSuppler(); |
| | | } |
| | | |
| | | private string _KeyFile = ""; |
| | | public string KeyFile |
| | | { |
| | | get { return _KeyFile; } |
| | | set |
| | | { |
| | | _KeyFile = value; |
| | | getSuppler(); |
| | | } |
| | | } |
| | | public bool IsReadly { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 改变事件 |
| | | /// </summary> |
| | |
| | | |
| | | private void getSuppler() |
| | | { |
| | | var pgq = new PageQueryModel(1, 999999, "supp_no", "asc", "", |
| | | " and fforbidstatus='A'"); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | var _obj = new |
| | | { |
| | | currentPage = 1, |
| | | everyPageSize = 999999, |
| | | sortName = "", |
| | | keyWhere = "", |
| | | }; |
| | | var json = JsonConvert.SerializeObject(_obj); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | "MesSupplierManager/GetListPage", json); |
| | | "MesSupplierManager/GetListSelect", json); |
| | | var rtn = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = rtn.rtnData.list; |
| | | lookSearchSupplier.Properties.DataSource = dt; |
| | | lookSearchSupplier.Properties.DisplayMember = "suppName"; |
| | | // lookSearchSupplier.Properties.ValueMember = "suppNo"; |
| | | lookSearchSupplier.Properties.ValueMember = KeyFile; |
| | | lookSearchSupplier.Properties.ValueMember = "id"; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | lookSearchSupplier.EditValue = null; |
| | | return; |
| | | } |
| | | if (KeyFile == "id") |
| | | lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim())); |
| | | else |
| | | lookSearchSupplier.EditValue = ((Code.ToString().Trim())); |
| | | lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim())); |
| | | } |
| | | } |
| | | } |