This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
Dim MsgBox_Buttons As New Dictionary(Of String, MessageBoxButtons) | |
Dim MsgBox_Icons As New Dictionary(Of String, MessageBoxIcon) | |
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |
With MsgBox_Buttons | |
.Add("OK", MessageBoxButtons.OK) | |
.Add("OKCancel", MessageBoxButtons.OKCancel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim allForms() As Form = (From t As Type In Me.GetType().Assembly.GetTypes() _ | |
Where t.BaseType Is GetType(Form) _ | |
Let f = DirectCast(Activator.CreateInstance(t), Form) _ | |
Select f).ToArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim selectedRows As List(Of DataGridViewRow) = (From row In dataGridView1.Rows.Cast(Of DataGridViewRow)() _ | |
Where Convert.ToBoolean(row.Cells("checkBoxColumn").Value) = True).ToList() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim count = (From row As DataGridViewRow In dgvb.Rows _ | |
Where row.Cells("Name").Value = "Sunshine" And row.Cells("Name").Value IsNot DBNull.Value _ | |
Select row.Cells("Name").Value).Count() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GET_STRING_BETWEEN(ByVal start As String, ByVal parent As String, ByVal [end] As String) | |
Dim output As String | |
output = parent.Substring(parent.IndexOf(start) _ | |
, (parent.IndexOf([end]) _ | |
- parent.IndexOf(start)) _ | |
).Replace(start, "").Replace([end], "") | |
output = start & output & [end] | |
Return output | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function CALCULATE_AGE(ByVal dob As Date) As Integer | |
Dim age As Integer | |
age = Today.Year - dob.Year | |
If (dob > Today.AddYears(-age)) Then age -= 1 | |
Return age | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class frm_customer_orderproduct | |
Dim current_id As String | |
'NEW CODE IS HERE | |
Dim dt As New DataTable | |
Private Sub frm_customer_orderproduct_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load | |
'Dim regDate As Date = Date.Today() | |
'NEW CODE IS HERE | |
dt.Columns.Add("Product ID") | |
dt.Columns.Add("Product Name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim obj As Object = If(System.IO.File.Exists("C:\file.txt"), System.IO.File.ReadAllText("C:\file.txt").Length <> 20, False) | |
If obj Then | |
MessageBox.Show("Code executed!") | |
Else | |
MessageBox.Show("Failed to execute!") | |
End If |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Try | |
'con.Open()*/ | |
Query = "INSERT INTO mcs.custormer (custormer_id,first_name,last_name,nic_no,c_address1,c_address2,c_address3,c_telephoneno,membership_date,business_name,g_name,g_nicno,g_address1,g_address2,g_address3,g_telephoneNO)" & _ | |
"VALUES (@custormer_id,@first_name,@last_name,@nic_no,@c_address1,@c_address2,@c_address3,@c_telephoneNO,@membership_date,@business_name,@g_name,@g_nicno,@g_address1,@g_address2,@g_address3,@g_telephoneNO)" | |
Using cmd = New MySqlCommand(Query, con) | |
cmd.Parameters.AddWithValue("@custormer_id", Convert.ToInt32(txtcustormerid.Text)) | |
cmd.Parameters.AddWithValue("@first_name", Convert.ToString(txtfirstname.Text)) | |
cmd.Parameters.AddWithValue("@last_name", Convert.ToString(txtlastname.Text)) | |
cmd.Parameters.AddWithValue("@nic_no", Convert.ToString(txtnicno.Text)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<manifest> | |
<remote name="aosp" | |
fetch="https://android.googlesource.com/" | |
review="https://android-review.googlesource.com/" /> | |
<remote name="github" | |
fetch="https://github.com/" /> | |
<remote name="SimpleAosp" | |
fetch="https://github.com/SAOSP-N/" /> |
OlderNewer