Sunday, November 23, 2014

asp.net for loop on dataset

 ds = _categorymappingpresenter.getCategories(advisorId);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                category_entity.AdvisorId = Convert.ToString(_webcontext.GetFromSession("AdvisorId"));
                category_entity.Action = "U";
                category_entity.CategoryName = ds.Tables[0].Rows[i]["CategoryName"].ToString();
                category_entity.CategoryRating = ds.Tables[0].Rows[i]["Id"].ToString();
                category_entity.CategoryId = Convert.ToInt32(ds.Tables[0].Rows[i]["CategoryId"]);
                category_entity.Result = _categorymappingpresenter.addModifyCategory(category_entity);

            }

No comments:

Post a Comment