private bool Delete() { bool boRetValue = false; string stIDs = ""; foreach (DataListItem item in lstItem.Items) { HtmlInputCheckBox chkList = (HtmlInputCheckBox)item.FindControl("chkList"); if (chkList != null) { if (chkList.Checked == true) { stIDs += chkList.Value + ","; boRetValue = true; } } } if (boRetValue) { ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(); clsUnitMatrix.Delete(stIDs.Substring(0, stIDs.Length - 1)); clsUnitMatrix.CommitAndDispose(); } return(boRetValue); }
private bool Delete() { bool boRetValue = false; string stIDs = ""; foreach(DataListItem item in lstItem.Items) { HtmlInputCheckBox chkList = (HtmlInputCheckBox) item.FindControl("chkList"); if (chkList!=null) { if (chkList.Checked == true) { stIDs += chkList.Value + ","; boRetValue = true; } } } if (boRetValue) { ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(); clsUnitMatrix.Delete(stIDs.Substring(0,stIDs.Length-1)); clsUnitMatrix.CommitAndDispose(); } return boRetValue; }