Example #1
0
 private void sceltaCondominioComboLoad(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         try
         {
             // ============================================
             // Condomini
             // ============================================
             if (!condominio.ButtonsRight.Exists("SceltaCondominio"))
             {
                 var button = new DropDownEditorButton("SceltaCondominio") {RightAlignDropDown = DefaultableBoolean.True, Control = ricercaCondominio};
                 condominio.ButtonsRight.Add(button);
                 button.BeforeDropDown += buttonBeforeDropDown;
                 ricercaCondominio.DisplayLayout.Bands[0].Columns["Codice"].SortIndicator = SortIndicator.Ascending;
                 ricercaCondominio.DisplayLayout.Override.AllowRowFiltering = DefaultableBoolean.True;
                 ricercaCondominio.DisplayLayout.Override.FilterUIType = FilterUIType.FilterRow;
                 ricercaCondominio.Size = new Size(550, 300);
             }
         }
         catch(Exception ex)
         {
             
             _log.Error("Errore inaspettato - " + Utility.GetMethodDescription() + " - azienda:" + Security.Login.Instance.CurrentLogin().Azienda, ex);                     
         }
     }
 }
Example #2
0
        private void ActiveDropDownUC(UltraTextEditor txtEditor, string str_clsname, bool b_isTree, int i_pos)
        {
            DEMetaAttribute metaAttr = new DEMetaAttribute();
            DEBoxObject     obj2     = (DEBoxObject)this.al_all[i_pos];

            metaAttr = (DEMetaAttribute)obj2.MetaObject;
            if (b_isTree)
            {
                ArrayList list  = new ArrayList();
                Guid      empty = Guid.Empty;
                list.Add(empty);
                string refTableName = this.GetRefTableName(obj2, i_pos);
                list.Add(refTableName);
                DEMetaClass class2 = ModelContext.MetaModel.GetClass(metaAttr.LinkedResClass);
                list.Add(class2.Name);
                UCResTree tree = new UCResTree(list, i_pos);
                this.al_control.Add(tree);
                DropDownEditorButton button = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button.Control    = tree;
                this.handler      = new SelectResHandler(this.ucUser_ResSelected);
                tree.ResSelected += this.handler;
            }
            else
            {
                this.ucUser = new UCResGrid(str_clsname, metaAttr, i_pos);
                this.al_control.Add(this.ucUser);
                DropDownEditorButton button2 = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button2.Control          = this.ucUser;
                this.handler             = new SelectResHandler(this.ucUser_ResSelected);
                this.ucUser.ResSelected += this.handler;
            }
        }
Example #3
0
        public SceltaSegnaposto(UltraTextEditor inputControl, UltraGrid grid, Dictionary<string, string> listaValori)
        { 
            _inputControl = inputControl;
            _grid = grid;

            _listaSegnaPosto = new Infragistics.Win.UltraWinListView.UltraListView
            {
                Name = "segnaPosto",
                View = Infragistics.Win.UltraWinListView.UltraListViewStyle.List
            };
            _listaSegnaPosto.ItemSettings.Appearance.Image = Properties.Resources.check_small;
            _listaSegnaPosto.Size = new System.Drawing.Size(231, 97);
            _listaSegnaPosto.ItemDoubleClick += listaSegnaPostoItemDoubleClick;

            foreach (var kvp in listaValori)
            {
                var item = new Infragistics.Win.UltraWinListView.UltraListViewItem(kvp.Value, null, null) {Key = kvp.Key};
                _listaSegnaPosto.Items.Add(item);
            }

            _button = new DropDownEditorButton("SceltaSegnaposto") {RightAlignDropDown = DefaultableBoolean.True, Control = _listaSegnaPosto};
            _inputControl.ButtonsRight.Add(_button);
            _listaSegnaPosto.Height = 200;

            if(_grid != null)
                _grid.ClickCell += gridClickCell;
        }
