public override void Init(CBoxConfig boxConfig)
 {
     CriteriaBusiness business = new CriteriaBusiness("TY_SEARCHX", "TY_FIELDSSELECT", "TY_FILTER", "TY_SEARCHTABLE", "TR_FILTER_CONDITION", "T_STAFFCX");
     this.genCriteria = new GeneralCriteria();
     this.genCriteria.CriteriaBusiness = business;
     this.pnlTop.ClientSize = this.genCriteria.Size;
     this.pnlTop.Controls.Add(this.genCriteria);
     this.genCriteria.Dock = DockStyle.Fill;
     this.genCriteria.BringToFront();
     this.genCriteria.Criteria += new CriteriaEventHandle(this.OnCriteria);
     base.Init(boxConfig);
 }
Example #2
0
 public virtual void Init(CBoxConfig boxConfig)
 {
     if (LoggingService.IsInfoEnabled)
     {
         LoggingService.InfoFormatted("开始异步载入工作流箱:{0}", new object[] { boxConfig.Name });
     }
     this._toolbarPath = boxConfig.ToolbarPath;
     this.bgInitWorker = new BackgroundWorker();
     this.bgInitWorker.DoWork += new DoWorkEventHandler(this.InitializeAsync);
     this.bgInitWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.InitializeAsyncCompleted);
     this.bgInitWorker.RunWorkerAsync(boxConfig);
     this.ContextMenuStrip = base.CreateContextMenu("/Workflow/Box/ContextMenu/");
 }
        public static CBoxConfig GetBoxConfig(string boxName)
        {
            lock (_xmlDoc)
            {
                XmlNodeList list = _xmlDoc.SelectNodes("/controlConfig/tlResult/box");
                foreach (XmlElement element in list)
                {
                    if (element.GetAttribute("name") == boxName)
                    {
                        CBoxConfig config = new CBoxConfig();
                        config.Name = boxName;
                        foreach (XmlAttribute attribute in element.Attributes)
                        {
                            switch (attribute.Name)
                            {
                                case "class":
                                    config.Class = attribute.Value;
                                    break;

                                case "queryName":
                                    config.QueryName = attribute.Value;
                                    break;

                                case "idField":
                                    config.IdField = attribute.Value;
                                    break;

                                case "queryParameters":
                                    config.QueryParameters = StringHelper.Split(attribute.Value);
                                    break;

                                case "DAONameSpace":
                                    config.DAONameSpace = attribute.Value;
                                    break;

                                case "OpenViewCommand":
                                    config.OpenViewCommand = attribute.Value;
                                    break;

                                case "queryCountName":
                                    config.QueryCountName = attribute.Value;
                                    break;

                                case "toolbarPath":
                                    config.ToolbarPath = attribute.Value;
                                    break;
                            }
                        }
                        CColConfig col = null;
                        CMenuItemConfig menuItem = null;
                        XmlElement element2 = null;
                        foreach (XmlNode node in element.ChildNodes)
                        {
                            if (node is XmlElement)
                            {
                                element2 = node as XmlElement;
                                if (element2.Name.Equals("col"))
                                {
                                    col = new CColConfig();
                                    col.Caption = element2.GetAttribute("caption");
                                    col.FieldName = element2.GetAttribute("fieldName");
                                    col.VisibleIndex = Convert.ToInt32(element2.GetAttribute("visibleIndex"));
                                    col.FormatType = element2.GetAttribute("formatType");
                                    col.FormatString = element2.GetAttribute("formatString");
                                    if (element2.HasAttribute("width"))
                                    {
                                        col.Width = Convert.ToInt32(element2.GetAttribute("width"));
                                    }
                                    config.AddCol(col);
                                }
                                else if (element2.Name.Equals("menuItem"))
                                {
                                    menuItem = new CMenuItemConfig();
                                    menuItem.Text = element2.GetAttribute("text");
                                    menuItem.InvokeName = element2.GetAttribute("invokeName");
                                    string str = element2.GetAttribute("enableOnSelect");
                                    if (str != null)
                                    {
                                        menuItem.EnableOnSelect = Convert.ToBoolean(str);
                                    }
                                    menuItem.Access = element2.GetAttribute("acess");
                                    config.AddMenuItem(menuItem);
                                }
                            }
                        }
                        return config;
                    }
                }
            }
            throw new WfClientException("Cannot find configuration the box of " + boxName);
        }
Example #4
0
 public override void Init(CBoxConfig boxConfig)
 {
     base.CreateToolbar();
     this.RefreshData();
 }
Example #5
0
 public override void Init(CBoxConfig boxConfig)
 {
     base.Init(boxConfig);
     base.BarStatusUpdate();
 }
Example #6
0
 public override void Init(CBoxConfig boxConfig)
 {
 }
Example #7
0
 public override void Init(CBoxConfig boxConfig)
 {
     base.CreateToolbar();
     this.tvStaticList.LabelEdit = false;
     this.tvStaticList.DoubleClick += new EventHandler(this.DblNodeClick);
 }
Example #8
0
 public static int GetDataCount(CBoxConfig boxConfig)
 {
     int num = -1;
     string[] queryParameters = GetQueryParameters(boxConfig.QueryParameters);
     try
     {
         num = Convert.ToInt32(QueryHelper.ExecuteScalar("SkyMap.Net.Workflow", boxConfig.QueryCountName, queryParameters));
     }
     catch (Exception exception)
     {
         LoggingService.ErrorFormatted("获取‘{0}’数量时发生错误:{1}\r\n{2}", new object[] { boxConfig.Name, exception.Message, exception.StackTrace });
     }
     return num;
 }