Ejemplo n.º 1
0
        private void SetInterfaceHisMasterDataSource(int pageSize)
        {
            Expression <Func <TL_OPER, dynamic> > select =
                c =>
                new
            {
                c.UID,
                工号   = c.OperCode,
                操作员  = c.OperName,
                日志时间 = c.LogTime,
                日志类型 = c.LogType,
                主机名称 = c.LogSite,
                日志信息 = c.Message
            };

            Expression <Func <TL_OPER, bool> > where = c => true;
            Expression <Func <TL_OPER, long> > order = c => c.UID;

            int total;

            grid.MasterDataSource = EniitiesHelper.GetPagedDataAsc(_db,
                                                                   select,
                                                                   where,
                                                                   order,
                                                                   grid.PageIndex, grid.PageSize, out total);
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }
Ejemplo n.º 2
0
        private void SetInterfaceHisMasterDataSource(int pageSize)
        {
            Expression <Func <TL_BASEDATA, dynamic> > select =
                c =>
                new
            {
                c.UID,
                操作员  = c.OperName,
                日志时间 = c.LogTime,
                操作类型 = c.LogType,
                数据类型 = c.DataType,
                原值   = c.OldValue,
                新值   = c.NewValue,
                备注   = c.Remark,
            };

            Expression <Func <TL_BASEDATA, bool> > where = c => true;
            Expression <Func <TL_BASEDATA, long> > order = c => c.UID;

            int total;

            grid.MasterDataSource = EniitiesHelper.GetPagedDataAsc(_db,
                                                                   select,
                                                                   where,
                                                                   order,
                                                                   grid.PageIndex, grid.PageSize, out total);
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }
Ejemplo n.º 3
0
        private void SetStockDetailMasterDataSource(int pageSize)
        {
            Expression <Func <TS_STOCK_DETAIL, dynamic> > select = c => c;
            Expression <Func <TS_STOCK_DETAIL, bool> >    @where = c => true;
            Expression <Func <TS_STOCK_DETAIL, long> >    order  = c => c.UID;
            var grid = gridStockDetail;
            int total;

            grid.MasterDataSource = EniitiesHelper.GetPagedDataAsc(_db,
                                                                   select,
                                                                   where,
                                                                   order,
                                                                   grid.PageIndex, grid.PageSize, out total);
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }
Ejemplo n.º 4
0
        private void SetInterfaceMasterDataSource(int pageSize)
        {
            Expression <Func <TL_INTERFACE, dynamic> > select =
                c =>
                new
            {
                c.UID,
                接口类型 = c.InterfaceType,
                接口文本 = c.InterfaceString,
                状态   = c.State,
                备注   = c.Remark,
                创建时间 = c.CreateTime,
                执行时间 = c.ProcessTime,
                效日期  = c.BillNum,
                单据类型 = c.BillType,
            };

            Expression <Func <TL_INTERFACE, bool> > where = c => true;
            Expression <Func <TL_INTERFACE, long> > order = c => c.UID;

            int total;
            var grid = gridInterface;
            var list = EniitiesHelper.GetPagedDataAsc(_db,
                                                      select,
                                                      where,
                                                      order,
                                                      grid.PageIndex, grid.PageSize, out total);

            grid.MasterDataSource = list.Count > 0 ? list :null;
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }
Ejemplo n.º 5
0
        private void SetInterfaceHisMasterDataSource(int pageSize)
        {
            Expression <Func <TL_TRANSACTION, dynamic> > select =
                c =>
                new
            {
                c.UID,
                操作员  = c.OperName,
                日志时间 = c.LogTime,
                单据编号 = c.BillNum,
                单据类型 = c.BillType,
                零件号  = c.PartCode,
                批次   = c.Batch,
                数量   = c.Qty,
                库位   = c.LocCode,
                备注   = c.Remark,
            };

            Expression <Func <TL_TRANSACTION, bool> > where = c => true;
            Expression <Func <TL_TRANSACTION, long> > order = c => c.UID;

            int total;

            grid.MasterDataSource = EniitiesHelper.GetPagedDataAsc(_db,
                                                                   select,
                                                                   where,
                                                                   order,
                                                                   grid.PageIndex, grid.PageSize, out total);
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }
Ejemplo n.º 6
0
        private void SetStockMasterDataSource(int pageSize)
        {
            Expression <Func <VS_STOCK, dynamic> > select = c => c;

            Expression <Func <VS_STOCK, bool> > where;
            where = c => true;
            Expression <Func <VS_STOCK, string> > order = c => c.PartCode;
            var grid = gridStock;
            int total;

            grid.MasterDataSource = EniitiesHelper.GetPagedDataAsc(_db,
                                                                   select,
                                                                   where,
                                                                   order,
                                                                   grid.PageIndex, grid.PageSize, out total);
            if (grid.Total != total)
            {
                grid.Total = total;
            }
            if (grid.PageSize != pageSize)
            {
                grid.PageSize = pageSize;
            }
        }