| | |
| | | using DAL; |
| | | using DBUtility; |
| | | using Microsoft.AspNet.SignalR; |
| | | using Model; |
| | | using SQLHelper; |
| | |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | |
| | | #region [公告数据查询] |
| | | [Route("MsgData")] |
| | | [HttpGet] |
| | | public object MsgData(string sWhere) |
| | | { |
| | | ClsCNSRM oCn = new ClsCNSRM(); |
| | | DataSet oDs = new DataSet(); |
| | | var sql = "select A.HInterID,b.HEntryID,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag,A.HDate" + |
| | | " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere; |
| | | oDs = oCn.RunProcReturn(sql, "OA_InformBillMain"); |
| | | if (oDs.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "返回数据成功!"; |
| | | objJsonResult.data = oDs; |
| | | } |
| | | else { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "返回数据失败!"; |
| | | objJsonResult.data = oDs; |
| | | } |
| | | return objJsonResult; ; |
| | | } |
| | | #endregion |
| | | |
| | | #region[更改公告状态] |
| | | [Route("UpdateMessage")] |
| | | [HttpGet] |
| | | public object UpdateMessage(string UserName, string HInterID,string HEntryID) |
| | | { |
| | | ClsCNSRM oCn = new ClsCNSRM(); |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Update OA_InformBillSub set HReadFlag=1 HUpDater='"+ UserName + "',HUpDateDate=getdate() where HInterID='" + HInterID + "' and HEntryID='"+ HEntryID + "'", ref ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message =ClsPub.sExeReturnInfo; |
| | | objjson.data = null; |
| | | return objjson;; |
| | | } |
| | | #endregion |
| | | } |
| | | } |