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.

92 lines
2.8 KiB
C#

11 months ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using DSWeb.Areas.TruckMng.Models.Comm;
using DSWeb.Areas.CommMng.DAL;
using DSWeb.Areas.Import.DAL.XXH;
using DSWeb.Areas.Import.Models.XXH;
using DSWeb.Areas.Import.DAL.CW;
using DSWeb.TruckMng.Comm.Cookie;
using DSWeb.TruckMng.Helper;
using DSWeb.TruckMng.Helper.Repository;
using DSWeb.Areas.TruckMng.DAL.Comm; //引用chfee的module
using HcUtility.Comm;
using HcUtility.Core;
namespace DSWeb.Areas.Import.Controllers
{
[JsonRequestBehavior]
public class CWAuditController : Controller
{
//
// GET: /Import/create
public ActionResult Index()
{
return View();
}
//
// GET: /Import/create/Edit
public ActionResult Edit()
{
return View();
}
public ContentResult Save(string chfeebody)
{
var chfeeBodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
if (chfeeBodyList != null)
{
foreach (var _fee in chfeeBodyList)
{
_fee.MODIFIEDTIME = DateTime.Now.ToString();
_fee.MODIFIEDUSER = Session["USERID"].ToString();
}
}
var modb = new ModelObjectRepository();
DBResult result = modb.Save(
ModelObjectConvert<MsChFee>.ToModelObjectList(chfeeBodyList)
);
//刷新父窗口上的父节点
var jsonRespose = new JsonResponse
{
Success = result.Success,
Message = result.Message,
//Data = XXHDAL.GetData("M.ContractNo='" + head.ContractNo + "'")
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult GetAuditDataList(int start, int limit, string sort, string condition)
{
var USERID = Convert.ToString(Session["USERID"]);
var dataList = CWAdvancePaymentDAL.GetAuditDataList(condition, sort, USERID);
var list = dataList.Skip(start).Take(500);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult GetChFeeDo(string condition)
{
var dataList = MsChFeeDAL.GetChFeeDo(condition);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
#region 参照部分
#endregion
}
}