Example #4
0
 private void tvwType_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if ((e.Node != null) && (e.Node.Tag is DEMetaClass))
     {
         if (((this.m_tp.HeadClass != ((DEMetaClass)e.Node.Tag).Name) && !ModelContext.MetaModel.IsCard(((DEMetaClass)e.Node.Tag).Name)) || this.rbtMid.Checked)
         {
             this.txtField.Text = e.Node.Text;
             this.txtField.Tag  = ((DEMetaClass)e.Node.Tag).Name;
             DropDownEditorButton button = this.ultraEditor.ButtonsRight["SelectedRel"] as DropDownEditorButton;
             button.Control = this.InitRelationList();
             this.cobAttrList.DataSource = null;
             this.txtType.Text           = "";
         }
         else
         {
             this.DisplayAttributes(e.Node);
             if (this.ultraEditor.ButtonsRight.Count > 0)
             {
                 DropDownEditorButton button2 = this.ultraEditor.ButtonsRight["SelectedRel"] as DropDownEditorButton;
                 button2.Control = null;
             }
             this.SmartSelectAttr();
         }
         this.cobIndex         = this.cobAttrList.SelectedIndex;
         this.ultraEditor.Text = "";
         this.ultraEditor.Tag  = null;
     }
 }
        private void InitializeConfig()
        {
            this.ucProcess = new UCProcessTemplatePicker();
            DropDownEditorButton button = base.ButtonsRight["SelectProcessTemplate"] as DropDownEditorButton;

            button.Control = this.ucProcess;
            this.dlHandler = new SelectProcessTemplateHandler(this.ucProcess_ProcessSelected);
            this.ucProcess.processTemplateSelected += this.dlHandler;
            base.KeyDown  += new KeyEventHandler(this.this_KeyDown);
            this.AllowDrop = true;
        }
Example #6
0
        private void InitializeComponent()
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectID")
            {
                RightAlignDropDown = DefaultableBoolean.False
            };

            base.ButtonsRight.Add(button);
            base.NullText = "";
            base.Size     = new Size(100, 0x15);
        }
Example #7
0
        public UCSelectClass(string className, bool leafClassOnly, SelectClassConstraint constraint)
            : this()
        {
            this.ucClassTree = new UCClassTree(((className == null) || (className == "")) ? null : className, leafClassOnly, constraint);
            DropDownEditorButton button = base.ButtonsRight["SelectClass"] as DropDownEditorButton;

            button.Control = this.ucClassTree;
            this.handler   = new SelectClassHandler(this.ucClassTree_ClassSelected);
            this.ucClassTree.ClassSelected += this.handler;
            this.handler2 = new DoubClickClassHandler(this.ucClassTree_DoubleClikedcls);
            this.ucClassTree.DoubClicked += this.handler2;
        }
Example #8
0
 private void ultraEditor_BeforeEditorButtonDropDown(object sender, BeforeEditorButtonDropDownEventArgs e)
 {
     if ((this.txtField.Tag != null) && (this.txtField.Text != ""))
     {
         DropDownEditorButton button  = this.ultraEditor.ButtonsRight["SelectedRel"] as DropDownEditorButton;
         SortableListView     control = button.Control as SortableListView;
         if (!this.readOnly && !ModelContext.MetaModel.IsChild("PPCARD", this.txtField.Tag.ToString()))
         {
             this.CreateRelationList(control, (string)this.txtField.Tag);
         }
     }
 }
Example #9
0
        private void DrawDropDownTBtn(UltraTextEditor txtEditor, int i_dpindex)
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectRes")
            {
                Key = "SelectRes",
                RightAlignDropDown = DefaultableBoolean.False
            };

            txtEditor.ButtonsRight.Add(button);
            txtEditor.NullText = "(无)";
            txtEditor.Tag      = this.al_all[i_dpindex];
            this.ActiveDropDownUC(txtEditor);
        }
Example #10
0
        private void InitializeConfig()
        {
            this.ucUser = new UCTreeViewPicker(this._treeview);
            DropDownEditorButton button = base.ButtonsRight["SelectTreeView"] as DropDownEditorButton;

            button.Control = this.ucUser;
            this.dlhandler = new TreeViewDropListHandler(this.ucUser_TreeViewSelected);
            this.ucUser.TreeViewSelected    += this.dlhandler;
            base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.TreeViewCombo_BeforeDropDown);
            this.AllowDrop    = true;
            base.TextChanged += new EventHandler(this.TreeViewCombo_TextChanged);
            base.KeyUp       += new KeyEventHandler(this.SerialComboInput_KeyUp);
        }
