Admin/News/Copy.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
using Models;
public partial class Add : AdminBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ClassTreeBindFV("0", "请选择所属类别...", this.DropDownList1);
string allids = Request.QueryString["ids"];
if (allids != "")
{
this.txtName.Text = allids.Remove(allids.Length - 1);
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.txtName.Text == "")
{
JscriptPrint("没有选择任何文档!", "", "Success");
}
else
{
Entities mydb = new Entities();
string allids = Request.QueryString["ids"];
string[] allidss = allids.Remove(allids.Length - 1).Split('-');
foreach (var item in allidss)
{
int newid = int.Parse(item);
int fid = int.Parse(this.DropDownList1.SelectedValue);
L_Newss onenews = mydb.L_Newss.Single(p => p.NID == newid);
L_Newss ln = new L_Newss();
ln.ClassId = fid;
ln.Title = onenews.Title;
ln.Author=onenews.Author;
ln.From=onenews.From;
ln.Tag=onenews.Tag;
ln.ZhaiYao=onenews.ZhaiYao;
ln.Img=onenews.Img;
ln.Content=onenews.Content;
ln.Click=onenews.Click;
ln.Url=onenews.Url;
ln.Time=DateTime.Now;
ln.IsTop=onenews.IsTop;
ln.IsHot=onenews.IsHot;
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
