Ejemplo n.º 1
0
    public List <productManager> BindMasterProductdata(string id)
    {
        productManager objProduct = new productManager();

        objProduct.productId = Convert.ToInt32(id);
        List <productManager> lmp = new List <productManager>();
        DataTable             dt  = new DataTable();

        dt = objProduct.SelectSingleItemById();
        productManager PMS = new productManager();

        foreach (DataRow dr in dt.Rows)
        {
            PMS.sku                = dr["sku"].ToString();
            PMS.productName        = dr["productName"].ToString();
            PMS.productDescription = dr["productDescription"].ToString();
        }

        DataTable dt1 = new DataTable();

        dt1 = objProduct.GetProductNameAndDescriptionByLanguageid();
        if (dt1.Rows.Count > 1)
        {
            for (int i = 0; i < dt1.Rows.Count - 1; i++)
            {
                PMS.ArabicName        = dt1.Rows[i + 1]["ArabicName"].ToString();
                PMS.ArabicDescription = dt1.Rows[i + 1]["ArabicDescription"].ToString();
                lmp.Add(PMS);
            }
        }
        else
        {
            PMS.ArabicName        = "";
            PMS.ArabicDescription = "";
            lmp.Add(PMS);
        }

        return(lmp);
    }