private void GetDetailsById(int brandID) { category = new Category(); purchaseData = new PurchaseData(); DataSet DS = new DataSet(); category.CategoryId = brandID; category.CategoryName = string.Empty; category.Description = string.Empty; category.Flag = 2; DS = purchaseData.GetCategoryList(category); if (!Comman.Comman.IsDataSetEmpty(DS)) { txtCategoryName.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["ItemCategoryName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["ItemCategoryName"].ToString(); txtDesciption.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["ItemCategoryDesc"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["ItemCategoryDesc"].ToString(); dpIsActive.ClearSelection(); if (DS.Tables[0].Rows[0]["IsActive"].ToString() == "True") { dpIsActive.Items.FindByValue("1").Selected = true; } else { dpIsActive.Items.FindByValue("2").Selected = true; } } btnSubmit.Visible = false; btnUpdate.Visible = true; upModal.Update(); }
private void GetList() { category = new Category(); purchaseData = new PurchaseData(); DataSet DS = new DataSet(); category.Flag = 0; //Select * category.CategoryName = string.Empty; category.Description = string.Empty; DS = purchaseData.GetCategoryList(category); if (!Comman.Comman.IsDataSetEmpty(DS)) { rpBrandInfo.DataSource = DS; rpBrandInfo.DataBind(); } }