You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
3.5 KiB
C#
83 lines
3.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using DSWeb.Areas.Import.DAL.Comm;
|
|
using DSWeb.Areas.Import.Models.Comm;
|
|
using DSWeb.TruckMng.Helper;
|
|
using HcUtility.Comm;
|
|
using DSWeb.SoftMng.Filter;
|
|
|
|
namespace DSWeb.Areas.Import.Controllers
|
|
{
|
|
[JsonRequestBehavior]
|
|
public class MsChFeeController : Controller
|
|
{
|
|
//
|
|
// GET: /TruckMng/MsChFee/GetDataList
|
|
|
|
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
|
|
public ContentResult GetDataList(string billno,string sort)
|
|
{
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='" + billno + "'", sort, Session["USERID"].ToString());
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
|
|
public ContentResult GetAuditDataList ( string billno, string sort )
|
|
{
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='" + billno + "' and (FeeStatus<>1 and FeeStatus<>6)", sort, Session["USERID"].ToString());
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
|
|
public ContentResult GetAuditDataList_ALL ( string billno, string sort )
|
|
{
|
|
var dataList = MsChFeeDAL.GetDataList("BsNo='" + billno + "' ", sort, Session["USERID"].ToString());
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
/* public ContentResult GetSettlementDataList(string billno)
|
|
{
|
|
// var dataList = MsChFeeDAL.GetSettlementList("BsNo='" + billno + "' and (FeeStatus=0)");
|
|
|
|
// var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
|
|
// return new ContentResult() { Content = json };
|
|
}
|
|
*/
|
|
|
|
public ContentResult Audit(int newStatus, string list,string USERID,string CanDo)
|
|
{
|
|
var chfeeList = JsonConvert.Deserialize<List<MsChFee>>(list);
|
|
|
|
DBResult result = MsChFeeDAL.Audit(newStatus, chfeeList,USERID,CanDo);
|
|
var NewStatusList =new List<NewStatusmb>();
|
|
NewStatusList=(List<NewStatusmb>)result.Data;
|
|
var json = JsonConvert.Serialize(new { Success = result.Success, Message = result.Message
|
|
, totalCount = NewStatusList.Count
|
|
, data = NewStatusList.ToList()
|
|
});
|
|
|
|
return new ContentResult() { Content = json };
|
|
/*var json = JsonConvert.Serialize(result);
|
|
return new ContentResult() { Content = json };*/
|
|
}
|
|
/*
|
|
public ContentResult SetStatus(int TableName, string Keyfield, string UPDField,string UPDValue,String condition)
|
|
{
|
|
var KeyList = JsonConvert.Deserialize<List<MsChFee>>(list);
|
|
|
|
DBResult result = MsChFeeDAL.Audit(newStatus, chfeeList, USERID);
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
* */
|
|
}
|
|
}
|