protected void btnAdd_Click(object sender, EventArgs e) { string id = Request.QueryString["id"].ToString(); string a = this.txt_Flooer.Value; Model.floor_manage fm = new Model.floor_manage(); fm.floor_name = a; if (id == "") { int b = fmBll.Add(fm); if (b > 0) { Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", ""); } } else { fm.floor_id = Convert.ToInt32(id); if (fmBll.Update(fm)) { Maticsoft.Common.MessageBox.ShowAndRedirect(this, "更新成功!", ""); } } }
protected void btnAdd_Click(object sender, EventArgs e) { string id = Request.QueryString["id"].ToString(); string a = this.txt_Flooer.Value; Model.floor_manage fm = new Model.floor_manage(); fm.floor_name = a; fm.floor_sorting = DDlLD.SelectedValue; if (id == "") { int b = fmBll.Add(fm); if (b > 0) { ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('保存成功');parent.Window_Close();</script>"); } } else { fm.floor_id = Convert.ToInt32(id); if (fmBll.Update(fm)) { ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('更新成功');parent.Window_Close();</script>"); } } }