using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
public class Gy_UnitConvertRateController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
const string ModCaption = "单位换算";
public const string ModRightName = "Gy_UnitConvertRate";
public const string ModRightNameDelete = ModRightName + "_Delete"; //删除
public DataSet ds = new DataSet();
private json objJsonResult = new json();
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
#region 单位换算列表
///
/// 获取单位换算列表信息
///
///
[Route("Gy_UnitConvertRateController/GetGy_UnitConvertRateList_Json")]
[HttpGet]
public object GetGy_UnitConvertRateList_Json(string sWhere, string HMaker, string OperationType)
{
try
{
//判断权限 1为直接列表模块打开 2为从其他模块跳转打开列表
if (OperationType == "1")
{
//判断权限
if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
objJsonResult.data = null;
return objJsonResult;
}
}
//返回列表信息
ds = oCn.RunProcReturn("select * from h_v_Gy_UnitConvertRateList where " + sWhere + " order by HItemID desc", "h_v_Gy_UnitConvertRateList");
List