protected void btnSave_Click(object sender, ImageClickEventArgs e) { RoleBLL bll = new RoleBLL(); if (Action.ToUpper() == "EDIT") { if (bll.UpdateRole(RoleCode, txtRoleName.Text, ddlProcess.SelectedValue, ddlOrg.SelectedValue, Description.Text)) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('更新成功');</script>"); } else { ExecAlertScritp("更新失败!"); } } else { if (bll.AddNewRole(txtRoleName.Text, ddlProcess.SelectedValue, ddlOrg.SelectedValue, Description.Text)) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('添加成功');</script>"); } else { ExecAlertScritp("添加失败!"); } } }
protected void btnSave_Click(object sender, EventArgs e) { RoleBLL bll = new RoleBLL(); if (Action.ToUpper() == "EDIT") { //DBManager.UpdateRole(RoleCode, txtRoleName.Text, ddlProcess.SelectedValue); bll.UpdateRole(RoleCode, txtRoleName.Text, ddlProcess.SelectedValue, ddlOrg.SelectedValue, ""); } else { //DBManager.AddNewRole(txtRoleName.Text, ddlProcess.SelectedValue); bll.AddNewRole(txtRoleName.Text, ddlProcess.SelectedValue, ddlOrg.SelectedValue, ""); } litScript.Text = "<script>window.returnValue='';window.close();</script>"; }