コード例 #1
0
        private void PopulateServices()
        {
            ProjectInfoBO NBSBO = new ProjectInfoBO()
            {
                i_CostCentreId = i_CostCentreId
            };

            dtSer = new DataTable();
            dtSer = ProjectInfoDL.SelectServices(i_CostCentreId, m_sType);
            grdServices.DataSource = dtSer;
            grdServicesView.PopulateColumns();
            grdServicesView.Columns["ServiceId"].Visible = false;
            grdServicesView.Columns["ServiceName"].OptionsColumn.AllowEdit = false;
            grdServicesView.Columns["Sel"].Caption             = "Select";
            grdServicesView.Columns["ServiceDistance"].Caption = "Distance";
            grdServicesView.Columns["Sel"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

            ChkEditServices.CheckedChanged += (sender, e) =>
            {
                if (Convert.ToBoolean(ChkEditServices.Editable) == true)
                {
                    ChkEditServices.ValueChecked = true;
                }
            };
            grdServicesView.Appearance.HeaderPanel.Font      = new Font(grdServicesView.Appearance.HeaderPanel.Font, FontStyle.Bold);
            grdServicesView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdServicesView.Appearance.FocusedCell.ForeColor = Color.White;
            grdServicesView.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdServicesView.Appearance.FocusedRow.BackColor  = Color.White;

            grdServicesView.OptionsSelection.EnableAppearanceHideSelection = false;
        }
コード例 #2
0
 public static DataTable SelectServices(int argCCID, string argType)
 {
     return(ProjectInfoDL.SelectServices(argCCID, argType));
 }