//提交 保存信息到库存盘点表 public static bool AddStock(TransInto t) { Database db = DatabaseFactory.CreateDatabase("Constr"); string sql = string.Format(@"insert into t_TransferringOrder(ID,Date,OutHouseID,InHouseID,ProductsID,Quantity,Price,UserName,TradeDate,Ticket,Description) values('{0}','{1}',{2},{3},{4},{5},'{6}','{7}','{8}','{9}','{10}')", t.ID, t.Date, t.OutHouseID, t.InHouseID, t.ProductsID, t.Quantity, t.Price, t.UserName, t.TradeDate, t.Ticket, t.Description == "" ? " " : t.Description); return(db.ExecuteNonQuery(CommandType.Text, sql) > 0); }
protected void btnSubmit_Click(object sender, EventArgs e) { TransInto s = new TransInto(); s.ID = this.txtOrderID.Text; s.Date = this.txtCreateDate.Text; s.UserName = this.txtPeople.Text; s.OutHouseID = int.Parse(this.txtOut.Text); s.InHouseID = int.Parse(this.txtInto.Text); s.TradeDate = this.DateTime3.Value; //选择日期 s.Ticket = this.txtID.Text; //票号 s.ProductsID = int.Parse(this.ProID.Text); s.Quantity = int.Parse(this.txtBill.Text); s.Description = this.txtDesc.Text; s.Price = Convert.ToDouble(this.txtPrice.Text); bool b = BLL.TransferBLL.TransferManager.AddStock(s); if (b) { Response.Write("<script>alert('提交成功')</script>"); } }
//提交 保存信息到库存盘点表 public static bool AddStock(TransInto t) { return(DAL.TransferDAL.TransferService.AddStock(t)); }