MyLesson/ServiceUser/CheckWork_Edit.aspx.cs

(开头部分) 5KB

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

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

namespace MyLesson.ServiceUser
{
public partial class CheckWork_Edit : UserForm
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ValidateLogin();
            if (!this.IsPostBack)
            {
                this.InitList();
                if (this.lstUserID.Items.FindByValue(this.Request.QueryString["UserID"] + "") != null)
                {
                    this.lstUserID.ClearSelection();
                    this.lstUserID.Items.FindByValue(this.Request.QueryString["UserID"] + "").Selected = true;
                }
                if (Request.QueryString["CheckWorkID"] + "" != "")
                {
                    string[] strSplit = {"-"};
                    string[] strCheckWorkID = (Request.QueryString["CheckWorkID"] + "").Split(strSplit, StringSplitOptions.None);
                    if (strCheckWorkID.Length == 2)
                    {
                        if (this.lstYear.Items.FindByValue(strCheckWorkID[0]) != null)
                        {
                            this.lstYear.ClearSelection();
                            this.lstYear.Items.FindByValue(strCheckWorkID[0]).Selected = true;
                        }
                        if (this.lstMonth.Items.FindByValue(strCheckWorkID[1]) != null)
                        {
                            this.lstMonth.ClearSelection();
                            this.lstMonth.Items.FindByValue(strCheckWorkID[1]).Selected = true;
                        }
                    }
                }
                this.InitForm();
            }
        }

        public void InitList()
        {
            PRDataContext pr = new PRDataContext();
            if (this.IsDept)
                this.lstUserID.DataSource = pr.Inf_User.Where(s => s.DeptID == this._DeptID);
            else
                this.lstUserID.DataSource = pr.Inf_User;
            this.lstUserID.DataTextField = "UserName";
            this.lstUserID.DataValueField = "UserID";
            this.lstUserID.DataBind();

        }

        public void InitForm()
        {
后面还有 61 行代码,购买后查看完整代码

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

AI 解读 AI

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

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