boguCms/App_Admin/company/Item.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Model;
using AccessDal;
using System.Web.Security;
public partial class App_Admin_company_Item : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        { GetPage(); }
    }
    protected void GetPage()
    {
        if (Request.Params["p"] == null)
        {
            labtit.Text = "添加公司基本信息(Add Company information )";

        }
        else
        {
            labtit.Text = "修改公司基本公司(Modify the company information  )";
            int id=Convert.ToInt32(Request.QueryString["p"]);
            CompanyInfo info=Company.GetModel(id);
            txtcomtitle.Text = info.ComTitle;
            txtcontent.Text = info.ComContent;
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Request.Params["p"] == null)
        {
            int flag = Company.Add(txtcomtitle.Text, txtcontent.Text, DateTime.Now.ToString());
            if (flag != 0)
            {
                Page.RegisterStartupScript("script", "<script>alert('公司信息添加成功!');window.location.href='Default.aspx'</script>");
            }
            else
            { Page.RegisterStartupScript("script", "<script>alert('数据错误,添加失败!');</script>"); }
        }
        else
        {
               int id=Convert.ToInt32(Request.QueryString["p"]);
               int flag = Company.Update(txtcomtitle.Text, txtcontent.Text, DateTime.Now.ToString(), id);
               if (flag != 0)
               {
                   Page.RegisterStartupScript("script", "<script>alert('公司信息修改成功!');window.location.href='Default.aspx'</script>");
               }
               else
               { Page.RegisterStartupScript("script", "<script>alert('数据错误,修改失败!');</script>"); }
        }
    }
    protected void addbtn_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default.aspx");
    }
后面还有 1 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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