Student.Web/Manage/CourseEdit.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


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

using Student.Model;

using CC.Common;
namespace Student.Web.Manage
{
    public partial class CourseEdit : BasePage
    {

        #region 基本变量
        private Course info;
        private string action;
        private int id;
        #endregion
        /// <summary>
        /// 页面载入事件
        /// </summary>
        /// <param name="sender">触发事件的对象</param>
        /// <param name="e">事件的参数</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            action = Requests.Query("action");
            id = Utils.StrToInt(Requests.Query("id"));

            if (!IsPostBack)
            {
                BindData();
            }
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void BindData()
        {
            for (int i = 10; i > 0; i--)
                txtCredit.Items.Add(new ListItem(i.ToString(), i.ToString()));

            info = CourseBLL.GetCourseInfo(id);
            if (info != null)
            {

                txtCourseNo.Value = info.CourseNo;
                txtName.Value = info.Name;
                txtIntro.Value = info.Intro;

                try
                {
                    txtCredit.Items.FindByValue(info.Credit.ToString()).Selected = true;
                }
                catch { }
            }
        }
        /// <summary>
后面还有 82 行代码,购买后查看完整代码

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

AI 解读 AI

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

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