admin/Company/CompanyEdit.aspx.cs

(开头部分) 2KB

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

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 System.Data.OleDb;
using SystemBll;
using SystemCompany;

public partial class admin_Company_CompanyEdit : System.Web.UI.Page
{
    BLL bll = new BLL();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            BindData();
        }
    }
    private void BindData()
    {
        BindDllClass();
        DataSet ds = bll.select_yes("company", "id=@n0", null, Request["id"].ToString());
        ddlclass.Text = ds.Tables[0].Rows[0]["classid"].ToString();
        WebEditor1.Text = ds.Tables[0].Rows[0]["content"].ToString();
        WebEditor2.Text = ds.Tables[0].Rows[0]["content_en"].ToString();
        Updatabtn.CommandArgument = ds.Tables[0].Rows[0]["id"].ToString();
    }
    private void BindDllClass()
    {
        DataSet ds = bll.select_all("companyclass");
        ddlclass.DataSource = ds;
        ddlclass.DataTextField = "name";
        ddlclass.DataValueField = "cid";
        ddlclass.DataBind();
    }
    protected void Updatabtn_Click(object sender, EventArgs e)
    {
        if (Page.IsValid == true)
        {
            string id = Updatabtn.CommandArgument.ToString();
            //string title1 = title.Text.Trim();
            string content = WebEditor1.Text;
            string content_en = WebEditor2.Text;
            string classid = ddlclass.SelectedValue.ToString();
            int a = Company.UpdatecompanyData(content,content_en,classid);
            if (a > 0)
            {
                Response.Write("<script>if (confirm('" + "修改信息成功!是-转到列表,否-选择继续修改" + "')){window.location.href='CompanyList.aspx'}</script>");
            }
            else
            {
                MessageBox.Show(Page, "修改失败!");
            }
        }
后面还有 10 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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