• 大小: 716KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: C#
  • 标签: C#  asp.net  

资源简介

大学时候开发的二手交易系统,内含数据库,请自行配置

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class AddProductor : System.Web.UI.Page
{
    DataAccess Marketbase = new DataAccess();
    protected void Page_Load(object sender EventArgs e)
    {

        if (!IsPostBack)
        {
            SqlConnection conn = new SqlConnection(Marketbase.Sqlbase);
            conn.Open();
            DataTable dt1 = new DataTable();
            dt1 = Marketbase.DisPlayList_Ds(“select * from GoodType“ conn);
            firstKind.DataTextField = “TypeName“;
            firstKind.DataValueField = “GoodTypeID“;
            firstKind.DataSource = dt1.DefaultView;
            firstKind.DataBind();
            DataTable dt = new DataTable();
            int id = int.Parse(firstKind.Value);
            dt = Marketbase.DisPlayList_Ds(“select * from GoodType2 where GoodTypeID=‘“ + id + “‘“ conn);
            secondKind.DataTextField = “GoodType2Name“;
            secondKind.DataValueField = “GoodType2ID“;
            secondKind.DataSource = dt.DefaultView;
            secondKind.DataBind();
        }
        

    }
  protected void btSave_Click(object sender EventArgs e)
    {
        if (Session[“UserId“] == null)
            lbinforn.Text = “请先登录再发表新的信息“;
        else
        {
            int state;
            string picpath;
            string useridnumber = Session[“UserId“].ToString();
            string markeddate = DateTime.Now.ToString(“yyyy-MM-dd“);
            string time = txtTime.Value;
            string CheckFlag;
            string Pic;
                SqlConnection conn = new SqlConnection(Marketbase.Sqlbase);
                conn.Open();
                HttpPostedFile httpup = FileUp.PostedFile;
                if (httpup.ContentLength != 0)
                {
                    string PathFileName = httpup.FileName;
                    int i = PathFileName.LastIndexOf(“\\“);
                    string filename = PathFileName.Substring(i + 1);
                    httpup.SaveAs(Server.MapPath(“images/pic/“ + filename));
                    picpath = “images/pic/“ + filename;
                    Pic = “1“;
                    CheckFlag = “1“;
                }
                else
                {
                    picpath = null;
                    Pic = “0“;
                    CheckFlag = “0“;
                }
                string test = “insert into goods(GoodstitleflagEmailIsGoodsPicContractManPhoneAddressContentBuySellPricePicPathProTimeProTimeEndGoodTypeIDGoodType2IDuserid)“
                + “values(‘“ + txttitle.Value + “ ‘‘“ + CheckFlag + “‘‘“ + txtEmail.Value + “‘ ‘“ + Pic + “ ‘‘“ + txtName.Value + “‘‘ “ + txtPhone.Value + “‘‘“ + 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      10234  2010-01-08 02:34  shop\AddProductor.aspx

     文件       4559  2008-04-26 17:02  shop\AddProductor.aspx.cs

     文件       2225  2010-01-08 13:56  shop\admin_default.aspx

     文件       2081  2008-04-26 09:48  shop\admin_default.aspx.cs

     文件       1607  2010-01-12 09:51  shop\admin_login.aspx

     文件       1069  2010-01-12 09:51  shop\admin_login.aspx.cs

     文件       2020  2010-01-08 13:56  shop\admin_user.aspx

     文件       1881  2009-05-08 08:10  shop\admin_user.aspx.cs

     文件        107  2008-04-26 17:10  shop\ajaxServer.aspx

     文件       1310  2008-04-26 19:18  shop\ajaxServer.aspx.cs

     文件      15006  2010-01-08 19:11  shop\App_Code\database.cs

     文件    2031616  2010-01-14 22:05  shop\App_Data\market_Data.MDF

     文件    1048576  2010-01-14 22:05  shop\App_Data\market_Log.LDF

     文件     180224  2003-04-29 17:13  shop\bin\Microsoft.Web.UI.WebControls.dll

     文件       9980  2009-05-08 08:27  shop\Calendar.js

     文件        492  2008-04-26 09:48  shop\cj.ascx

     文件       1349  2008-04-26 09:48  shop\cj.ascx.cs

     文件       4966  2010-01-08 02:34  shop\default.aspx

     文件       1515  2008-04-26 09:48  shop\default.aspx.cs

     文件       6366  2010-01-08 17:02  shop\Detail.aspx

     文件       2788  2010-01-14 01:29  shop\Detail.aspx.cs

     文件        644  2008-04-26 09:48  shop\detailpic.aspx

     文件       1485  2008-04-26 09:48  shop\detailpic.aspx.cs

     文件        500  2008-04-26 09:48  shop\GL.ascx

     文件       1353  2008-04-26 09:48  shop\GL.ascx.cs

     文件       1064  2008-04-26 09:48  shop\Global.asax

     文件       1194  2010-01-07 14:22  shop\head_foot.css

     文件       3054  2010-01-08 02:37  shop\help.aspx

     文件        405  2008-04-26 09:48  shop\help.aspx.cs

     文件        901  2008-04-26 09:48  shop\HotProductor.ascx

............此处省略61个文件信息

评论

共有 条评论