Exemplo n.º 1
0
        protected void del_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "delete from 陈凯宇_news3  where Id='" + ID.Text + "'";

            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 2
0
        protected void buy_Click(object sender, EventArgs e)
        {
            string    time   = System.DateTime.Now.ToString();
            string    tai    = "已下单";
            datamysql me     = new datamysql();
            string    strsql = "insert into 陈凯宇_trade(消费者,产品名称,购买数量,购买时间,状态) values('" + user.Text + "'";

            strsql = strsql + ",'" + lblid.Text + "'";
            strsql = strsql + ",'" + txt购买数量.Text + "'";
            strsql = strsql + ",'" + time + "'";
            strsql = strsql + ",'" + tai + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            string strsq2 = "update 陈凯宇_ku set 数量= 数量-" + txt购买数量.Text + " where 产品名='" + lblid.Text + "';";

            me.ExecuteSql(strsq2);
            Response.Write("<script>javascript:alert('恭喜你购买成功!');</script>");
        }
Exemplo n.º 3
0
        protected void yes_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "update 陈凯宇_admin set  ";

            strsql = strsql + " 姓名='" + name.Text + "'";
            strsql = strsql + ",密码='" + password.Text + "'";
            strsql = strsql + " where 姓名='" + name.Text + "'";
            me.ExecuteSql(strsql);
            Response.Write("<script>javascript:alert('修改成功');history.back();</script>");
        }
Exemplo n.º 4
0
        protected void add_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "insert into 陈凯宇_news3(Id,标题,内容,时间) values('" + ID.Text + "'";

            strsql = strsql + ",'" + 标题.Text + "'";
            strsql = strsql + ",'" + 内容.Text + "'";
            strsql = strsql + ",'" + 时间.Text + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 5
0
        protected void modi_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "update 陈凯宇_news3 set  ";

            strsql = strsql + ",标题='" + 标题.Text + "'";
            strsql = strsql + ",内容='" + 内容.Text + "'";
            strsql = strsql + ",时间='" + 时间.Text + "'";

            strsql = strsql + " where Id='" + ID.Text + "'";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 6
0
        protected void add_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "insert into 陈凯宇_trade(消费者,购买数量,产品名称,购买时间) values(";

            strsql = strsql + "'" + 消费者.Text + "'";
            strsql = strsql + ",'" + 购买数量.Text + "'";
            strsql = strsql + ",'" + 产品名称.Text + "'";
            strsql = strsql + ",'" + 购买时间.Text + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 7
0
        protected void modi_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "update 陈凯宇_ku set  ";

            strsql = strsql + " 价格='" + 价格.Text + "'";
            strsql = strsql + ",产品介绍='" + 产品介绍.Text + "'";
            strsql = strsql + ",数量='" + 数量.Text + "'";
            strsql = strsql + ",产品名称='" + 产品名称.Text + "'";
            strsql = strsql + ",图片='" + 图片.Text + "'";
            strsql = strsql + " where Id='" + ID.Text + "'";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 8
0
        protected void add_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "insert into 陈凯宇_ku(产品名,价格,产品介绍,数量,图片) values(";

            strsql = strsql + "'" + 产品名称.Text + "'";
            strsql = strsql + ",'" + 价格.Text + "'";
            strsql = strsql + ",'" + 产品介绍.Text + "'";
            strsql = strsql + ",'" + 数量.Text + "'";
            strsql = strsql + ",'" + 图片.Text + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 9
0
        protected void modi_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "update 陈凯宇_vip set  ";

            strsql = strsql + " 姓名='" + 姓名.Text + "'";
            strsql = strsql + ",密码='" + 密码.Text + "'";
            strsql = strsql + ",地址='" + 地址.Text + "'";
            strsql = strsql + ",联系方式='" + 联系方式.Text + "'";

            strsql = strsql + " where Id='" + ID.Text + "'";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 10
0
        protected void add_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "insert into 陈凯宇_vip(Id,姓名,密码,地址,联系方式) values('" + ID.Text + "'";

            strsql = strsql + ",'" + 姓名.Text + "'";
            strsql = strsql + ",'" + 密码.Text + "'";

            strsql = strsql + ",'" + 地址.Text + "'";
            strsql = strsql + ",'" + 联系方式.Text + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 11
0
        protected void modi_Click1(object sender, EventArgs e)
        {
            datamysql me     = new datamysql();
            string    strsql = "update 陈凯宇_trade set  ";

            strsql = strsql + " 消费者='" + 消费者.Text + "'";
            strsql = strsql + ",购买数量='" + 购买数量.Text + "'";

            strsql = strsql + ",产品名称='" + 产品名称.Text + "'";
            strsql = strsql + ",购买时间='" + 购买时间.Text + "'";

            strsql = strsql + " where Id='" + ID.Text + "'";
            me.ExecuteSql(strsql);
            read_Click1(sender, e);
        }
Exemplo n.º 12
0
        protected void btn_login_Click(object sender, EventArgs e)
        {
            string    guan    = "普通顾客";
            string    bianhao = System.DateTime.Now.ToString("yyyyMMddHHff");
            datamysql me      = new datamysql();
            string    strsql  = "insert into 陈凯宇_vip(姓名,密码,地址,联系方式) values(";

            strsql = strsql + "'" + user1.Text + "'";
            strsql = strsql + ",'" + password1.Text + "'";
            strsql = strsql + ",'" + address.Text + "'";
            strsql = strsql + ",'" + tel.Text + "'";
            strsql = strsql + ")";
            me.ExecuteSql(strsql);
            Response.Write("<script>javascript:alert('恭喜你注册成功!');</script>");
            Response.Redirect("login.aspx");
        }