web/InventoryBalanceReport.aspx.vb
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
Imports BLL
Imports Model
Imports System.Data
Imports System.Data.SqlClient
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO
Partial Class InventoryBalanceReport
Inherits System.Web.UI.Page
Dim Syscrf As New SystemBLL()
Private dsalereport As New DSalesReport
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btn_ibreport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ibreport.Click
File.Copy(Server.MapPath("~/App_Code/InventoryBalanceReport.xls"), Server.MapPath("~/rossofiles/InventoryBalanceReport.xls"), True)
'Dim exportdt As DataTable = Syscrf.seachData("select * from InventoryBalanceReportView where ITEMID>='" & txtfirstno.Text & "' and ITEMID<='" & txtlastno.Text & "'").Tables(0)
Dim exportdt As DataTable = New DataTable()
If txtfirstno.Text.Trim.Length = 0 And txtlastno.Text.Trim.Length = 0 Then
exportdt = Syscrf.seachData("select * from InventoryBalanceReportView ").Tables(0)
ElseIf txtfirstno.Text.Trim.Length = 0 And txtlastno.Text.Trim.Length <> 0 Then
exportdt = Syscrf.seachData("select * from InventoryBalanceReportView where ITEMID<='" & txtlastno.Text & "'").Tables(0)
ElseIf txtfirstno.Text.Trim.Length <> 0 And txtlastno.Text.Trim.Length = 0 Then
exportdt = Syscrf.seachData("select * from InventoryBalanceReportView where ITEMID>='" & txtfirstno.Text & "'").Tables(0)
Else
exportdt = Syscrf.seachData("select * from InventoryBalanceReportView where ITEMID>='" & txtfirstno.Text & "' and ITEMID<='" & txtlastno.Text & "'").Tables(0)
End If
Dim tmpline As Integer = 6
For i As Integer = 0 To exportdt.Rows.Count - 1
'dsalereport.ExecuteSql("UPDATE [INVOICE$D" & tmpline & " " & tmpline & "] SET F1 = @value")
'dsalereport.Parameters.Add("@value", DbType.Int32).Value = CType(exportdt.Rows("qty"), Integer)
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$A" & tmpline & ":A" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("ITEMID").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$B" & tmpline & ":B" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("DESCRIPTION").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$C" & tmpline & ":C" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("PHYSICALINVENT").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$D" & tmpline & ":D" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("MC").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$E" & tmpline & ":E" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("CostAmount").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$F" & tmpline & ":F" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("PRICE").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$G" & tmpline & ":G" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("Amount").ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$H" & tmpline & ":H" & tmpline & "] SET F1 = '" & exportdt.Rows(i)("Expr1").ToString & "'") = True Then
End If
tmpline += 1
Next
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$B" & 3 & ":B" & 3 & "] SET F1 = '" & Now.Year.ToString & "-" & Now.Month.ToString & "-" & Now.Day.ToString & "'") = True Then
End If
If dsalereport.ExecuteSql("UPDATE [InventoryBalance$B" & 4 & ":B" & 4 & "] SET F1 = '" & Request.Cookies("sh")("userid").ToString & "'") = True Then
End If
Dim sumdt As DataTable = New DataTable()
'----------------
If txtfirstno.Text.Trim.Length = 0 And txtlastno.Text.Trim.Length = 0 Then
sumdt = Syscrf.seachData("SELECT SUM(CostAmount) AS sumcostamount, SUM(Amount) AS sumamount, SUM(PHYSICALINVENT) AS sumqty FROM InventoryBalanceReportView").Tables(0)
后面还有 20 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
