| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region 应收单列表 根据单价类型获取物料单击 |
| | | /// <summary> |
| | | /// 返回应收单列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Xs_ReceivableBill/getPriceByType")] |
| | | [HttpGet] |
| | | public object getPriceByType(string HMaterID, string HType) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = "exec h_p_Xs_ReceivableBill_getPriceByType " + HMaterID + ",'" + HType + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Xs_ReceivableBill_getPriceByType"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0].Rows[0]["HPrice"].ToString(); |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 应收单列表 查询 |
| | | /// <summary> |
| | | /// 返回应收单列表 |
| | |
| | | } |
| | | string sql = "select * from h_v_Xs_ReceivableBillQuerySub where hmainid = " + hmainid; |
| | | |
| | | ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Xs_ReceivableBillQuerySub"); |
| | | ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_Xs_ReceivableBillQuerySub"); |
| | | |
| | | |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |