private void Update() { Power.DepartmentModel model = new Power.DepartmentModel(); model.DEPT_FUNC = txtDEPT_FUNC.Value; model.DEPT_ID = int.Parse(Request.QueryString["DeptID"].ToString()); model.DEPT_NAME = txtDEPT_NAME.Text; model.DEPT_NO = txtDEPT_NO.Text; model.FAX_NO = txtFAX_NO.Text; model.TEL_NO = txtTEL_NO.Text; int iReturn = powerservice.Department_Update(model); if (iReturn > 0) { Response.Write("<script>alert('修改成功!');parent.frames('_deptLeft').frames('_deptList').location.reload();</script>"); } else { Response.Write("<script>alert('修改失败,请与管理员联系!');</script>"); } }
private void New() { Power.DepartmentModel model = new Power.DepartmentModel(); model.DEPT_FUNC = txtDEPT_FUNC.Value; model.DEPT_NAME = txtDEPT_NAME.Text; model.DEPT_NO = txtDEPT_NO.Text; model.FAX_NO = txtFAX_NO.Text; model.TEL_NO = txtTEL_NO.Text; int iReturn = powerservice.Department_Insert(model); if (iReturn > 0) { Response.Write("<script>alert('新建成功!');parent.frames('_deptLeft').frames('_deptList').location.reload();location=location.href;</script>"); } else { Response.Write("<script>alert('新建失败,请与管理员联系!');</script>"); } }