| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 销售订单 根据客户获取币别、汇率、结算方式 |
| | | [Route("Xs_SeOrderBill/getCustomerByCusID")] |
| | | [HttpGet] |
| | | public object getCustomerByCusID(long HCusID) |
| | | { |
| | | try |
| | | { |
| | | string sql = @"select |
| | | c.HItemID HCusID |
| | | ,c.HNumber HCusNumber |
| | | ,c.HName HCusName |
| | | ,c.HSSID |
| | | ,s.HName HSSName |
| | | ,c.HCurID |
| | | ,cur.HName HCurName |
| | | ,cur.HExchangeRate HExRate |
| | | from Gy_Customer as c |
| | | left join Gy_SettleStyle as s on c.HSSID = s.HItemID |
| | | left join Gy_Currency as cur on c.HCurID = cur.HItemID |
| | | where c.HItemID = " + HCusID; |
| | | ds = oCN.RunProcReturn(sql,"Gy_Customer"); |
| | | |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "未查询到该客户信息!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 |
| | | } |
| | | } |