| New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Controllers.ææ¬ç®¡ç |
| | | { |
| | | public class CB_ActualItemMoneyCostController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | //public DAL.ClsCB_ItemMoneyBillMain BillOld = new DAL.ClsCB_ItemMoneyBillMain(); |
| | | //public DAL.ClsCB_ItemMoneyBillMain BillNew0 = new DAL.ClsCB_ItemMoneyBillMain(); |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | |
| | | #region |
| | | [Route("CB_ActualItemMoneyCostController/CB_ActualItemMoneyCostList")] |
| | | [HttpGet] |
| | | public object CB_ActualItemMoneyCostList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn(sWhere, "WindowPrint"); |
| | | List<object> columnNameList = new List<object>(); |
| | | //客æ·å¶å® |
| | | string sErr = ""; |
| | | //if (oSystemParameter.ShowBill(ref sErr)) |
| | | //{ |
| | | // if (oSystemParameter.omodel.WMS_CampanyName == "ä¹ä¸") |
| | | // { |
| | | // if (ds.Tables[0].Columns.Count > 8) |
| | | // { |
| | | // LogService.CustomWriteLog("åæ®å·:" + ds.Tables[0].Rows[0][7].ToString(), "CS" + DateTime.Now.ToString("yyyyMMdd")); |
| | | // } |
| | | // } |
| | | |
| | | //} |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-038]Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |