public void GridViewLoadDataBySearch() { string search = string.Format($@"p.namePro like '%{TxtSearchBox.Text}%'"); ProviderGrid.DataSource = providerBLL.SearchProvider(search); ProviderGrid.DataBind(); TxtSearchBox.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserEmail"] == null || Session["UserId"] == null || Session["UserType"] == null || Session["UserEmail"].ToString().Length == 0 || Session["UserId"].ToString().Length == 0 || Session["UserType"].ToString().Length == 0) { Response.Redirect("index.aspx"); } if (!Page.IsPostBack) { ProviderGrid.DataBind(); } }
protected void Page_Init(object sender, EventArgs e) { _ThirdPartyProviders = GetThirdPartyProviders(); if (_ThirdPartyProviders.Count > 0) { _ConfiguredGateways = TaxGatewayDataSource.LoadAll("Name"); NoProvidersPanel.Visible = false; ProviderGrid.DataSource = _ThirdPartyProviders; ProviderGrid.DataBind(); } else { ProviderPanel.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { IList <IShippingProvider> allProviders = ShippingProviderDataSource.GetShippingProviders(); IList <ShipGateway> gateways = ShipGatewayDataSource.LoadAll(); List <IShippingProvider> availableProviders = new List <IShippingProvider>(); foreach (IShippingProvider provider in allProviders) { string providerClassId = Misc.GetClassId(provider.GetType()); if (gateways.Where(gw => gw.ClassId.Equals(providerClassId)).Count() == 0) { availableProviders.Add(provider); } } ProviderGrid.DataSource = availableProviders; ProviderGrid.DataBind(); }
protected void ProviderGrid_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "AddProvider") { string classId = e.CommandArgument.ToString(); ITaxProvider provider = GetProvider(classId); if (provider != null) { TaxGateway gateway = new TaxGateway(); gateway.ClassId = classId; gateway.Name = provider.Name; gateway.Store = AbleContext.Current.Store; //gateway.Save(); _ConfiguredGateways.Add(gateway); string url = GetConfigUrl(provider); if (!string.IsNullOrEmpty(url)) { Response.Redirect(url); } } } else if (e.CommandName == "DeleteProvider") { string classId = e.CommandArgument.ToString(); ITaxProvider provider = GetProvider(classId); if (provider != null) { TaxGateway gateway = GetGateway(provider); if (gateway != null) { gateway.Delete(); } } } // IF WE DIDN'T REDIRECT, REBIND THE GRID _ConfiguredGateways = TaxGatewayDataSource.LoadAll("Name"); ProviderGrid.DataSource = _ThirdPartyProviders; ProviderGrid.DataBind(); }
public void GridViewLoadData() { ProviderGrid.DataSource = providerBLL.GetProvider(); ProviderGrid.DataBind(); }
public void BindData() { _presenter.OnViewLoaded(); ProviderGrid.DataBind(); }