| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | public DAL.ClsSc_MouldMaintainRuleBill BillNew = new DAL.ClsSc_MouldMaintainRuleBill(); //对应单据类 |
| | | public DAL.ClsSc_MouldMaintainRuleBill BillOld = new DAL.ClsSc_MouldMaintainRuleBill(); //对应单据类 |
| | | |
| | | |
| | | //public class HlpBill |
| | | //{ |
| | | // public int HSouceInterID = 0; |
| | | // public int HSourceEntryID = 0; |
| | | // public int Type = 0; |
| | | // public string user { get; set; } |
| | | //} |
| | | #region 器具保养规程单列表 |
| | | [Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleList")] |
| | | [HttpGet] |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //反序列化传递的值 |
| | | //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString()); |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList"); |
| | | } |
| | | |
| | | //添加列名 |
| | | 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列对象的列名 |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |