/// <summary> /// 初始化评价列表 /// </summary> private void InitMsgGrid() { try { List <DevColHeads> Heads = new List <DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "PID"; col.DataType = "System.String"; col.AllowSize = true; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价日期"; col.FieldName = "MsgDate"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 66; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价内容"; col.FieldName = "MsgContent"; col.DataType = "System.String"; col.ColWidth = 240; col.AllowSize = true; col.EditStyle = enum_RespEditType.MemoEdit; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价人"; col.FieldName = "MsgUser"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 54; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价人等级"; col.FieldName = "MsgUserLevel"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 54; Heads.Add(col); _msgsView.ShowMainTool = false; _msgsView.ShowPageToolBar = false; //_msgsView.RowAutoHeight = true; //_msgsView.ModelView = enum_ModelView.Card; //_msgsView.ColumnWidthChanged += _msgsView.InitGrid(Heads); //_productView.ContextMenuStrip = menus; //_productView.AddCondition("[LvlId]=0", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _msgsView.Dock = DockStyle.Fill; //_msgsView.ContextMenuStrip = contextMenuStrip1; groupControl3.Controls.Add(_msgsView); } catch (Exception ex) { //OtCom.XLogErr("LogView-> InitGrid()方法:{0}", ex.Message); throw new Exception(ex.Message, ex); } }
private void InitGrid() { try { List <DevColHeads> Heads = new List <DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "RID"; col.DataType = "System.Int64"; col.ColWidth = 50; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "询价日期"; col.FieldName = "PriceTime"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 100; Heads.Add(col); col = new DevColHeads(); col.HeadName = "价格"; col.FieldName = "Price"; col.DataType = "System.Double"; col.ColWidth = 30; col.AllowSize = true; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "类型"; col.FieldName = "PriceType"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 80; Heads.Add(col); _pricesView.ShowMainTool = false; _pricesView.ShowPageToolBar = false; _pricesView.InitGrid(Heads); //_productView.ContextMenuStrip = menus; //_productView.AddCondition("[LvlId]=0", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _pricesView.Dock = DockStyle.Fill; _pricesView.ContextMenuStrip = contextMenuStrip1; panelHisPrice.Controls.Add(_pricesView); } catch (Exception ex) { //OtCom.XLogErr("LogView-> InitGrid()方法:{0}", ex.Message); throw new Exception(ex.Message, ex); } }
/// <summary> /// 初始化评价列表 /// </summary> private void InitMsgGrid() { try { List<DevColHeads> Heads = new List<DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "PID"; col.DataType = "System.String"; col.AllowSize = true; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价日期"; col.FieldName = "MsgDate"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 66; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价内容"; col.FieldName = "MsgContent"; col.DataType = "System.String"; col.ColWidth = 240; col.AllowSize = true; col.EditStyle = enum_RespEditType.MemoEdit; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价人"; col.FieldName = "MsgUser"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 54; Heads.Add(col); col = new DevColHeads(); col.HeadName = "评价人等级"; col.FieldName = "MsgUserLevel"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 54; Heads.Add(col); _msgsView.ShowMainTool = false; _msgsView.ShowPageToolBar = false; //_msgsView.RowAutoHeight = true; //_msgsView.ModelView = enum_ModelView.Card; //_msgsView.ColumnWidthChanged += _msgsView.InitGrid(Heads); //_productView.ContextMenuStrip = menus; //_productView.AddCondition("[LvlId]=0", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _msgsView.Dock = DockStyle.Fill; //_msgsView.ContextMenuStrip = contextMenuStrip1; groupControl3.Controls.Add(_msgsView); } catch (Exception ex) { //OtCom.XLogErr("LogView-> InitGrid()方法:{0}", ex.Message); throw new Exception(ex.Message, ex); } }
private void InitGrid() { try { List<DevColHeads> Heads = new List<DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "RID"; col.DataType = "System.Int64"; col.ColWidth = 50; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "询价日期"; col.FieldName = "PriceTime"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 100; Heads.Add(col); col = new DevColHeads(); col.HeadName = "价格"; col.FieldName = "Price"; col.DataType = "System.Double"; col.ColWidth = 30; col.AllowSize = true; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "类型"; col.FieldName = "PriceType"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 80; Heads.Add(col); _pricesView.ShowMainTool = false; _pricesView.ShowPageToolBar = false; _pricesView.InitGrid(Heads); //_productView.ContextMenuStrip = menus; //_productView.AddCondition("[LvlId]=0", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _pricesView.Dock = DockStyle.Fill; _pricesView.ContextMenuStrip = contextMenuStrip1; panelHisPrice.Controls.Add(_pricesView); } catch (Exception ex) { //OtCom.XLogErr("LogView-> InitGrid()方法:{0}", ex.Message); throw new Exception(ex.Message, ex); } }
/// <summary> /// 初始化Grid /// </summary> private void InitDataGrid() { try { List<DevColHeads> Heads = new List<DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "RID"; col.DataType = "System.String"; col.ColWidth = 50; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品编号"; col.FieldName = "ProductID"; col.DataType = "System.String"; col.ColWidth = 36; col.AllowSize = true; col.IsShow = false; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品名称"; col.FieldName = "ProductName"; col.DataType = "System.String"; col.ColWidth = 200; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品归属"; col.FieldName = "ProductAttach"; col.DataType = "System.String"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "历史底价"; col.FieldName = "ProductBasePrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "来源"; col.FieldName = "ProductPriceType"; col.DataType = "System.String"; col.ColWidth = 10; col.IsShow = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "网站价格"; col.FieldName = "ProductPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "手机价格"; col.FieldName = "ProductMobilePrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "QQ价格"; col.FieldName = "ProductQQPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "微信价格"; col.FieldName = "ProductWXPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "价格趋势"; col.FieldName = "ProductPriceTrend"; col.DataType = "System.String"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品库存"; col.FieldName = "ProductIsSaled"; col.DataType = "System.Int32"; col.ColWidth = 30; col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品库存"; col.FieldName = "ProductStock"; col.DataType = "System.String"; col.ColWidth = 30; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "优惠信息"; col.FieldName = "ProductPromoMsg"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 120; Heads.Add(col); col = new DevColHeads(); col.HeadName = "购物券"; col.FieldName = "ProductCoupon"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 60; Heads.Add(col); col = new DevColHeads(); col.HeadName = "询价日期"; col.FieldName = "ProductPriceDate"; col.DataType = "System.DateTime"; col.ColWidth = 30; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "差评率"; col.FieldName = "ProductPoorRate"; col.AllowSize = true; col.DataType = "System.Double"; col.IsShow = false; col.ColWidth = 20; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品分类"; col.FieldName = "TypeName"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 20; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商店编号"; col.FieldName = "VenderId"; col.DataType = "System.String"; col.AllowSize = true; col.IsShow = false; Heads.Add(col); col = new DevColHeads(); col.HeadName = "配送区域"; col.FieldName = "Catalog"; col.DataType = "System.String"; col.AllowSize = true; col.IsShow = false; Heads.Add(col); _productView.ShowMainTool = false; _productView.ShowRowHeader = true; _productView.ShowColumHeader = true; _productView.ShowPageToolBar = true; _productView.ShowWaitMsg = true; _productView.IsCheck = true; _productView.InitGrid(Heads); _productView.ContextMenuStrip = contextMenus; //整行颜色改变 //_productView.AddCondition("[ProductIsSaled]=0", Color.IndianRed); //_productView.AddCondition("[ProductIsSaled]=-1", Color.LightGray); //_productView.AddCondition("[ProductStock]='无货'", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _productView.GridClick += _productView_GridClick; _productView.GridDBClick += new OtDevGridView.GridDBClickHandler(_productView_GridDBClick); (_productView.GetGrid() as GridView).RowCellStyle += new RowCellStyleEventHandler(_productView_RowCellStyle); (_productView.GetGrid() as GridView).FocusedRowChanged += FrmMain_FocusedRowChanged; _productView.CanDragRow = true; } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
/// <summary> /// 初始化Grid /// </summary> private void InitDataGrid() { try { List <DevColHeads> Heads = new List <DevColHeads>(); DevColHeads col = new DevColHeads(); col.HeadName = "编号"; col.IsShow = false; col.FieldName = "RID"; col.DataType = "System.String"; col.ColWidth = 50; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品编号"; col.FieldName = "ProductID"; col.DataType = "System.String"; col.ColWidth = 36; col.AllowSize = true; col.IsShow = false; col.IsIDtag = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品名称"; col.FieldName = "ProductName"; col.DataType = "System.String"; col.ColWidth = 200; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品归属"; col.FieldName = "ProductAttach"; col.DataType = "System.String"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "历史底价"; col.FieldName = "ProductBasePrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "来源"; col.FieldName = "ProductPriceType"; col.DataType = "System.String"; col.ColWidth = 10; col.IsShow = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "网站价格"; col.FieldName = "ProductPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "手机价格"; col.FieldName = "ProductMobilePrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "QQ价格"; col.FieldName = "ProductQQPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "微信价格"; col.FieldName = "ProductWXPrice"; col.DataType = "System.Double"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "价格趋势"; col.FieldName = "ProductPriceTrend"; col.DataType = "System.String"; col.ColWidth = 25; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品库存"; col.FieldName = "ProductIsSaled"; col.DataType = "System.Int32"; col.ColWidth = 30; col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品库存"; col.FieldName = "ProductStock"; col.DataType = "System.String"; col.ColWidth = 30; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "优惠信息"; col.FieldName = "ProductPromoMsg"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 120; Heads.Add(col); col = new DevColHeads(); col.HeadName = "购物券"; col.FieldName = "ProductCoupon"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 60; Heads.Add(col); col = new DevColHeads(); col.HeadName = "询价日期"; col.FieldName = "ProductPriceDate"; col.DataType = "System.DateTime"; col.ColWidth = 30; //col.IsShow = false; col.AllowSize = true; Heads.Add(col); col = new DevColHeads(); col.HeadName = "差评率"; col.FieldName = "ProductPoorRate"; col.AllowSize = true; col.DataType = "System.Double"; col.IsShow = false; col.ColWidth = 20; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商品分类"; col.FieldName = "TypeName"; col.DataType = "System.String"; col.AllowSize = true; col.ColWidth = 20; Heads.Add(col); col = new DevColHeads(); col.HeadName = "商店编号"; col.FieldName = "VenderId"; col.DataType = "System.String"; col.AllowSize = true; col.IsShow = false; Heads.Add(col); col = new DevColHeads(); col.HeadName = "配送区域"; col.FieldName = "Catalog"; col.DataType = "System.String"; col.AllowSize = true; col.IsShow = false; Heads.Add(col); _productView.ShowMainTool = false; _productView.ShowRowHeader = true; _productView.ShowColumHeader = true; _productView.ShowPageToolBar = true; _productView.ShowWaitMsg = true; _productView.IsCheck = true; _productView.InitGrid(Heads); _productView.ContextMenuStrip = contextMenus; //整行颜色改变 //_productView.AddCondition("[ProductIsSaled]=0", Color.IndianRed); //_productView.AddCondition("[ProductIsSaled]=-1", Color.LightGray); //_productView.AddCondition("[ProductStock]='无货'", GetColor(OtCom.GetConstCfg("Log_NormalColor", "-1"))); //_productView.AddCondition("[LvlId]=1", GetColor(OtCom.GetConstCfg("Log_TipColor", "-1"))); //_productView.AddCondition("[LvlId]=2", GetColor(OtCom.GetConstCfg("Log_ErrorColor", "-1"))); //_productView.AddCondition("[LvlId]=3", GetColor(OtCom.GetConstCfg("Log_WarningColor", "-1"))); //_productView.AddCondition("[LvlId]=4", GetColor(OtCom.GetConstCfg("Log_DebugColor", "-1"))); _productView.GridClick += _productView_GridClick; _productView.GridDBClick += new OtDevGridView.GridDBClickHandler(_productView_GridDBClick); (_productView.GetGrid() as GridView).RowCellStyle += new RowCellStyleEventHandler(_productView_RowCellStyle); (_productView.GetGrid() as GridView).FocusedRowChanged += FrmMain_FocusedRowChanged; _productView.CanDragRow = true; } catch (Exception ex) { throw new Exception(ex.Message, ex); } }