|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using DSWeb.Areas.TruckMng.Models.MsWlPc;
|
|
|
|
|
using DSWeb.Areas.TruckMng.DAL.MsWl_LKPC;
|
|
|
|
|
using DSWeb.Areas.CommMng.Models;
|
|
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
|
|
using DSWeb.TruckMng.Helper.Repository;
|
|
|
|
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
|
|
|
|
using HcUtility.Comm;
|
|
|
|
|
using HcUtility.Core;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.TruckMng.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 项目信息明细
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MsWl_LK_CargoInfoController : Controller
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
// GET: /Import/RptImportFeedetail/
|
|
|
|
|
|
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ActionResult Edit()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ContentResult GetDataList(int start, int limit, string sort, string condition)
|
|
|
|
|
{
|
|
|
|
|
var dataList =MsWl_LKPCDAL. GetCargoInfoList(condition, sort);
|
|
|
|
|
|
|
|
|
|
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 };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ContentResult Save(string Body, string DelBody)
|
|
|
|
|
{
|
|
|
|
|
var BodyList = JsonConvert.Deserialize<List<MsWl_LK_CargoInfomb>>(Body);
|
|
|
|
|
var DelBodyList = JsonConvert.Deserialize<List<MsWl_LK_CargoInfomb>>(DelBody);
|
|
|
|
|
/*
|
|
|
|
|
Database db_t = DatabaseFactory.CreateDatabase();
|
|
|
|
|
string strCheckRow = " select USERNAME from [user] where gid= '" + UserID + "' ";
|
|
|
|
|
object statusObj = SqlHelper.ExecuteScalar(db_t.ConnectionString, CommandType.Text, strCheckRow, null);
|
|
|
|
|
var EnName = statusObj.ToString();
|
|
|
|
|
* */
|
|
|
|
|
|
|
|
|
|
var modb = new ModelObjectRepository();
|
|
|
|
|
DBResult result = modb.SaveComm(
|
|
|
|
|
ModelObjectConvert<MsWl_LK_CargoInfomb>.ToModelObjectList(BodyList),
|
|
|
|
|
ModelObjectConvert<MsWl_LK_CargoInfomb>.ToModelObjectList(DelBodyList)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//刷新父窗口上的父节点
|
|
|
|
|
var jsonRespose = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = result.Success,
|
|
|
|
|
Message = result.Message,
|
|
|
|
|
//Data = XXHDAL.GetData("M.ContractNo='" + head.ContractNo + "'")
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|