| | |
| | | public class Sc_ProcessExchangeBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public const string ModName = "3772"; //单据类型 |
| | | public const string ModCaption = "工序流转卡"; //单据名称 |
| | | public const string ModRightName = "Sc_ProcessExchangeBill"; |
| | | public const string ModRightNameList = ModRightName + "List"; //列表 |
| | | public const string ModRightNameEdit = ModRightName + "_Edit"; //编辑 |
| | | public const string ModRightNameCheck = ModRightName + "_Check"; //审核 |
| | | public const string ModRightNameClose = ModRightName + "_Close"; //关闭 |
| | | public const string ModRightNameDelete = ModRightName + "_Delete"; //作废 |
| | | public const string ModRightNameDrop = ModRightName + "_Drop"; //删除 |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 工序流转卡列表 |
| | | /// <summary> |
| | | /// 获取工序流转卡列表信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessExchangeBillController/GetSc_ProcessExchangeBillList_Json")] |
| | | [HttpGet] |
| | | public object GetSc_ProcessExchangeBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName) |
| | | { |
| | | try |
| | | { |
| | | //判断权限 |
| | | if (OperationType == "1") |
| | | { |
| | | //判断权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "您没有该模块权限,请与管理员联系!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //返回列表信息 |
| | | ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); |
| | | List<object> columnNameList = new List<object>(); |
| | | //添加列名 |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询列表信息失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |