protected void gvServiceCategories_RowCommand(object sender, GridViewCommandEventArgs e) { gvServiceCategories.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] == "ViewServices") { var serviceCriteria = new ServiceCriteria(); dsServices.Criteria = serviceCriteria.AddSortBy(serviceCriteria.Service_id, false) .And(serviceCriteria.ServiceCategory_id == int.Parse(parameters[1])); gvServices.DataBind(); gvServices.Visible = true; } } } }
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); } }
protected void gvApps_RowCommand(object sender, GridViewCommandEventArgs e) { gvApps.SelectedIndex = -1; gvAppVariables.EditIndex = -1; panelBottom.Controls.Hide(); panelAddAppVariable.Visible = false; if (e.CommandName == "Select") { panelBottom.Style["display"] = "block"; var parameters = e.CommandArgument.ToString().Split('|'); if (parameters.Length == 2) { panelBottom.Controls.Hide(); if (parameters[0] == "ViewAppVariables") { var appVariableCriteria = new AppVariableCriteria(); dsAppVariables.Criteria = appVariableCriteria.AddSortBy(appVariableCriteria.AppVariableName, false) .And(appVariableCriteria.AppCode == parameters[1]); hidSelectedAppCode.Value = parameters[1]; gvAppVariables.DataBind(); panelAppVariables.Visible = true; } else if (parameters[0] == "ViewServices") { var serviceCriteria = new ServiceCriteria(); dsServices.Criteria = serviceCriteria.AddSortBy(serviceCriteria.Service_id, false) .And(serviceCriteria.AppCode == parameters[1]); hidSelectedAppCode.Value = parameters[1]; gvServices.DataBind(); panelServices.Visible = true; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var serviceCriteria = new ServiceCriteria(); dsService.Criteria = serviceCriteria.AddSortBy(serviceCriteria.ServiceName, false); var bindingCriteria = new BindingCriteria(); dsBinding.Criteria = bindingCriteria.AddSortBy(bindingCriteria.BindingName, false); var bindingTypeCriteria = new BindingTypeCriteria(); dsBindingType.Criteria = bindingTypeCriteria.AddSortBy(bindingTypeCriteria.BindingTypeFriendlyName, false); var endpointCriteria = new EndpointCriteria(); dsEndpoint.Criteria = endpointCriteria; using (var serviceLocator = ServiceManager.GetServiceLocator(typeof(ISimpleServiceDemo))) { litSayHello.Text = serviceLocator.GetService <ISimpleServiceDemo>().SayHellod(); var clientConfig = ServiceConfigurationStore.GetClientConfiguration(typeof(ISimpleServiceDemo)); litSayHello.Text += string.Format(" [Binding Type: {0}]", ServiceConfigurationStore.GetBindingType(clientConfig.Endpoint.BindingType_id).FriendlyName); } } }