示例#1
0
 public static void ShowDialog(string message, SearchComponent search, string path, string id)
 {
     using (ModalDeleteclass md = new ModalDeleteclass(message, search, path, id))
     {
         md.ShowDialog();
     }
 }
示例#2
0
        public void LoadViews()
        {
            searchOrderView = new SearchInfo(DataBase, this);
            ViewDictionary.Add("SearchOrder", searchOrderView);
            searchOrderView.Dock = DockStyle.Fill;
            panel1.Controls.Add(searchOrderView);
            searchOrderView.Hide();

            searchComponentView = new SearchComponent(DataBase, this);
            ViewDictionary.Add("SearchComponent", searchComponentView);
            searchComponentView.Dock = DockStyle.Fill;
            panel1.Controls.Add(searchComponentView);
            searchComponentView.Hide();

            createComponentView = new CreateComponent(DataBase, this);
            ViewDictionary.Add("CreateComponent", createComponentView);
            createComponentView.Dock = DockStyle.Fill;
            panel1.Controls.Add(createComponentView);
            createComponentView.Hide();

            OrderSuppliersView = new OrderSuppliers(DataBase, this);
            ViewDictionary.Add("OrderSuppliersView", OrderSuppliersView);
            OrderSuppliersView.Dock = DockStyle.Fill;
            panel1.Controls.Add(OrderSuppliersView);
            OrderSuppliersView.Hide();
        }
示例#3
0
        public void GetHarByUrl(
            [Frozen] Mock <IHttpClient> httpClientMock,
            [Greedy] SearchComponent sut,
            string regex,
            string baseUrl,
            int start,
            int count,
            Har har)
        {
            // ARRANGE
            httpClientMock.SetupApiCall(sut, CallType.Other, "harByUrlRegex",
                                        new Parameters
            {
                { "regex", regex },
                { "baseurl", baseUrl },
                { "start", start },
                { "count", count }
            }, DataType.Other)
            .Returns(Har.Serialize(har))
            .Verifiable();

            // ACT
            var result = sut.GetHarByUrl(regex, baseUrl, start, count);

            // ASSERT
            result.ShouldBeEquivalentTo(har);
            httpClientMock.Verify();
        }
示例#4
0
        public void GetMessagesByResponse(
            [Frozen] Mock <IHttpClient> httpClientMock,
            [Greedy] SearchComponent sut,
            string regex,
            string baseUrl,
            int start,
            int count,
            IEnumerable <Message> messages)
        {
            // ARRANGE
            var json = new JObject(
                new JProperty("messagesByResponseRegex", JArray.FromObject(messages)));

            httpClientMock.SetupApiCall(sut, CallType.View, "messagesByResponseRegex",
                                        new Parameters
            {
                { "regex", regex },
                { "baseurl", baseUrl },
                { "start", start },
                { "count", count }
            })
            .Returns(json.ToString())
            .Verifiable();

            // ACT
            var result = sut.GetMessagesByResponse(regex, baseUrl, start, count);

            // ASSERT
            result.ShouldBeEquivalentTo(messages);
            httpClientMock.Verify();
        }
示例#5
0
 public ZapClient(string host, int port, Protocols protocol = Protocols.http)
 {
     Protocol          = protocol;
     Host              = host;
     Port              = port;
     Acsrf             = new AcsrfComponent(this);
     AjaxSpider        = new AjaxSpiderComponent(this);
     Ascan             = new AscanComponent(this);
     Authentication    = new AuthenticationComponent(this);
     Authorization     = new AuthorizationComponent(this);
     Autoupdate        = new AutoupdateComponent(this);
     Break             = new BreakComponent(this);
     Context           = new ContextComponent(this);
     Core              = new CoreComponent(this);
     ForcedUser        = new ForcedUserComponent(this);
     HttpSessions      = new HttpSessionsComponent(this);
     Params            = new ParamsComponent(this);
     Pscan             = new PscanComponent(this);
     Reveal            = new RevealComponent(this);
     Script            = new ScriptComponent(this);
     Search            = new SearchComponent(this);
     Selenium          = new SeleniumComponent(this);
     SessionManagement = new SessionManagementComponent(this);
     Spider            = new SpiderComponent(this);
     Users             = new UsersComponent(this);
 }
 static public T find()
 {
     if (!instance)
     {
         instance = new SearchComponent <T>();
     }
     return(instance.find1());
 }
示例#7
0
        public void ComponentName(
            [Greedy] SearchComponent sut)
        {
            // ACT
            var result = sut.ComponentName;

            // ASSERT
            result.Should().Be("search");
        }
示例#8
0
        public ModalDeleteclass(string _message, SearchComponent searchComponents, string paths, string id)
        {
            this.searchComponent = searchComponents;
            this.path            = paths;
            this.id = id;

            InitializeComponent();

            lblMsg.Text = _message;
        }
