lu
2025-01-14 d35bb711f8d3d267b44b4a80c20e31dabf309ae7
DevApp/Gs.DevApp/UserControl/UcLookCk.cs
@@ -32,8 +32,11 @@
        public void getSuppler(string orgId)
        {
            string _keyWhere = "";
            if (!string.IsNullOrEmpty(orgId))
                _keyWhere = " and a.FSubsidiary ='" + orgId + "'";
            var pgq = new PageQueryModel(1, 999999, "depot_code", "asc", "",
                " and is_ng='A'"+"  and a.FSubsidiary ='" + orgId + "'");
                " and is_ng='A'"+_keyWhere);
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
@@ -84,7 +87,38 @@
                lookSearchSupplier.EditValue = null;
                return;
            }
            if(!string.IsNullOrEmpty(Code))
            lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
        }
        /// <summary>
        /// 读取组织ID
        /// </summary>
        /// <returns></returns>
        public string GetOrgId()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["OrgId"].ToString();
                return id;
            }
            return "";
        }
        /// <summary>
        /// 读取组织名称
        /// </summary>
        /// <returns></returns>
        public string GetOrgName()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["OrgName"].ToString();
                return id;
            }
            return "";
        }
    }
}