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.
DS7/DSWeb/Areas/TruckMng/Controllers/RPT_zb_lrbbController.cs

98 lines
2.8 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Linq;
using System.Web.Mvc;
using DSWeb.Areas.TruckMng.DAL.RPT_zb_lrbb;
using DSWeb.Areas.TruckMng.Models.RPT_zb_lrbb;
using DSWeb.TruckMng.Helper;
using HcUtility.Comm;
using HcUtility.Core;
using DSWeb.TruckMng.Comm.Cookie;
using DSWeb.SoftMng.Filter;
namespace DSWeb.Areas.TruckMng.Controllers
{
/// <summary>
/// 集运对账_陆运+杂费
/// 以路单中的委托单位为基准,总结陆运和杂费两块
/// 不计算路单自己的费用,只记录路单下的派车单内的费用
/// </summary>
[JsonRequestBehavior]
public class RPT_zb_lrbbController : Controller
{
//
// GET: /TruckMng/RPT_ly
public ActionResult Index()
{
return View();
}
//
// GET/TruckMng/RPT_ly/GetDataList
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetDataList(int start, int limit, string sort, string condition)
{
var dataList = RPT_zb_lrbbDAL.GetDataList(condition);
var list = dataList.Skip(start).Take(limit);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
return new ContentResult() { Content = json };
}
//
// GET/TruckMng/MsWlCheckAcc/GetData/
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetData(string handle, string condition)
{
RPT_zb_lrbbmb head = null;
if (handle == "edit")
{
var list = RPT_zb_lrbbDAL.GetDataList(condition);
if (list.Count > 0)
head = list[0];
}
if (head == null)
{
head = new RPT_zb_lrbbmb();
}
var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = head });
return new ContentResult() { Content = json };
}
public ContentResult Delete(string data)
{
var head = JsonConvert.Deserialize<RPT_zb_lrbbmb>(data);
var modb = new ModelObjectDB();
DBResult result = modb.Delete(head);
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
#region 参照部分
public ContentResult GetDept(string condition)
{
var list = RPT_zb_lrbbDAL.GetDeptName(CookieConfig.GetCookie_OrgCode(Request));
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = list.ToList() });
return new ContentResult() { Content = json };
}
#endregion
}
}