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.

77 lines
3.9 KiB
C#

using System;
using System.Linq;
using System.Web.Mvc;
using DSWeb.MvcShipping.DAL.RptCwVouchersGlDAL;
using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Comm.Cookie;
using HcUtility.Comm;
using HcUtility.Core;
using System.Collections.Generic;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using DSWeb.EntityDA;
namespace DSWeb.MvcShipping.Controllers
{
[JsonRequestBehavior]
public class RptCwVouchersGlController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Edit()
{
return View();
}
public ContentResult GetDataList(int start, int limit, string sort, string condition, string strCbZKM, string VOUDATEbgn)
{
if (Convert.ToString(Session["COMPANYID"]).Trim() == "" || Convert.ToString(Session["USERID"]).Trim() == "" || Convert.ToString(Session["CODENAME"]).Trim() == "" || Convert.ToString(Session["SHOWNAME"]).Trim() == "" || Convert.ToString(Session["DEPTNAME"]).Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
var dataList = RptCwVouchersGlDAL.GetDataList(condition, strCbZKM, VOUDATEbgn, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]), 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 GetDataListStr(string condition, string strCbZKM, string VOUDATEbgn)
{
if (Convert.ToString(Session["COMPANYID"]).Trim() == "" || Convert.ToString(Session["USERID"]).Trim() == "" || Convert.ToString(Session["CODENAME"]).Trim() == "" || Convert.ToString(Session["SHOWNAME"]).Trim() == "" || Convert.ToString(Session["DEPTNAME"]).Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
//
var dataListStr = RptCwVouchersGlDAL.GetDataListStr(condition, strCbZKM, VOUDATEbgn, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataListStr });
return new ContentResult() { Content = json };
}
public ContentResult GetDataSumList(string condition, string strCbZKM, string VOUDATEbgn)
{
var dataList = RptCwVouchersGlDAL.GetDataSumList(condition, strCbZKM, VOUDATEbgn, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult GetData()
{
var strACCDATE = RptCwVouchersGlDAL.GetData(Convert.ToString(Session["USERID"]));
var json = JsonConvert.Serialize(new { Success = true, Message = "操作成功!", data = strACCDATE });
return new ContentResult() { Content = json };
}
public ContentResult getlbTitle(string condition, string strCbZKM, string VOUDATEbgn)
{
var strlbTitle = RptCwVouchersGlDAL.getlbTitle(condition, strCbZKM, VOUDATEbgn, Convert.ToString(Session["USERID"]));
var json = JsonConvert.Serialize(new { Success = true, Message = "操作成功!", data = strlbTitle });
return new ContentResult() { Content = json };
}
}
}