Stock/Stock_return.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 Stock_Stock_return : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Label1.Text = Convert.ToString(Session["username"]);
if (Convert.ToString(Session["username"]) == "")
{
Response.Write("<script language=javascript>alert('请登录');location='../login.aspx'</script>");
}
SqlConnection strcon = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["strcon"]);
strcon.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from tb_Commodity order by id desc",strcon);
DataSet ds = new DataSet();
sda.Fill(ds, "tb_Commodity");
DataRowView rowview = ds.Tables["tb_Commodity"].DefaultView[0];
int CommodityIds = Convert.ToInt32(rowview["CompanyId"]);
this.CommodityId.DataSource = ds.Tables["tb_Commodity"];
this.CommodityId.DataValueField = "id";
this.CommodityId.DataTextField = "CommodityName";
this.CommodityId.DataBind();
SqlCommand scdc = new SqlCommand("select CompanyName from tb_Company where id=" + CommodityIds, strcon);
this.CId.Text = Convert.ToString(scdc.ExecuteScalar());
this.CompanyId.Value = CommodityIds.ToString();
strcon.Close();
this.StockDate.SelectedDate = DateTime.Now;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string CommodityId=this.CommodityId.Text.ToString();
string CompanyId=this.CompanyId.Value.ToString();
int Number = Math.Abs(Convert.ToInt32(this.Number.Text));
int Pirce = Math.Abs(Convert.ToInt32(this.Pirce.Text));
string StockDate=this.StockDate.SelectedDate.ToShortDateString();
string SettlementType=this.SettlementType.Text.ToString();
int Payment = Math.Abs(Convert.ToInt32(Request["Payment"]));
int FactPayment = Math.Abs(Convert.ToInt32(this.FactPayment.Text));
int NotPayment = Math.Abs(Convert.ToInt32(Request["NotPayment"]));
string ManageMan=this.ManageMan.Text.ToString();
string Username=Convert.ToString(Session["username"]);
string AddTime=Convert.ToString(DateTime.Now);
string Type = "进货退货";
//计算输入的金额是否正确
if (Number * Pirce < Payment)
后面还有 29 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
