ab56a9bcf7
SVN-Revision: r240
67 lines
2.4 KiB
C#
67 lines
2.4 KiB
C#
using Lskj.Business.Impl;
|
|
using Lskj.Control;
|
|
using Lskj.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Lskj.PubArtworkDynamic
|
|
{
|
|
public class ViewModel
|
|
{
|
|
/// <summary>
|
|
/// 动态链接Model
|
|
/// </summary>
|
|
public DynamicDllModel SysModel { get; set; }
|
|
/// <summary>
|
|
/// 主模块类
|
|
/// </summary>
|
|
public ModuleModel MoudleMainObj { get; set; }
|
|
/// <summary>
|
|
/// 左侧页签明细数据
|
|
/// </summary>
|
|
public List<DataRow> LeftDetailRows { get; set; }
|
|
/// <summary>
|
|
/// 右侧页签明细数据
|
|
/// </summary>
|
|
public List<DataRow> RightDetailRows { get; set; }
|
|
/// <summary>
|
|
/// 左侧页签
|
|
/// </summary>
|
|
public TabControlEx LeftTabControl { get; set; }
|
|
/// <summary>
|
|
/// 右侧页签
|
|
/// </summary>
|
|
public TabControlEx RightTabControl { get; set; }
|
|
/// <summary>
|
|
/// 底部左侧表格
|
|
/// </summary>
|
|
public GridControlEx BottomLeftGridEx { get; set; }
|
|
/// <summary>
|
|
/// 底部右侧表格
|
|
/// </summary>
|
|
public GridControlEx BottomRightGridEx { get; set; }
|
|
/// <summary>
|
|
/// 初始化ViewModel
|
|
/// </summary>
|
|
/// <param name="_sysModel"></param>
|
|
public ViewModel(DynamicDllModel _sysModel)
|
|
{
|
|
SysModel = _sysModel;
|
|
if (SysModel != null && !string.IsNullOrEmpty(SysModel.ModuleCode))
|
|
{
|
|
MoudleMainObj = new ModuleModel(MainImpl.GetSystemdllTab(SysModel.ModuleCode));//获取主模块构建类
|
|
MoudleMainObj.ParmaryKey = BaseImpl.GetBasePrimaryKey(SysModel.ModuleCode);
|
|
DataTable moduleDetailTable = BaseModuleImpl.GetBaseDetailPages(SysModel.ModuleCode);//获取所有主表配置明细
|
|
if (moduleDetailTable != null)
|
|
{
|
|
LeftDetailRows = moduleDetailTable.Rows.Cast<DataRow>().Where(n => Convert.ToInt32(n["orderId"] + "") >= 0).OrderBy(n => Convert.ToInt32(n["orderId"] + "")).ToList();
|
|
RightDetailRows = moduleDetailTable.Rows.Cast<DataRow>().Where(n => Convert.ToInt32(n["orderId"] + "") < 0).OrderByDescending(n => Convert.ToInt32(n["orderId"] + "")).ToList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|