Public Class 應收帳款未收
    ReadOnly ds1, ds2, ds4, ds5, ds6, ds7 As New DataSet

    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
        '採購清單_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
        '訂製圖檔_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
    End Sub

    Private Sub Set_清單1()
        銷售單據_dgv.DataSource = Nothing : ds1.Clear()
        銷售單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
        銷售單據_dgv.ColumnHeadersHeight = 25
        銷售單據_dgv.AllowUserToAddRows = False
        銷售單據_dgv.RowTemplate.Height = 35

        PA19 = 業務_cb.Text : PA20 = 客戶1_tb.Text
        SQL_應收帳款未收_訂單控制表()
        da.Fill(ds1) : 銷售單據_dgv.DataSource = ds1.Tables(0) : conn.Close()

        銷售單據_dgv.Columns(0).Visible = False : 銷售單據_dgv.Columns(1).FillWeight = 85 : 銷售單據_dgv.Columns(2).FillWeight = 100 : 銷售單據_dgv.Columns(3).FillWeight = 110
        銷售單據_dgv.Columns(4).FillWeight = 110 : 銷售單據_dgv.Columns(5).FillWeight = 50 : 銷售單據_dgv.Columns(6).Visible = False : 銷售單據_dgv.Columns(7).FillWeight = 110
        銷售單據_dgv.Columns(8).FillWeight = 85 : 銷售單據_dgv.Columns(9).FillWeight = 100 : 銷售單據_dgv.Columns(10).Visible = False : 銷售單據_dgv.Columns(11).Visible = False
        銷售單據_dgv.Columns(12).Visible = False : 銷售單據_dgv.Columns(13).Visible = False : 銷售單據_dgv.Columns(14).Visible = False : 銷售單據_dgv.Columns(15).Visible = False
        銷售單據_dgv.Columns(16).Visible = False : 銷售單據_dgv.Columns(17).Visible = False : 銷售單據_dgv.Columns(18).Visible = False

        銷售單據_dgv.Columns("金額").DefaultCellStyle.Format = "#,##0"
        銷售單據_dgv.Columns("金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
        銷售單據_dgv.Columns("金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
    End Sub
    Private Sub 應收帳款未收_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
        業務_cb.Text = 業務號碼 : Set_清單1()
    End Sub
    Private Sub 業務_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 業務_cb.SelectedIndexChanged
        Set_清單1()
    End Sub
End Class