yangle
2023-12-14 328034521b127d65fdff9c89a0f8dd493b44680f
WebAPI/Controllers/WebAPIController.cs
@@ -1188,16 +1188,21 @@
        [HttpGet]
        public object GetSupplierList_Json(string Supplier, Int64 HOrgID)
        {
            sWhere = " Where HStopFlag=0  and HEndFlag=1 and HUSEORGID =" + HOrgID + "";
            sWhere = " Where HStopFlag=0 and HUSEORGID =" + HOrgID + "";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1 and HUSEORGID =" + HOrgID + "";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
            if (Supplier != "")
            if (Supplier != "" && Supplier != null)
            {
                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
                //sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
            }
            try
            {
                WebS.WebService1 oWeb = new WebS.WebService1();
                ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                string sql = "select HItemID,HNumber,HName from Gy_Supplier " + sWhere;
                ds = oCN.RunProcReturn(sql, "Gy_Supplier");
                //WebS.WebService1 oWeb = new WebS.WebService1();
                //ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {