stock/stockadd.aspx.cs

(开头部分) 1KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
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;
using dao;
public partial class stock_stockadd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack){
            this.addTime.Text = System.DateTime.Now.ToString();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

		string commodityid=this.commodityid.Text;//商品号

string companyid=this.companyid.Text;//供应商号

string number=this.number.Text;//商品数量

string pirce=this.pirce.Text;//商品单价

string stockdate=this.stockdate.Text;//进货日期

string payment=this.payment.Text;//应付金额

string factpayment=this.factpayment.Text;//实付金额

string notpayment=this.notpayment.Text;//未付金额

string manageman=this.manageman.Text;//经手员工

string username=this.username.Text;//操作人员

string addTime=this.addTime.Text;//修改时间


		
     
        string sql = "insert into stock (commodityid,companyid,number,pirce,stockdate,payment,factpayment,notpayment,manageman,username,addTime ) values ('"+commodityid+"','"+companyid+"','"+number+"','"+pirce+"','"+stockdate+"','"+payment+"','"+factpayment+"','"+notpayment+"','"+manageman+"','"+username+"','"+addTime+"')";
        int row = 0;
        try
        {
            row = DBHelper.ExecuteCommand(sql);
            sql = "update commodity set num=num+" + number + " where c_id='" + commodityid + "'";
            DBHelper.ExecuteCommand(sql);
        }
        catch (Exception ex)
        {
            MessageBox.ShowAndRedirect(this.Page, ex.Message, "stockadd.aspx");
后面还有 5 行代码,购买后查看完整代码

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

AI 解读 AI

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

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