Web/Admin/Article/Add.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.Collections.Generic;
namespace Web.Admin.Article
{
public partial class Add : Web.UI.ManagePage
{
public BLL.Article bll = new BLL.Article();
public Model.Article model = new Model.Article();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
chkLoginLevel("addArticle");
//绑定类别
ChannelTreeBind(0, "请选择所属类别...", (int)Channel.Article, this.ddlClassId);
ChannelTreeBind("请选择手机类型...", (int)Channel.Pictures, this.ddl_model);
if (!string.IsNullOrEmpty(Request.Params["classId"]))
{
ddlClassId.SelectedValue = Request.Params["classId"].Trim();
}
}
}
//保存
protected void btnSave_Click(object sender, EventArgs e)
{
//取得图片集合,添加相片
string firstImg = "";
string hideFiles = Request.Params["hideFiles"];
if (!string.IsNullOrEmpty(hideFiles))
{
string[] fileArr = hideFiles.Split(',');
for (int i = 0; i < fileArr.Length; i++)
{
//生成缩略图
firstImg = ImgMakeThumbnail(fileArr[i]);
}
}
model.ImgUrl = txtImgUrl.Text.Trim();
model.Title = txtTitle.Text.Trim();
model.Author = txtAuthor.Text.Trim();
model.Form = txtForm.Text.Trim();
//自动提取关健字
if (txtKeyword.Text.Trim() != string.Empty)
{
model.Keyword = txtKeyword.Text.Trim();
}
else
{
model.Keyword = txtTitle.Text.Trim();
}
//自动提取摘要
if (txtZhaiyao.Text.Trim() != string.Empty)
{
model.Zhaiyao = Utils.DropHTML(txtZhaiyao.Text, 250);
后面还有 63 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。