Web/Class/Change.aspx.cs

(开头部分) 1KB

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

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

namespace CAS.Web.Class
{
    public partial class Change : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = Request.QueryString["ID"];
            BLL.Class BLL = new BLL.Class();
            Model.Class IMC = BLL.GetModel(int.Parse(ID));
            string Final = "";

            try
            {

                string[] APL = IMC.PersonList.Split('|');

                if (CC(APL, ID))
                {//存在 删除
                    for (int i = 0; i < APL.Length; i++)
                    {
                        if (APL[i] == ID)
                        {
                            APL[i] = "";
                        }
                    }
                }
                else
                {//不存在 添加 
                    APL[APL.Length] = ID;
                }

                
                foreach (string item in APL)
                {
                    Final += item + "|";
                }
            }
            catch(Exception ees)
            {
                Final = ID + "|";
            }
            
            IMC.PersonList = Final;
            BLL.Update(IMC);

            //Response.Redirect("Modify.aspx?id=" + ID);
        }

        bool CC(string[] APL, string match)
        {
            foreach (string SA in APL)
            {
                if (SA == match)
                {
后面还有 8 行代码,购买后查看完整代码

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

AI 解读 AI

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

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