示例#9
0
 private void InitComponents()
 {
     User      = new UserComponent(this);
     Chat      = new ChatComponent(this);
     Broadcast = new BroadcastComponent(this);
     Search    = new SearchComponent(this);
     Songs     = new SongsComponent(this);
     Queue     = new QueueComponent(this);
     Remora    = new RemoraComponent(this);
 }
示例#10
0
        private void bunifuFlatButton4_Click(object sender, EventArgs e)
        {
            //go to search component
            tableLayoutPanelHome.Controls.Clear();

            using (SearchComponent searchComponent = new SearchComponent())
            {
                tableLayoutPanelHome.Controls.Add(searchComponent.Instance);

                searchComponent.Instance.Dock = DockStyle.Fill;
                searchComponent.Instance.BringToFront();
            }
        }
示例#11
0
        public SearchComponentControl(SearchComponent component)
            : base(component)
        {
            InitializeComponent();
            _component = component;

            _accession.DataBindings.Add("Value", _component, "AccessionNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _accession.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _mrn.DataBindings.Add("Value", _component, "Mrn", true, DataSourceUpdateMode.OnPropertyChanged);
            _mrn.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _healthcard.DataBindings.Add("Value", _component, "HealthcardNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _healthcard.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _familyName.DataBindings.Add("Value", _component, "FamilyName", true, DataSourceUpdateMode.OnPropertyChanged);
            _familyName.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _givenName.DataBindings.Add("Value", _component, "GivenName", true, DataSourceUpdateMode.OnPropertyChanged);
            _givenName.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _fromDate.DataBindings.Add("Value", _component, "FromDate", true, DataSourceUpdateMode.OnPropertyChanged);
            _fromDate.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _untilDate.DataBindings.Add("Value", _component, "UntilDate", true, DataSourceUpdateMode.OnPropertyChanged);
            _untilDate.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _orderingPractitioner.DataBindings.Add("Value", _component, "OrderingPractitioner", true, DataSourceUpdateMode.OnPropertyChanged);
            _orderingPractitioner.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _orderingPractitioner.LookupHandler = _component.OrderingPractitionerLookupHandler;

            _diagnosticService.DataBindings.Add("Value", _component, "DiagnosticService", true, DataSourceUpdateMode.OnPropertyChanged);
            _diagnosticService.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _diagnosticService.LookupHandler = _component.DiagnosticServiceLookupHandler;

            _procedureType.DataBindings.Add("Value", _component, "ProcedureType", true, DataSourceUpdateMode.OnPropertyChanged);
            _procedureType.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _procedureType.LookupHandler = _component.ProcedureTypeLookupHandler;

            _keepOpen.DataBindings.Add("Checked", _component, "KeepOpen", true, DataSourceUpdateMode.OnPropertyChanged);
            _showDeactivatedChoices.DataBindings.Add("Checked", _component, "IncludeDeactivatedChoices", true, DataSourceUpdateMode.OnPropertyChanged);
            _searchButton.DataBindings.Add("Enabled", _component, "SearchEnabled");
        }
示例#12
0
        public SearchComponentControl(SearchComponent component)
            : base(component)
        {
            InitializeComponent();
            _component = component;

            _accession.DataBindings.Add("Value", _component, "AccessionNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _accession.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _mrn.DataBindings.Add("Value", _component, "Mrn", true, DataSourceUpdateMode.OnPropertyChanged);
            _mrn.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _healthcard.DataBindings.Add("Value", _component, "HealthcardNumber", true, DataSourceUpdateMode.OnPropertyChanged);
            _healthcard.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _familyName.DataBindings.Add("Value", _component, "FamilyName", true, DataSourceUpdateMode.OnPropertyChanged);
            _familyName.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _givenName.DataBindings.Add("Value", _component, "GivenName", true, DataSourceUpdateMode.OnPropertyChanged);
            _givenName.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _fromDate.DataBindings.Add("Value", _component, "FromDate", true, DataSourceUpdateMode.OnPropertyChanged);
            _fromDate.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _untilDate.DataBindings.Add("Value", _component, "UntilDate", true, DataSourceUpdateMode.OnPropertyChanged);
            _untilDate.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _orderingPractitioner.DataBindings.Add("Value", _component, "OrderingPractitioner", true, DataSourceUpdateMode.OnPropertyChanged);
            _orderingPractitioner.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _orderingPractitioner.LookupHandler = _component.OrderingPractitionerLookupHandler;

            _diagnosticService.DataBindings.Add("Value", _component, "DiagnosticService", true, DataSourceUpdateMode.OnPropertyChanged);
            _diagnosticService.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _diagnosticService.LookupHandler = _component.DiagnosticServiceLookupHandler;

            _procedureType.DataBindings.Add("Value", _component, "ProcedureType", true, DataSourceUpdateMode.OnPropertyChanged);
            _procedureType.DataBindings.Add("Enabled", _component, "ComponentEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _procedureType.LookupHandler = _component.ProcedureTypeLookupHandler;

            _keepOpen.DataBindings.Add("Checked", _component, "KeepOpen", true, DataSourceUpdateMode.OnPropertyChanged);
			_showDeactivatedChoices.DataBindings.Add("Checked", _component, "IncludeDeactivatedChoices", true, DataSourceUpdateMode.OnPropertyChanged);
			_searchButton.DataBindings.Add("Enabled", _component, "SearchEnabled");
        }
示例#13
0
        /// <summary>
        /// 构造ConditionComponent的实例,当实例不存在是则创建该对象



        /// 这个是单例模式的实现
        /// </summary>
        /// <returns></returns>
        //public static ConditionComponent Instance()
        //{
        //    if (component == null)
        //    {

        //    }
        //    return component;
        //}

        /// <summary>
        /// 添加属性查询类型



        /// </summary>
        /// <param name="propertyName">属性名称</param>
        /// <param name="component">查询类型</param>
        /// <returns></returns>
        public void AddComponent(string propertyName, string propertyValue,
                                 SearchComponent component, SearchPad intAndOr)
        {
            //if (component == null)
            //{
            //    ConditionComponent.component = Instance();
            //}
            if (sbComponent == null)
            {
                sbComponent = new StringBuilder();
            }

            if ((component.ToString() != "IS" && component.ToString() != "ISNOT") &&
                String.IsNullOrEmpty(propertyValue))
            {
                return;
            }

            //in or not in 的时候



            if ((!string.IsNullOrEmpty(propertyValue)) &&
                ((strPads[(Int32)component] != "IN" && strPads[(Int32)component] != "NOT IN") ||
                 !propertyValue.EndsWith(")")))
            {
                //去除单引号



                propertyValue = propertyValue.Replace("'", "''");
            }


            if ((intAndOr == SearchPad.Ex || intAndOr == SearchPad.AndEx ||
                 intAndOr == SearchPad.OrEx) && sbComponent.Length <= 0)
            {
                sbComponent.Append(" ( ");
            }
            else if (intAndOr != SearchPad.ExB && intAndOr != SearchPad.NULL)
            {
                sbComponent.Append((sbComponent.Length <= 0 ? "" : (strEs[(Int32)intAndOr])));
            }

            if (strPads[(Int32)component] == "LIKE" && propertyValue.IndexOf("%") < 0)
            {
                if (propertyValue.IndexOf("_") < 0)
                {
                    sbComponent.AppendFormat(" {0} {1} '%{2}%' ",
                                             propertyName, strPads[(Int32)component], propertyValue);
                }
                else
                {
                    sbComponent.AppendFormat(" {0} {1} '{2}' ",
                                             propertyName, strPads[(Int32)component], propertyValue);
                }
            }
            else if (strPads[(Int32)component] == "GROUP BY")
            {
                if (sbComponent.ToString() != "")
                {
                    sbComponent.AppendFormat(" {0} {1}  ", strPads[(Int32)component], propertyValue);
                }
                else
                {
                    sbComponent.AppendFormat(" 1=1 {0} {1}  ", strPads[(Int32)component], propertyValue);
                }
            }
            else
            {
                if (strPads[(Int32)component] == "IN" || strPads[(Int32)component] == "NOT IN")
                {
                    sbComponent.AppendFormat(" {0} {1} {2} ",
                                             propertyName, strPads[(Int32)component], propertyValue);
                }
                else
                {
                    if (propertyValue == null)
                    {
                        sbComponent.AppendFormat(" {0} {1} NULL",
                                                 propertyName, strPads[(Int32)component], propertyValue);
                    }
                    else
                    {
                        sbComponent.AppendFormat(" {0} {1} '{2}' ",
                                                 propertyName, strPads[(Int32)component], propertyValue);
                    }
                }
            }

            if (intAndOr == SearchPad.AndExB || intAndOr == SearchPad.OrExB)
            {
                sbComponent.Append(")");
            }
            // dpList.Add(new IDataParameter(propertyName, propertyValue));
            return;
        }
示例#14
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (SearchComponent)component;
 }
示例#15
0
 public SearchController(DirectionsContext context, SearchModel model, SearchComponent component)
 {
     _context   = context;
     _model     = model;
     _component = component;
 }
 public SearchComponentBL(IWebDriver webDriver) : base(webDriver)
 {
     searchComponent = new SearchComponent(webDriver);
 }
 public GenerateSalleController(SearchComponent searchComponents)
 {
     this.searchComponent = searchComponents;
 }
示例#18
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (SearchComponent)component;
 }