<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>VB Jan2019 KDU by AhmadTaiff Isahak</title>
      <link>https://padlet.com/taiffdisted/k7ocdhq4nffc</link>
      <description>Made with joy</description>
      <language>en-us</language>
      <pubDate>2019-03-04 03:39:02 UTC</pubDate>
      <lastBuildDate>2019-03-04 08:27:07 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>New Sub</title>
         <author>taiffdisted</author>
         <link>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337331416</link>
         <description><![CDATA[<div>	Sub FillRecipeInfo(recipeName As String)<br>		Dim viewRecipeSql As String<br>		Dim viewRecipeCmd As SqlCommand<br>		If recipeName = "" Then<br>			Throw New Exception("recipeName cannot be blank")<br>		End If<br><br>		viewRecipeSql = "SELECT * FROM Recipe WHERE name=@n"<br>		viewRecipeCmd = New SqlCommand(viewRecipeSql, conn)<br>		viewRecipeCmd.Parameters.Clear()<br>		viewRecipeCmd.Parameters.AddWithValue("n", recipeName)<br><br>		Dim adapter As SqlDataAdapter = New SqlDataAdapter(viewRecipeCmd)<br>		Dim ds As DataSet = New DataSet()<br>		adapter.Fill(ds, "oneRecipe")<br>		Dim dt As DataTable = ds.Tables("oneRecipe")<br>		If (dt.Rows.Count = 0) Then<br>			MsgBox("NO RECIPES FOUND WITH THE NAME " &amp; recipeName)<br>		Else<br>			Dim dr As DataRow = dt.Rows(0)<br>			IDLabel.Text = dr("id")<br>			RecipeNameTextBox.Text = dr("name")<br>			CategoryTextBox.Text = dr("category")<br>			EnergyTextBox.Text = dr("energy")<br>			CookingTimeTextBox.Text = dr("cookingTime")<br>		End If<br>	End Sub<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-04 03:39:21 UTC</pubDate>
         <guid>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337331416</guid>
      </item>
      <item>
         <title>Next1</title>
         <author>taiffdisted</author>
         <link>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337335953</link>
         <description><![CDATA[<div>	Private Sub UpdateButton_Click(sender As Object, e As EventArgs) Handles UpdateButton.Click<br>		If UpdateRecipe() = True Then<br>			MsgBox("Update Successfull")<br>		Else<br>			MsgBox("Failed to Update")<br>		End If<br>	End Sub<br><br>	Function UpdateRecipe() As Boolean<br>		Dim updateRecipeSql As String<br>		Dim updateRecipeCmd As SqlCommand<br><br>		updateRecipeSql = "UPDATE Recipe SET name=@n, category=@c, energy=@e, cookingTime=@ct WHERE id=@id"<br>		updateRecipeCmd = New SqlCommand(updateRecipeSql, conn)<br>		updateRecipeCmd.Parameters.Clear()<br>		updateRecipeCmd.Parameters.AddWithValue("n", RecipeNameTextBox.Text)<br>		updateRecipeCmd.Parameters.AddWithValue("c", CategoryTextBox.Text)<br>		updateRecipeCmd.Parameters.AddWithValue("e", EnergyTextBox.Text)<br>		updateRecipeCmd.Parameters.AddWithValue("ct", CookingTimeTextBox.Text)<br>		updateRecipeCmd.Parameters.AddWithValue("id", IDLabel.Text)<br><br>		Dim rowsAffected = updateRecipeCmd.ExecuteNonQuery()<br>		If rowsAffected = 1 Then<br>			Return True<br>		Else<br>			Return False<br>		End If<br>	End Function<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-04 04:05:41 UTC</pubDate>
         <guid>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337335953</guid>
      </item>
      <item>
         <title>Next2</title>
         <author>taiffdisted</author>
         <link>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337355814</link>
         <description><![CDATA[<div>	Function IsAnyTextBoxEmpty() As Boolean<br>		Dim name = Trim(RecipeNameTextBox.Text)<br>		Dim cat = Trim(CategoryTextBox.Text)<br>		Dim energy = Trim(EnergyTextBox.Text)<br>		Dim ct = Trim(CookingTimeTextBox.Text)<br><br>		If name.Length &gt; 0 Then<br>			If cat.Length &gt; 0 Then<br>				If energy.Length &gt; 0 Then<br>					If ct.Length &gt; 0 Then<br>						Return False<br>					End If<br>				End If<br>			End If<br>		End If<br>		Return True<br>	End Function<br><br>	Private Sub InputBox_TextChanged(sender As Object, e As EventArgs) _<br>			Handles RecipeNameTextBox.TextChanged, CategoryTextBox.TextChanged,<br>			EnergyTextBox.TextChanged, CookingTimeTextBox.TextChanged<br>		If IsAnyTextBoxEmpty() Then<br>			ConfirmAddButton.Enabled = False<br>		Else<br>			ConfirmAddButton.Enabled = True<br>		End If<br>	End Sub<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-04 06:57:33 UTC</pubDate>
         <guid>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337355814</guid>
      </item>
      <item>
         <title>Next3</title>
         <author>taiffdisted</author>
         <link>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337361713</link>
         <description><![CDATA[<div>	Function AddRecipe() As Boolean<br>		Dim insertRecipeSql As String<br>		Dim insertRecipeCmd As SqlCommand<br><br>		insertRecipeSql = "INSERT INTO Recipe (name, category, energy, cookingTime)<br>							VALUES (@n, @c, @e, @ct)"<br>		insertRecipeCmd = New SqlCommand(insertRecipeSql, conn)<br>		insertRecipeCmd.Parameters.Clear()<br>		insertRecipeCmd.Parameters.AddWithValue("n", Trim(RecipeNameTextBox.Text))<br>		insertRecipeCmd.Parameters.AddWithValue("c", Trim(CategoryTextBox.Text))<br>		insertRecipeCmd.Parameters.AddWithValue("e", Trim(EnergyTextBox.Text))<br>		insertRecipeCmd.Parameters.AddWithValue("ct", Trim(CookingTimeTextBox.Text))<br><br>		Try<br>			Dim rowsAffected = insertRecipeCmd.ExecuteNonQuery()<br>			If rowsAffected = 1 Then<br>				Return True<br>			Else<br>				Return False<br>			End If<br>		Catch ex As Exception<br>			Return False<br>		End Try<br>	End Function</div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-04 07:34:57 UTC</pubDate>
         <guid>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337361713</guid>
      </item>
      <item>
         <title>Next4</title>
         <author>taiffdisted</author>
         <link>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337371892</link>
         <description><![CDATA[<div>	Private Sub DeleteButton_Click(sender As Object, e As EventArgs) Handles DeleteButton.Click<br>		If RecipeListBox.SelectedIndex &gt;= 0 Then<br>			If MsgBox("Delete " &amp; RecipeListBox.SelectedItem, MsgBoxStyle.YesNo, "Delete Recipe Confirmation") = MsgBoxResult.Yes Then<br>				If DeleteRecipe() Then<br>					RecipeListBox.Items.RemoveAt(RecipeListBox.SelectedIndex)<br>					MsgBox("Delete successful")<br>				End If<br>			End If<br>		End If<br>	End Sub<br><br>	Function DeleteRecipe() As Boolean<br>		Dim deleteRecipeSql As String<br>		Dim deleteRecipeCmd As SqlCommand<br><br>		deleteRecipeSql = "DELETE FROM Recipe WHERE name=@n"<br>		deleteRecipeCmd = New SqlCommand(deleteRecipeSql, conn)<br>		deleteRecipeCmd.Parameters.Clear()<br>		deleteRecipeCmd.Parameters.AddWithValue("n", RecipeListBox.SelectedItem)<br><br>		Try<br>			Dim rowsAffected = deleteRecipeCmd.ExecuteNonQuery()<br>			If rowsAffected = 1 Then<br>				Return True<br>			Else<br>				Return False<br>			End If<br>		Catch ex As Exception<br>			Return False<br>		End Try<br>	End Function<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2019-03-04 08:26:39 UTC</pubDate>
         <guid>https://padlet.com/taiffdisted/k7ocdhq4nffc/wish/337371892</guid>
      </item>
   </channel>
</rss>