Example #11
0
        private void Init()
        {
            this.ds    = PlArchivManage.Agent.GetBpmNameByUserOid(ClientData.LogonUser.Oid);
            this.ucBpm = new UcResWk(this.ds);
            DropDownEditorButton button = base.ButtonsRight["SelectRes"] as DropDownEditorButton;

            button.Control                   = this.ucBpm;
            this.dlhandler                   = new SelectResHandler2(this.ucUser_ResSelected);
            this.ucBpm.ResTextChanged       += this.dlhandler;
            base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ResCombo_BeforeDropDown);
            base.Resize      += new EventHandler(this.ResCombo_Resize);
            base.TextChanged += new EventHandler(this.ResCombo_TextChanged);
        }
Example #12
0
        private void InitializeComponent()
        {
            this.components = new Container();
            DropDownEditorButton button = new DropDownEditorButton("SelectRes");

            base.SuspendLayout();
            button.Key = "SelectRes";
            button.RightAlignDropDown = DefaultableBoolean.False;
            base.ButtonsRight.Add(button);
            base.NullText = "(无)";
            base.Size     = new Size(100, 0x15);
            base.ResumeLayout(false);
        }
Example #13
0
        private void InitializeConfig()
        {
            this.ucUser = new UCParamMain(this.str_funcname);
            DropDownEditorButton button = base.ButtonsRight["SelectRule"] as DropDownEditorButton;

            button.Control                   = this.ucUser;
            this.dlhandler                   = new RuleDropListHandler(this.ucUser_RuleSelected);
            this.ucUser.RuleSelected        += this.dlhandler;
            base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.RuleCombo_BeforeDropDown);
            this.AllowDrop                   = true;
            base.KeyUp  += new KeyEventHandler(this.RuleCombo_KeyUp);
            base.Resize += new EventHandler(this.RuleCombo_Resize);
        }
Example #14
0
        private void InitializeConfig()
        {
            this.ucUser = new UCCodeAttrPicker(this.ca_input);
            DropDownEditorButton button = base.ButtonsRight["SelectCodeAttr"] as DropDownEditorButton;

            button.Control = this.ucUser;
            this.dlhandler = new CodeAttrDropListHandler(this.ucUser_CodeAttrSelected);
            this.ucUser.CodeAttrSelected    += this.dlhandler;
            base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.CodeAttrCombo_BeforeDropDown);
            this.AllowDrop    = true;
            base.TextChanged += new EventHandler(this.CodeAttrCombo_TextChanged);
            base.KeyUp       += new KeyEventHandler(this.CodeAttrComboInput_KeyUp);
        }
Example #15
0
        private void ActiveDropDownUC(UltraTextEditor txtEditor)
        {
            DEMetaAttribute metaAttr = new DEMetaAttribute {
                LinkType    = 1,
                Combination = this.str_field
            };

            this.ucUser = new UCRes(this.clsName, metaAttr);
            DropDownEditorButton button = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;

            button.Control           = this.ucUser;
            this.handler             = new SelectResHandler(this.ucUser_ResSelected);
            this.ucUser.ResSelected += this.handler;
        }
Example #16
0
        public UCselRes(Guid classOid, DEMetaAttribute metaAttr)
        {
            this.Attrs       = new ArrayList();
            this.resOid      = Guid.Empty;
            this.classOid    = classOid;
            this.deMetaAttri = metaAttr;
            this.InitializeComponent();
            this.ucUser = new UCRes(classOid, metaAttr);
            DropDownEditorButton button = base.ButtonsRight["SelectRes"] as DropDownEditorButton;

            button.Control           = this.ucUser;
            this.handler             = new Thyt.TiPLM.UIL.Resource.Common.UserControl.SelectResHandler(this.ucUser_ResSelected);
            this.ucUser.ResSelected += this.handler;
        }
Example #17
0
 private void InitUltraEditor()
 {
     if (!this.readOnly)
     {
         DropDownEditorButton button = new DropDownEditorButton("SelectedRel")
         {
             RightAlignDropDown = DefaultableBoolean.False
         };
         this.ultraEditor.ButtonsRight.Add(button);
         if ((this.m_tp.HeadClass != ((string)this.txtField.Tag)) || this.rbtMid.Checked)
         {
             DropDownEditorButton button2 = this.ultraEditor.ButtonsRight["SelectedRel"] as DropDownEditorButton;
             button2.Control = this.InitRelationList();
         }
         this.ultraEditor.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ultraEditor_BeforeEditorButtonDropDown);
     }
 }
