Private Sub dgv_CellMouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles myGridView.CellMouseUp If e.RowIndex = -1 Then Exit Sub With myGridView frmland.txtLANDID.Text = .Rows.Item(e.RowIndex).Cells(0).Value.ToString() frmland.txtPARCEL_CODE.Text = .Rows.Item(e.RowIndex).Cells(1).Value.ToString() frmland.txtPICTURE_CODE.Text = .Rows.Item(e.RowIndex).Cells(2).Value.ToString() frmland.txtUTM_CODE.Text = .Rows.Item(e.RowIndex).Cells(21).Value.ToString() frmland.txtUTM_NO.Text = .Rows.Item(e.RowIndex).Cells(23).Value.ToString() frmland.txtUTM_NO_P.Text = .Rows.Item(e.RowIndex).Cells(22).Value.ToString() frmland.txtUTM_RATIO.Text = .Rows.Item(e.RowIndex).Cells(20).Value.ToString() frmland.txtLDOC_NO.Text = .Rows.Item(e.RowIndex).Cells(19).Value.ToString() frmland.txtTAXRATE.Text = .Rows.Item(e.RowIndex).Cells(39).Value.ToString() frmland.txtEXTENUATE.Text = .Rows.Item(e.RowIndex).Cells(40).Value.ToString() frmland.txtSURVEY_NO.Text = .Rows.Item(e.RowIndex).Cells(26).Value.ToString() frmland.txtLAND_NO.Text = .Rows.Item(e.RowIndex).Cells(25).Value.ToString() frmland.txtDOL_RAI.Text = .Rows.Item(e.RowIndex).Cells(27).Value.ToString() frmland.txtDOL_NGAN.Text = .Rows.Item(e.RowIndex).Cells(28).Value.ToString() frmland.txtDOL_WA.Text = .Rows.Item(e.RowIndex).Cells(29).Value.ToString() frmland.txtTAXED_RAI.Text = .Rows.Item(e.RowIndex).Cells(39).Value.ToString() frmland.txtTAXED_NGAN.Text = .Rows.Item(e.RowIndex).Cells(40).Value.ToString() frmland.txtTAXED_WA.Text = .Rows.Item(e.RowIndex).Cells(41).Value.ToString() frmland.PictureBox1.Image = Image.FromFile(.Rows.Item(e.RowIndex).Cells(53).Value.ToString()) frmland.txtTAMBON_TH.Text = .Rows.Item(e.RowIndex).Cells(16).Value.ToString() frmland.txtDISTRICT_TH.Text = .Rows.Item(e.RowIndex).Cells(17).Value.ToString() frmland.txtPROVINCE_TH.Text = .Rows.Item(e.RowIndex).Cells(18).Value.ToString() If .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "01" Then frmland.cboLDOC_TYPE.Text = "โฉนด" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "02" Then frmland.cboLDOC_TYPE.Text = "นส.3ก" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "03" Then frmland.cboLDOC_TYPE.Text = "นส.3" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "04" Then frmland.cboLDOC_TYPE.Text = "สค.1" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "05" Then frmland.cboLDOC_TYPE.Text = "ภบท.5" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "06" Then frmland.cboLDOC_TYPE.Text = "สทก" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "07" Then frmland.cboLDOC_TYPE.Text = "ส.ป.ก.4-01" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "08" Then frmland.cboLDOC_TYPE.Text = "น.ค.3" ElseIf .Rows.Item(e.RowIndex).Cells(8).Value.ToString() = "99" Then frmland.cboLDOC_TYPE.Text = "อื่นๆ" End If 'comboboxการใช้ประโยชน์ If .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "01" Then frmland.cboLAND_USE.Text = "อยู่อาศัย" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "02" Then frmland.cboLAND_USE.Text = "ประกอบการค้า" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "03" Then frmland.cboLAND_USE.Text = "เลี้ยงสัตว์" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "04" Then frmland.cboLAND_USE.Text = "ปลูกไม้ล้มลุก" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "05" Then frmland.cboLAND_USE.Text = "ปลูกไม้ยืนต้น" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "06" Then frmland.cboLAND_USE.Text = "ว่างเปล่า" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "07" Then frmland.cboLAND_USE.Text = "สาธารณประโยชน์" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "08" Then frmland.cboLAND_USE.Text = "ราชการ" ElseIf .Rows.Item(e.RowIndex).Cells(32).Value.ToString() = "09" Then frmland.cboLAND_USE.Text = "อื่นๆ" End If 'combobox ทำเลพื้นที่ภาษี If .Rows.Item(e.RowIndex).Cells(4).Value.ToString() = "01" Then frmland.cboAREATAX.Text = "พื้นที่ 1" ElseIf .Rows.Item(e.RowIndex).Cells(4).Value.ToString() = "02" Then frmland.cboAREATAX.Text = "พื้นที่ 2" ElseIf .Rows.Item(e.RowIndex).Cells(4).Value.ToString() = "03" Then frmland.cboAREATAX.Text = "พื้นที่ 3" ElseIf .Rows.Item(e.RowIndex).Cells(4).Value.ToString() = "04" Then frmland.cboAREATAX.Text = "พื้นที่ 4" ElseIf .Rows.Item(e.RowIndex).Cells(4).Value.ToString() = "05" Then frmland.cboAREATAX.Text = "พื้นที่ 5" End If If .Rows.Item(e.RowIndex).Cells(5).Value.ToString() = "01" Then frmland.cboEXTENID.Text = "ลดหย่อน รูปแบบที่ 1" ElseIf .Rows.Item(e.RowIndex).Cells(5).Value.ToString() = "02" Then frmland.cboEXTENID.Text = "ไม่ลดหย่อน" End If If .Rows.Item(e.RowIndex).Cells(31).Value.ToString() = "1" Then frmland.RadioButton1.Checked = "1" ElseIf .Rows.Item(e.RowIndex).Cells(31).Value.ToString() = "2" Then frmland.RadioButton2.Checked = "2" End If End With Me.Close() End Sub
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง