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.
116 lines
4.2 KiB
C#
116 lines
4.2 KiB
C#
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.MsWl_Port;
|
|
using DSWeb.Areas.TruckMng.DAL.MsWl_Port;
|
|
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;
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
|
using System.IO;
|
|
using System.Data.OleDb;
|
|
using DSWeb.TruckMng.Comm.Cookie;
|
|
|
|
using WebSqlHelper;
|
|
using System.Data.Common;
|
|
|
|
namespace DSWeb.Areas.TruckMng.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 项目信息明细
|
|
/// </summary>
|
|
public class MsWl_Port_FuelTruckListController : Controller
|
|
{
|
|
//
|
|
// GET: /Import/RptImportFeedetail/
|
|
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Edit()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
#region 集合列表—码头加油记录
|
|
public ContentResult GetFuelTruckList(int start, int limit, string sort, string condition)
|
|
{
|
|
var dataList = MsWl_PortDAL.GetFuelTruckList(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 GetFuelTruck(string handle, string condition)
|
|
{
|
|
FuelTruckListmb head = null;
|
|
head = MsWl_PortDAL.GetFuelTruck(condition);
|
|
if (head == null)
|
|
{
|
|
head = new FuelTruckListmb();
|
|
}
|
|
var json = JsonConvert.Serialize(
|
|
new { Success = true, Message = "查询成功", data = head });
|
|
return new ContentResult() { Content = json };
|
|
}
|
|
|
|
public ContentResult GetFuelDate(int start, int limit, string sort, string condition)
|
|
{
|
|
var dataList = MsWl_PortDAL.GetFuelDate(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 GetFuelPrice(int start, int limit, string sort, string condition, string condition2)
|
|
{
|
|
var dataList = MsWl_PortDAL.GetFuelPrice(condition, condition2, sort, Session["COMPANYID"].ToString(), Session["USERID"].ToString());
|
|
|
|
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 };
|
|
}
|
|
#endregion
|
|
|
|
public ContentResult SaveFuelDate ( string FuelDate, string FuelDateDel, string FuelPrice, string FuelPriceDel )
|
|
{
|
|
var FuelDateList = JsonConvert.Deserialize<List<FuelDatemb>>(FuelDate);
|
|
var FuelDateDelList = JsonConvert.Deserialize<List<FuelDatemb>>(FuelDateDel);
|
|
var FuelPriceList = JsonConvert.Deserialize<List<FuelPricemb>>(FuelPrice);
|
|
var FuelPriceDelList = JsonConvert.Deserialize<List<FuelPricemb>>(FuelPriceDel);
|
|
|
|
var modb = new ModelObjectRepository();
|
|
DBResult result = modb.SaveComm(
|
|
ModelObjectConvert<FuelDatemb>.ToModelObjectList(FuelDateList),
|
|
ModelObjectConvert<FuelDatemb>.ToModelObjectList(FuelDateDelList),
|
|
ModelObjectConvert<FuelPricemb>.ToModelObjectList(FuelPriceList),
|
|
ModelObjectConvert<FuelPricemb>.ToModelObjectList(FuelPriceDelList)
|
|
);
|
|
|
|
//刷新父窗口上的父节点
|
|
var jsonRespose = new JsonResponse
|
|
{
|
|
Success = result.Success,
|
|
Message = result.Message//,
|
|
//Data = XXHDAL.GetData("M.ContractNo='" + head.ContractNo + "'")
|
|
};
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
}
|
|
|
|
}
|
|
}
|