天津投入产出系统后端
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.
 
 
 
 
 
 

102 lines
3.1 KiB

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMFrameWork.WebUI.DataSource;
using QMAPP.ServicesAgent.CenterGeneralService;
using QMAPP.Entity.Sys;
using QMAPP.Common.Web.Controllers;
namespace QMAPP.Common.Web
{
/// <summary>
/// 应用数据获取对象
/// 创建者:李炳海
/// 创建日期:2013.4.8
/// </summary>
public class AppDataGeter : IDataGeter
{
#region 获取基础数据列表
/// <summary>
/// 获取基础数据列表
/// </summary>
/// <param name="kind">数据类别</param>
/// <returns></returns>
public IList<QListItem> GetList(string kind, NameValueCollection ps)
{
IList<QListItem> list = new List<QListItem>();
return list;
}
/// <summary>
/// 获取基础数据列表
/// </summary>
/// <param name="kind">数据类别</param>
/// <returns></returns>
public IList<QListItem> GetList(string kind, params string[] ps)
{
IList<QListItem> list = new List<QListItem>();
switch (kind.ToLower())
{
case "userlist":
List<User> users = null;
QMAPP.ServicesAgent.ServiceAgent agent = new QController().GetServiceAgent();
users = agent.InvokeServiceFunction<List<User>>("UserManageBLL_GetAllUser",new User());
list=users.Select(t => new QListItem { id = t.UserID, code = t.LoginUserID, text = t.UserName }).ToList();
break;
case "organlist":
List<Orgaization> organs = new QController().GetServiceAgent().InvokeServiceFunction<List<Orgaization>>("UserManageBLL_GetUserOrgaList", "");
list = organs.Select(t => new QListItem { id = t.OrgaID, code = t.OrgaDESC, text = t.OrgaDESC }).ToList();
break;
default:
list = new List<QListItem>();
break;
}
return list;
}
#endregion
#region 获取数据源地址
/// <summary>
/// 获取数据源地址
/// </summary>
/// <param name="数据类别">dataKind</param>
/// <returns>数据源地址</returns>
public string GetDataUrl(string dataKind)
{
string strUrl = "";
switch (dataKind.ToLower())
{
default:
strUrl = "/PerceptText/GetPerceptData?kind=" + dataKind;
break;
}
return strUrl;
}
#endregion
#region 获取选择页面地址
/// <summary>
/// 获取选择页面地址
/// </summary>
/// <param name="数据类别">dataKind</param>
/// <returns>选择页面地址</returns>
public string GetSelectUrl(string dataKind)
{
return "";
}
#endregion
}
}