//维护窗口提交按钮 protected void BtnOK_NewRisk_Click(object sender, EventArgs e) { if (TxtNewRisk.Text == "") { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入风险等级!')", true); return; } try { if (hSFBasicDataL.Insert_HSFReskLevel(TxtNewRisk.Text) <= 0) { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('该风险等级已经存在!')", true); return; } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('编辑失败!" + ex + "')", true); return; } ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('新增成功!')", true); TxtNewRisk.Text = ""; BindcR = ""; BindGridviewRisk(BindcR); Panel_NewRisk.Visible = false; UpdatePanel_NewRisk.Update(); UpdatePanel_GridRisk.Update(); }
//检索栏新增按钮 protected void BtnNewRisk_Click(object sender, EventArgs e) { TxtNewRisk.Text = ""; Panel_NewRisk.Visible = true; UpdatePanel_NewRisk.Update(); }