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/MvcShipping/Controllers/RptOpReceiptController.cs

43 lines
1.6 KiB
C#

3 years ago
using System;
using System.Linq;
using System.Web.Mvc;
using DSWeb.MvcShipping.DAL.RptOpReceiptDAL;
using DSWeb.MvcShipping.Models.RptOpReceiptEntity;
using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Comm.Cookie;
using DSWeb.Areas.CommMng.DAL;
using System.Collections.Generic;
using HcUtility.Comm;
using HcUtility.Core;
namespace DSWeb.MvcShipping.Controllers
{
[JsonRequestBehavior]
public class RptOpReceiptController : Controller
{
public ActionResult RptOpReceiptIndex()
{
return View();
}
//查询
public ContentResult GetDataList(int start, int limit, string sort, string condition)
{
var dataList = RptOpReceiptDAL.GetDataList(condition, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]), CookieConfig.GetCookie_UserCode(Request), CookieConfig.GetCookie_OrgCode(Request), 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 Delete_Main(string gids)
{
DBResult result = RptOpReceiptDAL.Delete_Main(gids, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
//
}
}