Ejemplo n.º 1
0
    public string BindLeftTagsProduct(string productid)
    {
        string         strid    = string.Empty;
        productManager objprodu = new productManager();
        DataTable      dt       = new DataTable();

        try
        {
            objprodu.productId = Convert.ToInt32(productid);
            dt = objprodu.SelectProductTag();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (i == 0)
                    {
                        strid = dt.Rows[i]["tagName"].ToString();
                    }
                    else
                    {
                        strid += "," + dt.Rows[i]["tagName"].ToString();
                    }
                }
                return(strid);
            }
            else
            {
                return(strid);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally { dt.Dispose(); objprodu = null; }
    }