Exemplo n.º 1
0
        public object Post(GetMaterials request)
        {
            GetMaterialsResponse response=new GetMaterialsResponse();
            response.Materials= Db.Select<Material>();
            response.MaterialTypes= Db.Select<MaterialType>();
            foreach (var material in response.Materials)
            {
                var type = response.MaterialTypes.FirstOrDefault(e => e.ID == material.TypeID);
                material.TypeName = type == null ? "" : type.Name;
                material.Unit = type == null ? "" : type.Unit;

            }
            return response;
        }
Exemplo n.º 2
0
    public override string ExecuteRequest()
    {
        GetMaterials materials = new GetMaterials();

        List <BIM_Service.Material> list = materials.Get(Pamareters["elementID"]);

        string response = "";

        for (int i = 0; i < list.Count; i++)
        {
            response += "{";
            response += "id:" + list[i].id + ";";
            response += "name:" + list[i].name + ";";
            response += "color:" + list[i].color + ";";
            response += "shininess:" + list[i].shininess + ";";
            response += "smothness:" + list[i].smothness + ";}#";
        }

        return(response);
    }
Exemplo n.º 3
0
    public List <BIM_Service.Material> GetMaterialsFromElement(string id)
    {
        GetMaterials materials = new GetMaterials();

        return(materials.Get(id));
    }