| | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_CusRatingChangeBillList_Query order by 单据号 ", "h_v_Xs_CusRatingChangeBillList_Query"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_CusRatingChangeBillList_Query order by 单据号 desc", "h_v_Xs_CusRatingChangeBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Xs_CusRatingChangeBillList_Query where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xs_CusRatingChangeBillList_Query"); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 根据客户内码获取客户余额与客户信用额度 |
| | | /// <summary> |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Xs_CusRatingChangeBill/getCustomerBalance")] |
| | | [HttpGet] |
| | | public object getCustomerBalance(Int64 HCusID) |
| | | { |
| | | try |
| | | { |
| | | string sql = "exec h_p_Gy_Customer_CrediControl " + HCusID; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Gy_Customer_CrediControl"); |
| | | if(ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!未获取到对应客户的信息!!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |