| | |
| | | //进行需要进行的审核/反审核操作 |
| | | if (IsAudit == 0) //审核提交 |
| | | { |
| | | //反写客户信用额度 |
| | | oCN.BeginTran(); |
| | | string sql = "select * from Gy_Customer_Credit where HCusID = " + oBill.omodel.HCusID; |
| | | ds = oCN.RunProcReturn(sql, "Gy_Customer_Credit"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sql = "insert into Gy_Customer_Credit" + |
| | | "(HCusID,HCreditRating_Now,HUpdateTime,HUpdateMan)" + |
| | | " values(" + |
| | | "" + oBill.omodel.HCusID + |
| | | "," + oBill.omodel.HNewRating + |
| | | ",'" + DateTime.Now.ToString("yyyy-MM-dd") + "'" + |
| | | ",'" + CurUserName + "'" + |
| | | ")"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | sql = "update Gy_Customer_Credit set " + |
| | | "HCreditRating_Now = " + oBill.omodel.HNewRating + |
| | | ",HUpdateTime = '" + DateTime.Now.ToString("yyyy-MM-dd") + "'" + |
| | | ",HUpdateMan = '" + CurUserName + "'" + |
| | | " where HCusID = " + oBill.omodel.HCusID; |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | | |
| | | //审核提交 |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | |
| | | //反写客户信用额度 |
| | | oCN.BeginTran(); |
| | | string sql = "exec h_p_Xs_CusRatingChangeBill_ReWriteCustomerCredit " + oBill.omodel.HCusID + "," + oBill.omodel.HNewRating + ",'" + CurUserName + "'"; |
| | | oCN.RunProc(sql); |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |