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
|
}
|
}
|