| | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_ExceptiveCheckRequestBillList_Query order by 单据号 ", "h_v_Xs_ExceptiveCheckRequestBillList_Query"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Xs_ExceptiveCheckRequestBillList_Query order by 单据号 desc", "h_v_Xs_ExceptiveCheckRequestBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Xs_ExceptiveCheckRequestBillList_Query where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 "; |
| | | string sql = sql1 + sWhere + " order by 单据号 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xs_ExceptiveCheckRequestBillList_Query"); |
| | | } |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | string s = ""; |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Xs_ExceptiveCheckRequestBill_Drop", 1, false, user)) |
| | | { |
| | |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID不能为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据有误!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //判断是否可编辑 |
| | | if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "此单据已经被审核,不允许删除!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | |
| | | if (IsAudit == 0) //审核提交 |
| | | { |
| | | //审核提交 |
| | | //oBill.oCn.BeginTran(); |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | //审核源单 |
| | | oCN.BeginTran(); |
| | | string sql = "exec h_p_Xs_ExceptiveCheckRequestBill_ReWriteSourceStatus " + oBill.omodel.HMainSourceInterID + ",'" + oBill.omodel.HMainSourceBillType + "','" + CurUserName + "'"; |
| | | oCN.RunProc(sql); |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核成功"; |
| | |
| | | } |
| | | else |
| | | { |
| | | //oBill.oCn = new SQLHelper.ClsCN(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |