/// <summary> /// 添加数据 /// </summary> protected void btn_add_Click(object sender, EventArgs e) { if (txt_Name.Text.Trim() != "" || txt_order.Text.Trim() != "" || Lib.TypeParse.IsUnsign(txt_order.Text.Trim())) { RedGlovePermission.Model.RGP_Groups model = new RedGlovePermission.Model.RGP_Groups(); model.GroupName = txt_Name.Text.Trim(); model.GroupDescription = txt_Description.Text.Trim(); model.GroupOrder = int.Parse(txt_order.Text.Trim()); if (!bll.Exists(txt_Name.Text.Trim())) { if (bll.CreateGroup(model)) { ScriptManager.RegisterClientScriptBlock(CustomPanel1, this.GetType(), "MsgBox", "alert('" + ResourceManager.GetString("Pub_Msg_add_true") + "')", true); } else { ScriptManager.RegisterClientScriptBlock(CustomPanel1, this.GetType(), "MsgBox", "alert('" + ResourceManager.GetString("Pub_Msg_add_false") + "')", true); } txt_Name.Text = ""; txt_Description.Text = ""; txt_order.Text = ""; BindOrder(); } else { ScriptManager.RegisterClientScriptBlock(CustomPanel1, this.GetType(), "MsgBox", "alert('" + ResourceManager.GetString("Pub_Msg_Isgroup") + "')", true); } } }