Admin/nr_add.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Maticsoft.Common;
using LTP.Accounts.Bus;
public partial class Admin_nr_add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSave_Click(object sender, EventArgs e)
    {

        string strErr = "";
        if (this.txttitle.Text.Trim().Length == 0)
        {
            strErr += "标题不能为空!\\n";
        }
        if (this.txtnrType.Text.Trim().Length == 0)
        {
            strErr += "类型不能为空!\\n";
        }
        if (this.txtcontent.Value.Trim().Length == 0)
        {
            strErr += "内容不能为空!\\n";
        }
        
        if (!PageValidate.IsDateTime(txtinsertdate.Text))
        {
            strErr += "时间格式错误!\\n";
        }

        if (strErr != "")
        {
            MessageBox.Show(this, strErr);
            return;
        }
        string title = this.txttitle.Text;
        string nrType = this.txtnrType.Text;
        string content =Server.HtmlEncode(this.txtcontent.Value);
        string strPath=Server.MapPath("~/files/")+this.txtnrUrl.FileName;
        if (this.txtnrUrl.FileName != "")
        {
            this.txtnrUrl.SaveAs(strPath);
        }


        string nrUrl ="files\\" +this.txtnrUrl.FileName;
        DateTime insertdate = DateTime.Parse(this.txtinsertdate.Text);

        KEPX.Model.Nrong model = new KEPX.Model.Nrong();
        model.title = title;
        model.nrType = nrType;
        model.content = content;
后面还有 15 行代码,购买后查看完整代码

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

AI 解读 AI

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

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