Ejemplo n.º 1
0
    } // constructor

    public CraftingFilter(long filterID) 
    {
        CraftingFilter filter = FilterGateway.CraftingFilterGetByFilterID(filterID);
        if (filter == null)
        {
            ID = 0;
            Name = "n/a";
            Description = "n/a";
        }
        else
        {
            ID = filter.ID;
            Name = filter.Name;
            Description = filter.Description;
        }
    } // constructor
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (String.IsNullOrEmpty(Request.QueryString.Get("FilterID"))) { Response.Redirect("~/Filters/Default.aspx"); }

        int itemID = Convert.ToInt32(Request.QueryString.Get("FilterID"));
        CurrentFilter = FilterGateway.CraftingFilterGetByFilterID(itemID);
        if (CurrentFilter == null || CurrentFilter.Name.Equals("n/a")) { Response.Redirect("~/Filters/Default.aspx"); }

        // Main information
        Title = CurrentFilter.Name;

        rpt_Items.DataSource = CurrentFilter.Items;
        rpt_Items.DataBind();
        grd_Recipes.DataSource = CurrentFilter.RecipesUsedAsIngredient;
        grd_Recipes.DataBind();

        ItemWrapper.Visible = rpt_Items.Items.Count > 0;
        RecipeWrapper.Visible = grd_Recipes.Rows.Count > 0;

    } // method Page_Load
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     rpt_Filters.DataSource = FilterGateway.GetAllCraftingFilters();
     rpt_Filters.DataBind();
 } // method Page_Load