11
啊鑫
2024-10-25 58f78e4fe78d92f5c23b3b9961ff73e87fdcf981
DevApp/Gs.DevApp/UserControl/UcLookSupplier.cs
@@ -50,7 +50,7 @@
                var dt = rtn.rtnData.list;
                lookSearchSupplier.Properties.DataSource = dt;
                lookSearchSupplier.Properties.DisplayMember = "suppName";
                lookSearchSupplier.Properties.ValueMember = "id";
                lookSearchSupplier.Properties.ValueMember = "suppno";
            }
            catch (Exception ex)
            {
@@ -64,19 +64,23 @@
        /// <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;
        }
    }
}