Пример #1
0
        protected void gvEnvironments_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            gvEnvironments.SelectedIndex = -1;
            panelBottom.Controls.Hide();

            if (e.CommandName == "Select")
            {
                panelBottom.Style["display"] = "block";

                var parameters = e.CommandArgument.ToString().Split('|');

                if (parameters.Length == 2)
                {
                    panelBottom.Controls.Hide();
                    if (parameters[0] == "ViewFarms")
                    {
                        var farmCriteria = new FarmCriteria();
                        dsFarms.Criteria = farmCriteria.AddSortBy(farmCriteria.Farm_id, false)
                                           .And(farmCriteria.Environment_id == int.Parse(parameters[1]));
                        gvFarms.DataBind();
                        gvFarms.Visible = true;
                    }
                    else if (parameters[0] == "ViewConnectionStrings")
                    {
                        var connStrCriteria = new ConnectionStringCriteria();
                        dsConnectionStrings.Criteria = connStrCriteria.AddSortBy(connStrCriteria.Name, false)
                                                       .And(connStrCriteria.Environment_id == int.Parse(parameters[1]));
                        dsConnectionStrings.DataBind();
                        gvConnectionStrings.Visible = true;
                    }
                }
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var farmCriteria = new FarmCriteria();
         dsFarms.Criteria = farmCriteria.AddSortBy(farmCriteria.Farm_id, false);
         var envCriteria = new EnvironmentCriteria();
         dsEnvironments.Criteria = envCriteria.AddSortBy(envCriteria.Environment_id, false);
     }
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var endpointCriteria = new EndpointCriteria();
         dsEndpoints.Criteria = endpointCriteria.AddSortBy(endpointCriteria.Endpoint_id, false);
         var bindingCriteria = new BindingCriteria();
         dsBindings.Criteria = bindingCriteria.AddSortBy(bindingCriteria.Binding_id, false);
         var behaviorCriteria = new BehaviorCriteria();
         dsEndpointBehaviors.Criteria = behaviorCriteria.AddSortBy(behaviorCriteria.Behavior_id, false).And(behaviorCriteria.BehaviorCategory_id == (int)BehaviorCategory.Endpoint);
         var farmCriteria = new FarmCriteria();
         dsFarms.Criteria = farmCriteria.AddSortBy(farmCriteria.Farm_id, false);
     }
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var serviceEndpointCriteria = new ServiceEndpointCriteria();
         dsServiceEndpoints.Criteria = serviceEndpointCriteria.AddSortBy(serviceEndpointCriteria.Active, true).AddSortBy(serviceEndpointCriteria.Service_id, false);
         var serviceCriteria = new ServiceCriteria();
         dsServices.Criteria = serviceCriteria.AddSortBy(serviceCriteria.Service_id, false);
         var endpointCriteria = new EndpointCriteria();
         dsEndpoints.Criteria = endpointCriteria.AddSortBy(endpointCriteria.Endpoint_id, false);
         var farmCriteria = new FarmCriteria();
         dsFarms.Criteria = farmCriteria.AddSortBy(farmCriteria.Farm_id, false);
     }
 }