天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
2.6 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMFrameWork.WebUI.Attribute;
using QMAPP.Web.Models.Sys;
using QMFrameWork.Data;
using QMAPP.Entity.Sys;
using QMAPP.Common.Web;
using QMAPP.Common.Web.Util;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.DataSource;
using QMAPP.ServicesAgent;
using QMFrameWork.Common.Serialization;
namespace QMAPP.Web.Controllers
{
/// <summary>
/// 支持交互参数设置
/// 创建人:wangyf
/// 创建时间:2015.03.30
/// </summary>
[SessionState(System.Web.SessionState.SessionStateBehavior.ReadOnly)]
public class SIParamSetController : QController
{
#region 支持交互参数设置
/// <summary>
/// 支持交互参数设置
/// </summary>
/// <returns></returns>
public ActionResult SIParamSetList(SIParamSetModel siParamSet)
{
SIParamSet entity = new SIParamSet();
try
{
QMAPP.ServicesAgent.ServiceAgent agent = this.GetServiceAgent();
entity = agent.InvokeServiceFunction<SIParamSet>("SIParamSetBLL_Get", entity);
siParamSet = CopyToModel<SIParamSetModel, SIParamSet>(entity);
return View(siParamSet);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存支持交互参数设置
/// <summary>
/// 保存支持交互参数设置
/// </summary>
/// <returns></returns>
public ActionResult SaveSIParamSet(SIParamSetModel siParamSet)
{
SIParamSet entity = null;
bool returnBool = false;
int count = 0;
try
{
entity = CopyToModel<SIParamSet, SIParamSetModel>(siParamSet);
QMAPP.ServicesAgent.ServiceAgent agent = this.GetServiceAgent();
if (string.IsNullOrEmpty(siParamSet.ID))
{
count = agent.InvokeServiceFunction<int>("SIParamSetBLL_SaveSIParamSet", entity);
}
else
{
count = agent.InvokeServiceFunction<int>("SIParamSetBLL_UpdateSIParamSet", entity);
}
if (count > 0)
{
returnBool = true;
}
return Json(returnBool);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}