Example #18
0
 private void sceltaModelloComboLoad(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         // ============================================
         // Modelli
         // ============================================
         if (!modello.ButtonsRight.Exists("SceltaModello"))
         {
             var button = new DropDownEditorButton("SceltaModello") {RightAlignDropDown = DefaultableBoolean.True, Control = ricercaModelli};
             modello.ButtonsRight.Add(button);
         }
         if (ricercaModelli.DisplayLayout.Bands[0].Columns.Exists("Descrizione"))
             ricercaModelli.DisplayLayout.Bands[0].Columns["Descrizione"].SortIndicator = SortIndicator.Ascending;
         ricercaModelli.Size = new Size(550, 300);
     }
 }
Example #19
0
 private void sceltaFornitoreComboLoad(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         // ============================================
         // Fornitori
         // ============================================
         if (!fornitore.ButtonsRight.Exists("SceltaFornitore"))
         {
             var button = new DropDownEditorButton("SceltaFornitore") {RightAlignDropDown = DefaultableBoolean.True, Control = ricercaFornitori};
             fornitore.ButtonsRight.Add(button);
         }
         if (ricercaFornitori.DisplayLayout.Bands[0].Columns.Exists("DisplayName"))
             ricercaFornitori.DisplayLayout.Bands[0].Columns["DisplayName"].SortIndicator = SortIndicator.Ascending;
         ricercaFornitori.Size = new Size(550, 300);
         ricercaFornitori.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
     }
 }
Example #20
0
        private void sceltaPersonaComboLoad(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                try
                {
                    // ============================================
                    // Persone
                    // ============================================
                    if (!persona.ButtonsRight.Exists("SceltaPersona"))
                    {
                        var button = new DropDownEditorButton("SceltaPersona") {RightAlignDropDown = DefaultableBoolean.True, Control = ricercaPersone};
                        persona.ButtonsRight.Add(button);
                    }

                    ricercaPersone.Size = new Size(550, 300);
                    try
                    {
                        if (ricercaPersone.DisplayLayout != null && ricercaPersone.DisplayLayout.Bands.Count > 0)
                        {
                            if (ricercaPersone.DisplayLayout.Bands[0].Columns.Exists("AttinenteCondominio"))
                                ricercaPersone.DisplayLayout.Bands[0].Columns["AttinenteCondominio"].Hidden = true;
                            if (ricercaPersone.DisplayLayout.Bands[0].Columns.Exists("IdReferente"))
                                ricercaPersone.DisplayLayout.Bands[0].Columns["IdReferente"].Hidden = true;
                            if (ricercaPersone.DisplayLayout.Bands[0].Columns.Exists("TipoSoggetto"))
                                ricercaPersone.DisplayLayout.Bands[0].Columns["TipoSoggetto"].Hidden = true;
                            if (ricercaPersone.DisplayLayout.Bands[0].Columns.Exists("TipoFornitore"))
                                ricercaPersone.DisplayLayout.Bands[0].Columns["TipoFornitore"].Hidden = true;
                        }
                    }
                    catch (Exception ex)
                    {
                        _log.ErrorFormat("Errore inaspettato durante la impostazione del layout - {0} - azienda:{1}", ex, Utility.GetMethodDescription(), Security.Login.Instance.CurrentLogin().Azienda);
                    }


                    _isLoaded = true;
                }
                catch (Exception ex)
                {
                    _log.ErrorFormat("Errore inaspettato durante la funzione di load - {0} - azienda:{1}", ex, Utility.GetMethodDescription(), Security.Login.Instance.CurrentLogin().Azienda);
                }
            }   
        }
        private void sceltaRichiedentePraticaComboLoad(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                try
                {
                    _praticaService = ResolveComponent<IPraticaService>();

                    // ============================================
                    // Persone
                    // ============================================
                    var button = new DropDownEditorButton("SceltaRichiedente") {RightAlignDropDown = DefaultableBoolean.True, Control = ricercaRichiedente};
                    richiedente.ButtonsRight.Add(button);

                    ricercaRichiedente.Size = new Size(550, 300);
                    ricercaRichiedente.DisplayLayout.Bands[0].Columns["IdReferente"].Hidden = true;
                }
                catch { }
            }
        }
