edit.aspx.cs

来自「基于WEB的在线考试系统建立在系统后台的数据库的基础上」· CS 代码 · 共 61 行

CS
61
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Components.Model;
public partial class Teacher_Edit : System.Web.UI.Page
{
    BLL.Teacher.CommonOp Op = new BLL.Teacher.CommonOp();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int TypeID = int.Parse(Request.QueryString["Type"].ToString());
            int TopicID = int.Parse(Request.QueryString["ID"].ToString());
            DataBand(TopicID, TypeID);
        }

    }

    private void DataBand( int ID,int TypeID)
    {
        Mselect Ms = Op.get_Info_ByID(ID, TypeID);
        content.Value = Ms.Texts.ToString();
        Keys.Text = Ms.Keys;
        sign.Text = TypeID.ToString();
        TID.Text = ID.ToString();


    }
    protected void subdata_Click(object sender, EventArgs e)
    {
        if (!content.Value.Trim().Equals(""))
        {
            Mselect ms = new Mselect();
            ms.Texts = content.Value.Trim();
            ms.Keys = Keys.Text.Trim();
            ms.DifficultLevel = int.Parse(DifficultLevel.SelectedValue.ToString());
            ms.ID = int.Parse(TID.Text.ToString());
            if (Op.Updata_Topic(ms, int.Parse(sign.Text.ToString())))
            {
                content.Value = "";
                Image1.ImageUrl = "Images/pass.gif";
                subdata.Enabled = false;
            }
            else
            { 
                Image1.ImageUrl="Images/stop.gif";
                return;
            }

        }
        
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?