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
{
///
/// 应用数据获取对象
/// 创建者:李炳海
/// 创建日期:2013.4.8
///
public class AppDataGeter : IDataGeter
{
#region 获取基础数据列表
///
/// 获取基础数据列表
///
/// 数据类别
///
public IList GetList(string kind, NameValueCollection ps)
{
IList list = new List();
return list;
}
///
/// 获取基础数据列表
///
/// 数据类别
///
public IList GetList(string kind, params string[] ps)
{
IList list = new List();
switch (kind.ToLower())
{
case "userlist":
List users = null;
QMAPP.ServicesAgent.ServiceAgent agent = new QController().GetServiceAgent();
users = agent.InvokeServiceFunction>("UserManageBLL_GetAllUser",new User());
list=users.Select(t => new QListItem { id = t.UserID, code = t.LoginUserID, text = t.UserName }).ToList();
break;
case "organlist":
List organs = new QController().GetServiceAgent().InvokeServiceFunction>("UserManageBLL_GetUserOrgaList", "");
list = organs.Select(t => new QListItem { id = t.OrgaID, code = t.OrgaDESC, text = t.OrgaDESC }).ToList();
break;
default:
list = new List();
break;
}
return list;
}
#endregion
#region 获取数据源地址
///
/// 获取数据源地址
///
/// dataKind
/// 数据源地址
public string GetDataUrl(string dataKind)
{
string strUrl = "";
switch (dataKind.ToLower())
{
default:
strUrl = "/PerceptText/GetPerceptData?kind=" + dataKind;
break;
}
return strUrl;
}
#endregion
#region 获取选择页面地址
///
/// 获取选择页面地址
///
/// dataKind
/// 选择页面地址
public string GetSelectUrl(string dataKind)
{
return "";
}
#endregion
}
}