Exemplo n.º 1
0
 protected override MDataTable Select(GridConfig.SelectType st)
 {
     if (ObjName == "V_WF_Task")
     {
         TaskInstance task = WF.Table.TaskInstance;
         if (task.BaseInfo.DataBaseType == DataBaseType.Txt || task.BaseInfo.DataBaseType == DataBaseType.Xml)
         {
             MDataTable dt;
             string where = GetWhere();
             string orderBy = GetOrderBy(task.BaseInfo.MDataColumn.FirstPrimary.ColumnName);
             dt            = task.Select <MDataRow>();
             dt.JoinOnName = "InstanceID";
             dt            = dt.Join("WF_Instance", "InstanceID", "SheetID,InstanceTitle,InstanceState,StartTime,CreatorID,CreatorFullName");
             dt.JoinOnName = "AppID";
             dt            = dt.Join("WF_App", "AppID", "AppName");
             return(dt.Select(PageIndex, PageSize, GetWhere() + orderBy, GridConfig.GetSelectColumns(ObjName, st)));
         }
     }
     return(base.Select(st));
 }
Exemplo n.º 2
0
 protected override MDataTable Select(GridConfig.SelectType st)
 {
     switch (ObjName)
     {
     case "V_Test":    //处理Demo中文本数据库
         if (AppConfig.DB.DefaultDalType == DalType.Txt)
         {
             MDataTable dt = null;
             using (MAction action = new MAction("Demo_TestA"))
             {
                 dt = action.Select();
             }
             dt.JoinOnName = "ID";
             MDataTable joinDt = dt.Join("Demo_TestA", "ID");
             return(joinDt.Select(PageIndex, PageSize, GetWhere() + GetOrderBy("ID"), GridConfig.GetSelectColumns(ObjName, st)));
         }
         break;
     }
     return(base.Select(st));
 }
Exemplo n.º 3
0
        public MDataTable GetUserList(GridConfig.SelectType st)
        {
            MDataTable dt = null;

            using (MAction action = new MAction(TableNames.Sys_User))
            {
                dt = action.Select();
            }
            dt.JoinOnName = Sys_User.UserID.ToString();
            MDataTable joinDt = dt.Join(TableNames.Sys_UserInfo, Sys_UserInfo.UserInfoID.ToString());

            return(joinDt.Select(PageIndex, PageSize, GetWhere() + GetOrderBy(Sys_User.UserID.ToString()), GridConfig.GetSelectColumns(ObjName, st)));
        }
Exemplo n.º 4
0
 protected override MDataTable Select(GridConfig.SelectType st)
 {
     switch (ObjName)
     {
     case "V_Test":    //处理Demo中文本数据库
         MDataTable dt = null;
         using (MAction action = new MAction(CrossDb.GetEnum("Demo_TestA")))
         {
             dt = action.Select();
         }
         dt.JoinOnName = "id";
         MDataTable joinDt = dt.Join("Demo_TestB", "id");
         return(joinDt.Select(PageIndex, PageSize, GetWhere() + GetOrderBy("id"), GridConfig.GetSelectColumns(ObjName, st)));
     }
     return(base.Select(st));
 }