|  |  | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |  | 
 |  |  |                 ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList where hmainid=" + HInterID, "h_v_IF_SeOutStockBillList"); | 
 |  |  |                 ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillEdit where hmainid=" + HInterID, "h_v_IF_SeOutStockBillList"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  | 
 |  |  |             foreach (ClsXs_SeOutStockBillSub oSub in DetailColl) | 
 |  |  |             { | 
 |  |  |                 i++; | 
 |  |  |                 if (oSub.HQty <= 0 || oSub.HQty == null) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 //if (oSub.HQty <= 0 || oSub.HQty == null) | 
 |  |  |                 //{ | 
 |  |  |                 //    objJsonResult.code = "0"; | 
 |  |  |                 //    objJsonResult.count = 0; | 
 |  |  |                 //    objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0"; | 
 |  |  |                 //    objJsonResult.data = null; | 
 |  |  |                 //    return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |  | 
 |  |  |                 if (oSub.HMaterID == 0) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |                 string sql = "select * from h_v_Xs_SeOutStockBillQuerySub where hmainid =  " + hmainid; | 
 |  |  |  | 
 |  |  |                 ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Xs_SeOutStockBillQuerySub"); | 
 |  |  |                 ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_Xs_SeOutStockBillQuerySub"); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 foreach (DataColumn col in ds.Tables[0].Columns) | 
 |  |  | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         #region 发货通知单查询即时库存 | 
 |  |  |         [Route("Xs_SeOutStockBill/GetICInventory")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetICInventory(int HMaterID, int HWHID, int HORGID) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //判断是否有查询权限 | 
 |  |  |  | 
 |  |  |                 //if (!DBUtility.ClsPub.Security_Log("Xs_SeOutStockBillQuery", 1, false, user)) | 
 |  |  |                 //{ | 
 |  |  |                 //    objJsonResult.code = CodeConstant.FAIL; | 
 |  |  |                 //    objJsonResult.count = CountConstant.FAIL; | 
 |  |  |                 //    objJsonResult.Message = "无权限查看!"; | 
 |  |  |                 //    objJsonResult.data = null; | 
 |  |  |                 //    return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 string sql = "exec h_p_Xs_SeOutStockBillGetICInventory " + HMaterID + "," + HWHID + "," + HORGID; | 
 |  |  |  | 
 |  |  |                 ds = oCN.RunProcReturn(sql, "h_p_Xs_SeOutStockBillGetICInventory"); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = CodeConstant.SUCCEED; | 
 |  |  |                 objJsonResult.count = CountConstant.SUCCEED; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0].Rows[0]["HBack"]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = CodeConstant.FAIL; | 
 |  |  |                 objJsonResult.count = CountConstant.FAIL; | 
 |  |  |                 objJsonResult.Message = "Exception!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |     } | 
 |  |  | } |