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/MsTempletController.cs

140 lines
4.7 KiB
C#

2 years ago
using System;
using System.Data;
using System.Linq;
using System.Web.Mvc;
using DSWeb.Areas.MvcShipping.DAL;
using DSWeb.MvcShipping.Models.MsUserMsgSet;
using DSWeb.MvcShipping.Models.MsTemplet;
using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Comm.Cookie;
using System.Collections.Generic;
using HcUtility.Comm;
using HcUtility.Core;
using DSWeb.TruckMng.Helper.Repository;
namespace DSWeb.MvcShipping.Controllers
{
[JsonRequestBehavior]
public class MsTempletController : Controller
{
//
// GET: /
public ActionResult LayShow1()
{
return View();
}
//
// GET: /
public ActionResult LayShow2()
{
return View();
}
//
// GET: /
public ActionResult LayShow4()
{
return View();
}
//
// GET: /
public ActionResult LayShow5()
{
return View();
}
//
// GET: /
public ActionResult LayShow6()
{
return View();
}
//
// GET:
public ActionResult Index()
{
return View();
}
//
// GET: /
public ActionResult Edit()
{
return View();
}
public ContentResult GetLayShowList(string id, string companyid, string templetid)
{
var dataList = MsTempletDAL.GetMemcachedList(id, Session["CODENAME"].ToString(), companyid, Session["USERID"].ToString(), templetid);//url,
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Rows.Count, data = dataList });
return new ContentResult() { Content = json };//
}
public ContentResult GetModuleName(string url)
{
string data = MsTempletDAL.GetModuleName(url);
string[] dataArr = data.Split('|');
List<Module> _modList = new List<Module>();
Module _mod = new Module();
_mod.Gid = dataArr[0];
_mod.ModuleName = dataArr[1];
_mod.ModuleDescription = dataArr[2];
_modList.Add(_mod);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = _modList.Count, data = _modList.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult ReadPageStructure(string url, string id, int param)
{
var dataList = MsTempletDAL.ReadPageStructure(url, id, Session["USERID"].ToString(), param);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult GetCount(string id, string templetid)
{
//return null;
DataTable dt = MsTempletDAL.GetMemcachedValue(id, Session["CODENAME"].ToString(), Session["COMPANYID"].ToString(), Session["USERID"].ToString(), templetid);
int count = 0;// int.Parse(dt.Rows[0][0].ToString());
if (dt != null)
{
count = int.Parse(dt.Rows[0][0].ToString());
}
//DataTable dt = MsTempletDAL.GetMemcachedValue(id, Session["COMPANYID"].ToString(), Session["USERID"].ToString(), templetid);
//int count = int.Parse(dt.Rows[0][0].ToString());
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = count });
return new ContentResult() { Content = json };
}
public ContentResult GetCountImmediately(string id, string templetid)
{
DataTable dt = MsTempletDAL.GetMemcachedValueImmediately(id, Session["CODENAME"].ToString(), Session["COMPANYID"].ToString(), Session["USERID"].ToString(), templetid);
int count = 0;//int.Parse(dt.Rows[0][0].ToString());
if (dt != null)
{
count = int.Parse(dt.Rows[0][0].ToString());
}
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = count });
return new ContentResult() { Content = json };
}
public ContentResult GetLinkInfo(string id, string templetid) {
var data = MsTempletDAL.GetLinkInfo(id, templetid);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = data.Count, data = data.ToList() });
return new ContentResult() { Content = json };
}
#region 参照部分
#endregion
}
}