Admin/Form/FAdd.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 FAdd : AdminBase
{
public int _Id=0;
protected void Page_Load(object sender, EventArgs e)
{
Response.CacheControl = "no-cache";
if (!string.IsNullOrEmpty(Request.Params["ID"]))
{
_Id = int.Parse(HttpContext.Current.Request.QueryString["ID"]);
}
if (!Page.IsPostBack)
{
if (_Id != 0)
ShowInfo(_Id);
}
}
//保存
protected void btnSave_Click(object sender, EventArgs e)
{
Entities mydb = new Entities();
{
L_Form Lt = new L_Form();
if (_Id != 0)
Lt = mydb.L_Form.First(p => p.FID == _Id);
Lt.FNmae = txtName.Text.Trim();
Lt.Fother = this.txtTag.Text;
Lt.F1 = this.TextC.Text.Trim();
Lt.FStat = 0;
if (_Id == 0)
{
mydb.L_Form.Add(Lt);
mydb.SaveChanges();
JscriptPrint("表单发布成功啦!", "Flist.aspx", "Success");
}
else
{
mydb.SaveChanges();
JscriptPrint("表单修改成功啦!", "Flist.aspx", "Success");
}
}
// bll.Add(model);
//保存日志
//SaveLogs("[资讯模块]添加文章:" + model.Title);
//JscriptPrint("文章发布成功啦!", "Add.aspx?classId=" + ddlClassId.SelectedValue, "Success");
后面还有 22 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
