예제 #1
0
        public void ProcessRequest(HttpContext context)
        {
            bool result = isTrue(context);

            if (result)
            {
                context.Response.ContentType = "text/html";
                DepartmentInfo info = getData(context);

                DepartmentService service = new DepartmentService();
                if (service.AddDepartmentWithParameter(info))
                {
                    Alert.AlertMessage("添加成功");
                    context.Response.Redirect("../asp/Backstage/DepartmentAdd.aspx");
                }
                else
                {
                    Alert.AlertFailed("添加失败");
                }
            }
            else
            {
                Alert.AlertFailed("添加失败,请检查输入数据是否为空");
            }
        }