AddInOut.aspx.cs

(开头部分) 4KB

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

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

public partial class AddInOut : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }
    private void bindData()
    {
        string st = "select * from Goods,Store where Goods.GID=Store.SGID and SWID='"+Session["Udep"].ToString()+"'order by GID desc";
        SqlConnection con = WMS.createCon();
        con.Open();
        SqlCommand da = new SqlCommand(st, con);
        SqlDataReader cn = da.ExecuteReader();
        while(cn.Read())
        {
            DropDownList1.Items.Add(new ListItem (cn["GID"].ToString()));
        }
        con.Close();
        BindTextBox();
    }
    private void BindTextBox()
    {
        string st1 = "select SQuantity,STopLine from Store where SGID='" + DropDownList1.Text+ "'";
        SqlConnection con = WMS.createCon();
        con.Open();
        SqlCommand da = new SqlCommand(st1, con);
        SqlDataReader dr = da.ExecuteReader();
        if (dr.Read())
        {
            TextBox2.Text = dr["SQuantity"].ToString();
            TextBox3.Text = dr["STopLine"].ToString();
            TextBox4.Text = dr["SQuantity"].ToString();
            TextBox5.Text = Convert.ToString(int.Parse(TextBox3.Text) - int.Parse(TextBox2.Text));
        }
        else
        {
            Response.Write("<script language=javascript>alert('对不起,没有该产品信息')</script>");
        }
        if (RadioButton1.Checked == true)
        {
            RangeValidator1.MaximumValue = TextBox5.Text;
            RangeValidator1.MinimumValue = "0";
        }
后面还有 56 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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