Пример #1
0
        public ListController()
        {
            _ToolBar = new ToolStrip();
            _ToolBar.Items.Add(ButtonNew);
            _ToolBar.Items.Add(ButtonEdit);
            _ToolBar.Items.Add(ButtonDel);
            _ToolBar.Items.Add(ButtonPreview);
            _ToolBar.Items.Add(ButtonPrint);
            _ToolBar.Items.Add(SearchLabel);
            _ToolBar.Items.Add(SearchBox);
            //_ToolBar.Items.Add(ButtonXml);
            //_ToolBar.Items.Add(ButtonListPreview);
            //_ToolBar.Items.Add(ButtonListPrint);
            //ButtonPrint.Enabled = false;
            //ButtonPreview.Enabled = false;

            SearchBox.BorderStyle   = BorderStyle.Fixed3D;
            SearchBox.TextBox.Width = 400;
            //SearchBox.TextBox.Height = 20;
            //SearchBox.Dock = DockStyle.Fill;
            //SearchBox.ImageIndex = 0;
            //SearchBox.Height = 20;

            _Grid = new CtlGrid();
            SetGridStyles();
            //_Grid.MultiSelect = true;
            // _Grid.AllowDrop = true;
        }
Пример #2
0
 public DetailsController()
 {
     _ToolBar = new ToolStrip();
     _ToolBar.Items.Add(ButtonNew);
     _ToolBar.Items.Add(ButtonEdit);
     _ToolBar.Items.Add(ButtonDel);
     _Grid = new CtlGrid();
     SetGridStyles();
 }
Пример #3
0
        public ListController2()
        {
            _ToolBar = new ToolStrip();
            _ToolBar.Items.Add(ButtonNew);
            _ToolBar.Items.Add(ButtonEdit);
            _ToolBar.Items.Add(ButtonDel);
            _ToolBar.Items.Add(ButtonPreview);
            _ToolBar.Items.Add(ButtonPrint);
            //_ToolBar.Items.Add(ButtonListPreview);
            //_ToolBar.Items.Add(ButtonListPrint);
            ButtonPrint.Enabled   = false;
            ButtonPreview.Enabled = false;

            _Grid = new CtlGrid();
            SetGridStyles();
            //_Grid.MultiSelect = true;
            // _Grid.AllowDrop = true;
        }
Пример #4
0
 public void MarkErrorControls(Control ctlEntity, DatErrorList eList)
 {
     foreach (Control ctl in ctlEntity.Controls)
     {
         if (ctl is IDataMember || ctl is CtlGrid)
         {
             CtlGrid grd = ctl as CtlGrid;
             DatErrorList.DatError error = eList.Find(delegate(DatErrorList.DatError de) { return(de.PropertyName == (grd == null ? ((IDataMember)ctl).DataMember : grd.DataMember)); });
             if (error != null)
             {
                 SetError(ctl, error.Description);
             }
         }
         else
         {
             MarkErrorControls(ctl, eList);
         }
     }
     Application.DoEvents();
 }