| | |
| | | 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 |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "无数据"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //获取保养项目编辑数据 |
| | | string sql = "select 保养项目ID,保养项目,保养部位,具体要求,负责人ID,负责人代码,负责人名称,子备注2 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + ""; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList"); |
| | | string sql = "select 保养项目ID,保养项目,保养部位,具体要求,负责人ID,负责人代码,负责人名称,子备注2 from h_v_Sb_EquipMaintainRuleSub_Item where 1 = 1 " + Swhere + ""; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleSub_Item"); |
| | | //获取配件项目编辑数据 |
| | | string sql1 = "select 配件ID,配件代码,配件名称,单位ID,计量单位代码,计量单位名称,用量,标准用量,子备注1 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + ""; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleList"); |
| | | string sql1 = "select 配件ID,配件代码,配件名称,单位ID,计量单位代码,计量单位名称,用量,标准用量,子备注1 from h_v_Sb_EquipMaintainRuleSub where 1 = 1 " + Swhere + ""; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleSub"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |