jingli/diaoboAdd.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class jingli_diaoboAdd : System.Web.UI.Page
{
    sqlConn conn = new sqlConn();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string strsql = "select * from cangku";
            DataSet ds = conn.hsggetdata(strsql);
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                this.cangku.Items.Add(ds.Tables[0].Rows[i]["cangku"].ToString());
            }
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"].ToString().Trim();
        string fasongren = this.fasongren.Value;
        string jieshouren = this.jieshouren.Value;
        string shuliang = this.shuliang.Value;
        string mudicangku = this.cangku.Text;
        string shijian = this.shijian.Text;

        if (shuliang == "")
        {
            Response.Write("<script>javascript:alert('调拨数量不能为空');history.back();</script>");
            return;
        }
        if (shijian == "")
        {
            Response.Write("<script>javascript:alert('调拨时间不能为空');history.back();</script>");
            return;
        }
        if (fasongren == "")
        {
            Response.Write("<script>javascript:alert('发送人不能为空');history.back();</script>");
            return;
        }
        if (jieshouren == "")
        {
            Response.Write("<script>javascript:alert('接收人不能为空');history.back();</script>");
            return;
        }
        string strsql = "";
        string sql = "select * from shangpin where id='" + id + "'";
        DataSet result = new DataSet();
        result = conn.hsggetdata(sql);
        string bianhao = result.Tables[0].Rows[0]["bianhao"].ToString();
        string chima = result.Tables[0].Rows[0]["chima"].ToString();
        string chengben = result.Tables[0].Rows[0]["chengben"].ToString();
        string jiage = result.Tables[0].Rows[0]["jiage"].ToString();
后面还有 40 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。