protected void DgStoreAuxCost_ItemCommand(object source, DataGridCommandEventArgs e) { // must be the add button - there is nothing else if (ValidateEntry(((TextBox)e.Item.FindControl("txtStoreAuxCost")).Text.Trim(), "Store")) { AddNewParm(e.Item, "Store"); } else { ServerJScript.JSAlert(this, "AuxCost parameter invalid - it must begin with Store and must be unique"); } }
private void NavigateClient(string page) { int orgId = Convert.ToInt32(Session["OrgID"]); var reader = DataCommand().Param("Action", "ByOrg").Param("OrgID", orgId).ExecuteReader("sselData.dbo.Department_Select"); bool noDept = !reader.Read(); if (noDept) { ServerJScript.JSAlert(Page, "Please add a department to the organization before adding clients."); } else { Response.Redirect(page); } }