| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using WebAPI.DbUntil; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region [动态列表2] |
| | | [Route("Sc_MESReportFrom/ReportFromBillList2")] |
| | | [HttpGet] |
| | | public object ReportFromBillList2(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = "select HItemID,HNumber 代码,HName 名称 from Gy_Process where 1 = 1 " + sWhere; |
| | | ds = new SQLHelper.ClsCN().RunProcReturn(sql, "Gy_Employee"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = DataFormatUntil.BackRowCount(sql, "Gy_Employee"); |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = DataFormatUntil.BackColTitle(ds); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "false!"; |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = DataFormatUntil.BackColTitle(ds); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | |