Ejemplo n.º 1
0
 public static string GetTypes(bool addSelect)
 {
     List<BE.Type> types = new TypeBL().GetAll(addSelect);
     var typeItems = (from type in types
                      select new
                      {
                          id = type.Url,
                          name = type.Name
                      });
     return JsonConvert.SerializeObject(typeItems, Formatting.None);
 }
Ejemplo n.º 2
0
        private void showManufacturers(string typeUrl)
        {
            rptManufacturers.DataSource = new ManufacturerBL().GetByType(typeUrl, false);
            rptManufacturers.DataBind();

            BE.Type type = new TypeBL().GetTypeByUrl(typeUrl);
            if(type != null)
                lblTypeName.Text = type.Name;
            else
            {
                Response.StatusCode = 404;
                Server.Transfer("~/errors/not-found.html");
            }
        }