Web/mem/wpAdd.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class mem_Default : System.Web.UI.Page
{
UBW.BLL.books bll = new UBW.BLL.books();
UBW.BLL.bookType bll2 = new UBW.BLL.bookType();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack && Session["lname"]!=null)
{
DataSet dstid = bll2.GetAll();
ddltid.DataSource = dstid;
ddltid.DataTextField = "tname";
ddltid.DataValueField = "tid";
ddltid.DataBind();
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string addrpic = "";
if (fppic.HasFile)
{
string name = this.fppic.PostedFile.FileName;
int i = name.LastIndexOf('.');
string extname = name.Substring(i);
string filename = DateTime.Now.ToString("yyyyMMddhhmmssfff");
string path = filename + extname;
string savePath = Server.MapPath(@"..\uploads\" + filename + extname);
fppic.PostedFile.SaveAs(savePath);
addrpic = path;
}
UBW.Model.books model = new UBW.Model.books();
model.bname = txt_bname.Text;
model.tid = int.Parse(ddltid.SelectedValue);
model.author = txt_author.Text;
model.pic = addrpic;
model.oprice = decimal.Parse(txt_oprice.Text);
model.price = decimal.Parse(txt_price.Text);
model.memo = elm1.Value;
model.atime = DateTime.Now.ToString();
model.lname = Session["lname"].ToString();
model.quan = int.Parse(txt_quan.Text);
bll.Insert(model);
UBW.Common.Msg.ShowAndRedirect ( "操作成功,请返回!", "wpAdd.aspx");
}
后面还有 4 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。