Пример #1
0
        public void onCreateComponet()
        {
            gridhelper = new GridControlHelper(this.gridView1, this.gridControl1);
            builder    = new TB_TechniqueLogBuilder2();
            adapter    = new TB_TechniqueLogAdapter2();
            adapter.Initial(builder);

            gridhelper.GridControl.DataSource = builder.CreateDataTable();
            gridhelper.SetAllColumnEditable(false);
            gridhelper.SetColunmOption(builder.ID, false, false);
            gridhelper.SetColunmOption(builder.MissionID, false, false);
            gridhelper.SetColunmOption(builder.Op_Delete, false, false);
            gridhelper.SetColunmOption(builder.Op_Edit, false, false);
            gridhelper.SetColunmOption(builder.IsNeedTidy, false, false);
            gridhelper.SetColunmOption(builder.ReViewCount, false, true);
            gridhelper.SetColMaxWidth(builder.Date, 100);
            gridhelper.SetColMaxWidth(builder.Op_ReviewAdd, 100);
            gridhelper.SetColMaxWidth(builder.Op_ReviewReduce, 100);
            gridhelper.SetColMaxWidth(builder.ReViewCount, 100);

            gridhelper.SetCellResposity(builder.Op_ReviewAdd, repo_HLE_reviewadd);
            gridhelper.SetCellResposity(builder.Op_ReviewReduce, repo_HLE_reviewReduce);
            gridhelper.SetCellResposity(builder.LogUrl, repo_HLE_goto);

            controller = new TechniqueLogController();
        }
Пример #2
0
        public void onCreateComponet()
        {
            adapter_Log = new TB_TechniqueLogAdapter2();
            builder_Log = new TB_TechniqueLogBuilder2();
            adapter_Log.Initial(builder_Log);

            this.gridControl1.DataSource = builder_Log.CreateDataTable();

            GridBand band_Date = new GridBand()
            {
                Caption = "日期"
            };
            GridBand band_Info = new GridBand()
            {
                Caption = "信息"
            };
            GridBand band_Op = new GridBand()
            {
                Caption = "操作"
            };
            GridBand band_ID = new GridBand()
            {
                Caption = "ID", Visible = false
            };

            this.advBandedGridView1.Bands.Clear();
            this.advBandedGridView1.Bands.AddRange(new GridBand[] { band_ID, band_Date, band_Info, band_Op });


            BandedGridColumn col_Date = new BandedGridColumn {
                FieldName = builder_Log.UpdateDate, Visible = true
            };
            BandedGridColumn col_Context = new BandedGridColumn {
                FieldName = builder_Log.Context, Visible = true
            };
            BandedGridColumn col_Url = new BandedGridColumn {
                FieldName = builder_Log.LogUrl, Visible = true
            };
            BandedGridColumn col_Op_ReviewAdd = new BandedGridColumn {
                FieldName = builder_Log.Op_ReviewAdd, Visible = true
            };
            BandedGridColumn col_Op_ReviewReduce = new BandedGridColumn {
                FieldName = builder_Log.Op_ReviewReduce, Visible = true
            };
            BandedGridColumn col_ID = new BandedGridColumn {
                FieldName = builder_Log.ID, Visible = false
            };

            UpdateColumnOption(col_Date, band_Date, false, true, 0);
            UpdateColumnOption(col_Context, band_Info, false, false, 0);
            UpdateColumnOption(col_Url, band_Info, false, false, 1);
            UpdateColumnOption(col_Op_ReviewAdd, band_Op, false, true, 0);
            UpdateColumnOption(col_Op_ReviewReduce, band_Op, false, true, 1);
            UpdateColumnOption(col_ID, band_ID, false, true, 0);

            advBandedGridView1.OptionsView.ColumnAutoWidth = true;
            advBandedGridView1.OptionsView.ShowBands       = false;
            advBandedGridView1.RowHeight = 35;
            advBandedGridView1.OptionsView.ShowColumnHeaders = false;
            band_Date.OptionsBand.FixedWidth = true;
            band_Op.OptionsBand.FixedWidth   = true;

            this.advBandedGridView1.Columns[builder_Log.Op_ReviewReduce].ColumnEdit = repo_HLE_ReviewReduce;
            this.advBandedGridView1.Columns[builder_Log.Op_ReviewReduce].OptionsColumn.AllowEdit = true;

            this.advBandedGridView1.Columns[builder_Log.LogUrl].ColumnEdit = repo_HLE_gotoURL;
            this.advBandedGridView1.Columns[builder_Log.LogUrl].OptionsColumn.AllowEdit = true;

            this.advBandedGridView1.Columns[builder_Log.Op_ReviewAdd].ColumnEdit = repo_HLE_ReviewAdd;
            this.advBandedGridView1.Columns[builder_Log.Op_ReviewAdd].OptionsColumn.AllowEdit = true;

            controller = new TechniqueLogController();
        }