Example #22
0
        private void DrawDropDownTBtn(UltraTextEditor txtEditor, string str_clsname, int i_dpindex)
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectRes")
            {
                Key = "SelectRes",
                RightAlignDropDown = DefaultableBoolean.False
            };

            txtEditor.ButtonsRight.Add(button);
            txtEditor.NullText = "(无)";
            txtEditor.Tag      = this.al_all[i_dpindex];
            DEBoxObject obj2 = (DEBoxObject)this.al_all[i_dpindex];

            if (obj2.ShowType.Equals("UCTree"))
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, true, i_dpindex);
            }
            else
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, false, i_dpindex);
            }
        }
Example #23
0
        public UCSelectClass(bool IsQuickSch, bool leafClassOnly, SelectClassConstraint constraint)
            : this()
        {
            this.ucClassTree = new UCClassTree(null, leafClassOnly, constraint);
            this.ucClassTree.ClassTree.Nodes.RemoveByKey("资源");
            this.ucClassTree.ClassTree.Nodes.RemoveByKey("业务状态");
            for (int i = 0; i < this.ucClassTree.ClassTree.Nodes.Count; i++)
            {
                TreeNode    node = this.ucClassTree.ClassTree.Nodes[i];
                DEMetaClass tag  = node.Tag as DEMetaClass;
                if (tag != null)
                {
                    if (tag.Name == "RESOURCE")
                    {
                        this.ucClassTree.ClassTree.Nodes.Remove(node);
                        i--;
                    }
                    else
                    {
                        this.NodeClear(node);
                        if ((node.Nodes.Count == 0) && ((!tag.IsSearchable || !ModelContext.MetaModel.IsVisibleCustomizedClass(tag.Name)) || (tag.IsGrantable && (PLGrantPerm.CanDoClassOperation(ClientData.LogonUser.Oid, tag.Name, Guid.Empty, "ClaRel_SEARCH") != 1))))
                        {
                            this.ucClassTree.ClassTree.Nodes.Remove(node);
                            i--;
                        }
                    }
                }
            }
            DropDownEditorButton button = base.ButtonsRight["SelectClass"] as DropDownEditorButton;

            button.Control = this.ucClassTree;
            this.handler   = new SelectClassHandler(this.ucClassTree_ClassSelected);
            this.ucClassTree.ClassSelected += this.handler;
            this.handler2 = new DoubClickClassHandler(this.ucClassTree_DoubleClikedcls);
            this.ucClassTree.DoubClicked += this.handler2;
        }
Example #24
0
        public UCSelectPrin(SelectPrinWay way) : this()
        {
            this.way = way;
            switch (way)
            {
            case SelectPrinWay.SelectUser:
            {
                this.ucUser = new UCUsers();
                this.ucUser.showSysAdmin = this.showSysAdmin;
                DropDownEditorButton button = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button.Control            = this.ucUser;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucUser.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectOrg:
            {
                this.ucOrg = new UCOrgs();
                DropDownEditorButton button2 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button2.Control = this.ucOrg;
                this.ucOrg.LoadOrgs();
                this.handler             = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucOrg.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectRole:
            {
                this.ucRole = new UCRoles();
                this.ucRole.LoadRoles();
                this.ucRole.RoleRefresh(null, null);
                DropDownEditorButton button3 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                button3.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                return;
            }

            case SelectPrinWay.SelectPrjUser:
            {
                this.ucRole = new UCRoles();
                DropDownEditorButton button5 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ResCombo_BeforeDropDown);
                button5.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;
            }

            case SelectPrinWay.SelectPrjOrg:
            {
                this.ucRole = new UCRoles();
                DropDownEditorButton button4 = base.ButtonsRight["SelectUser"] as DropDownEditorButton;
                base.BeforeEditorButtonDropDown += new BeforeEditorButtonDropDownEventHandler(this.ResCombo_BeforeDropDown);
                button4.Control           = this.ucRole;
                this.handler              = new SelectPrinHandler(this.ucControl_PrinSelected);
                this.ucRole.PrinSelected += this.handler;
                this.ucRole.Height        = 0;
                this.ucRole.Width         = base.Width;
                return;
            }
            }
        }
Example #25
0
 private void InitializeComponent()
 {
     this.components = new Container();
     DropDownEditorButton button = new DropDownEditorButton("SelectRes");
     base.SuspendLayout();
     button.Key = "SelectRes";
     button.RightAlignDropDown = DefaultableBoolean.False;
     base.ButtonsRight.Add(button);
     base.NullText = "(无)";
     base.Size = new Size(100, 0x15);
     base.ResumeLayout(false);
 }