| | |
| | | } |
| | | UserName = oItem.HMaker; //制单人 |
| | | oItem.HBillType = "1401"; |
| | | oItem.HBillSubType = "1401"; |
| | | //oItem.HBillSubType = "1401"; |
| | | oItem.HSALEORGID = oItem.HOrgID; |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | |
| | | } |
| | | if (IsAudit == 1) //反关闭提交 |
| | | { |
| | | oBill.oCn.BeginTran(); |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_CheckSeOrderBill_CrediControl " + oBill.omodel.HInterID, "h_p_Kf_CheckSeOrderBill_CrediControl"); |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //反关闭提交 |
| | | if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_CheckSeOrderBill_CrediControl " + oBill.omodel.HInterID, "h_p_Kf_CheckSeOrderBill_CrediControl"); |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | oBill.oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oBill.oCn.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反关闭成功"; |
| | |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | oBill.oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | } |
| | | if (IsAudit == 1) //行反关闭提交 |
| | | { |
| | | //oBill.oCn.BeginTran(); |
| | | //行反关闭提交 |
| | | if (oBill.CancelRow(lngBillKey, HEntryID, oBill.omodel.HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | //ds = oCN.RunProcReturn("exec h_p_Kf_CheckSeOrderBill_CrediControl " + oBill.omodel.HInterID, "h_p_Kf_CheckSeOrderBill_CrediControl"); |
| | | //if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | // objJsonResult.data = null; |
| | | // oBill.oCn.RollBack(); |
| | | // return objJsonResult; |
| | | //} |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反关闭成功"; |
| | | objJsonResult.data = null; |
| | | //oBill.oCn.Commit(); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | //oBill.oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |