WebSite3/dean/professionalUpdate.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using CheckOnWork.Model;
using CheckOnWork.BusinessLogicLayer;

public partial class dean_professionalUpdate : System.Web.UI.Page
{
    
    static int professionalID;
    static string professionalName;
    CheckOnWork.BusinessLogicLayer.ProfessionalBLL pBll = new ProfessionalBLL();
    protected void Page_Load(object sender, EventArgs e)
    {
        
        

        if (!IsPostBack)
        {
            if (Session["State"].ToString() != "dean")
            {
                Response.Write("<script type='text/javascript'>alert('您还没有登录!无法访问');self.parent.location.href('../default.aspx') </script>");
            }


            professionalID = Convert.ToInt32(Request.QueryString["id"]);
            professionalName = Request.QueryString["name"];

            txtName.Text = professionalName;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {



        int sign = pBll.Update(professionalID, txtName.Text, Convert.ToInt32(Session["departmentId"]));
        if (sign == 1)
        {
            Response.Write("<script type='text/javascript'>alert('更新成功')</script>");


        }
        else Response.Write("<script type='text/javascript'>alert('更新失败')</script>");

    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。