printDoc.PrinterSettings.PrinterName="Microsoft Print to PDF"
printDoc.PrinterSettings.PrintToFile = True
printDoc.PrinterSettings.PrintFileName = "c:\1.pdf"
printDoc.PrinterSettings.PrinterName="Microsoft Print to PDF"
printDoc.PrinterSettings.PrintToFile = True
printDoc.PrinterSettings.PrintFileName = "c:\1.pdf"
重新開發 Winows POS 系統 2023 前台系統(網路版) 已完成95%
後續將繼續重新開發 Windows POS 系統 2023 後台系統(網路版)
現階段將先把 Windows 平台的 POS 系統完成
未來將開發 WebAPP POS 版本 (雲端版本)
系統結構將能使用在各種平台(Windows/WebAPP)
WebAPP 即可在 Windows/Linux/Android/IOS 等裝置平台上操作使用
歡迎有興趣洽談 池龍工作室
---
為什麼要重新開發?
因為以前都整合前後台一起,現在重新開發的版本會拆開分成:
前台 , 後台 , 資料交換
另一個重點,是要和別公司合作;所以不打算用現行已在市面運作的POS系統!
用全新的系統合作,較不影響現行的客戶
---
c#:
public bool Test()
{
using (var tcp = new TcpClient())
{
var c = tcp.BeginConnect(IPAddress.Parse("8.8.8.8"), 8080, null, null);
var success = c.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(1));
if (!success)
{
Console.WriteLine("Before cleanup");
tcp.Close();
tcp.EndConnect(c);
Console.WriteLine("After cleanup");
throw new Exception("Failed to connect.");
}
}
return true;
}
vbnet:
Public Function Test() As Boolean
Using tcp As Object = New TcpClient()
Dim c As Object = tcp.BeginConnect(IPAddress.Parse("8.8.8.8"), 8080, Nothing, Nothing)
Dim success As Object = c.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(1))
If Not success Then
Console.WriteLine("Before cleanup")
tcp.Close()
tcp.EndConnect(c)
Console.WriteLine("After cleanup")
Throw New Exception("Failed to connect.")
End If
End Using
Return True
End Function
====
調整用法:
Public Function Test() As Boolean
Using tcp As Object = New TcpClient()
Dim c As Object = tcp.BeginConnect(IPAddress.Parse("192.168.1.78"), 1435, Nothing, Nothing)
Dim success As Object = c.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(1))
If Not success Then
tcp.Close()
Return False
End If
End Using
Return True
End Function
解决Chrome 下载带半角分号出现net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION的问题
方式一:添加双引号
Response.AddHeader("content-disposition", "attachment; filename=\"" + FileName + "\"")
方式二:替换掉文件的半角分号
var FileName = "www.kzwr.com,酷站网软".Replace(",", "")
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=" & FileName)
Response.BinaryWrite(myPDF)
IIS 6.0預設的上傳檔案大小只有200KB喔!
以記事本開啟 C:\windows\sytem32\inetserv\metabase.xml 上傳限制: 找尋 AspMaxRequestEntityAllowed 字串 將 204800 (200K) 修改成你要的數字 下載限制: 找尋 AspBufferingLimit 字串 預設 4MB ,將它修改成你要的數字==============================================
在IIS7的ASP檔案上傳下載的限制設定如下:
進入伺服器管理員–>IIS管理員–>站台–>ASP(開啟功能)–>限制內容
其中的
[要求實體的上限]:4194304(bytes) –>即是允許下載檔案的大小限制
[回應緩衝處理限制]:3000000(bytes) –>即是允許上傳檔案的大小限制
依實際需求修改大小(bytes),並可正常上傳及下載.
----
CodeGuru 涵蓋與 Microsoft 相關的軟件開發、移動開發、數據庫管理和 Web 應用程序編程相關的主題。 除了教程序員如何使用 Microsoft 相關語言和框架(如 C# 和 .Net)進行編碼的教程和操作方法外,我們還發布了有關軟件開發工具的文章、最新的開發人員新聞以及對項目經理的建議。 Microsoft Azure 等雲服務和 SQL Server 和 MSSQL 等數據庫選項也經常包含在內。
----
Filtering In Datagridview In Vb.Net And Also In C# 參考完整的code
其他簡易處理方法:
#1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ElementaryDataGridView.DataSource = ElementaryBindingSource
dtTableGrd = ElementaryDataGridView.DataSource
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
dtTableGrd.DefaultView.RowFilter = "SchoolName Like '%" & TextBox1.Text & "%'"
End Sub
#2
Public Class Form1
Private dtTableGrd As DataTable
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
DataGridView1.DataSource = EmployeeProfileBindingSource
dtTableGrd = EmployeeProfileBindingSource
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
dtTableGrd.DefaultView.RowFilter = "Employee_Fname Like '%" & TextBox1.Text & "%'"
End Sub
End Class
#3
BindingSource.Filter = String.Format("{0} = '{1}'", "column name here", "filter value here")
#4
Private Sub txt_search_TextChanged(sender As System.Object, e As System.EventArgs) Handles txt_search.TextChanged
BindingSource1.Filter = String.Format("{0} LIKE '{1}%'", "user", txt_search.Text)
BindingSource1.Sort = "user ASC"
End Sub
Private Sub txt_search_Validated(sender As System.Object, e As System.EventArgs) Handles txt_search.Validated
If txt_search.Text = String.Empty Then
BindingSource1.RemoveFilter()
Else
BindingSource1.Filter = String.Format("{0} = '{1}'", "user", txt_search.Text)
BindingSource1.Sort = "user ASC"
End If
End Sub