Skip to content

Commit

Permalink
First App Commit
Browse files Browse the repository at this point in the history
Commited base app files
  • Loading branch information
DjakaTechnology committed Sep 29, 2017
1 parent a12f374 commit e9c5da5
Show file tree
Hide file tree
Showing 20 changed files with 6,706 additions and 0 deletions.
22 changes: 22 additions & 0 deletions TokoRotiSeleksi.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TokoRotiSeleksi", "TokoRotiSeleksi\TokoRotiSeleksi.vbproj", "{AAE4524B-495B-453A-9EC3-F71B03E8541D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AAE4524B-495B-453A-9EC3-F71B03E8541D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAE4524B-495B-453A-9EC3-F71B03E8541D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAE4524B-495B-453A-9EC3-F71B03E8541D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAE4524B-495B-453A-9EC3-F71B03E8541D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
16 changes: 16 additions & 0 deletions TokoRotiSeleksi/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="TokoRotiSeleksi.MySettings.DBTokoRotiConnectionString"
connectionString="Data Source=.;Initial Catalog=DBTokoRoti;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="TokoRotiSeleksi.MySettings.TokoRotiConnectionString"
connectionString="Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
22 changes: 22 additions & 0 deletions TokoRotiSeleksi/Application.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Login.xaml">
<Application.Resources>
<Style TargetType="Button" x:Key="PrimaryButton">
<Setter Property="Background" Value="#FF3AA6F1"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="Button" x:Key="ActiveNav">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="Button" x:Key="DeclineButton">
<Setter Property="Background" Value="#FFFF3131"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</Application.Resources>
</Application>
6 changes: 6 additions & 0 deletions TokoRotiSeleksi/Application.xaml.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Class Application

' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.

End Class
15 changes: 15 additions & 0 deletions TokoRotiSeleksi/Login.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Window x:Class="Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Login" Height="300" Width="300">
<Grid>
<Rectangle Fill="#FF3AA6F1" Height="64" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" Margin="24,12,0,0" TextWrapping="Wrap" Text="Toko Roti" VerticalAlignment="Top" Height="44" Width="214" FontSize="30" FontWeight="Bold" Foreground="White"/>
<TextBox Name="username" HorizontalAlignment="Left" Height="23" Margin="25,98,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="242"/>
<Label Content="Username" HorizontalAlignment="Left" Margin="25,72,0,0" VerticalAlignment="Top" Padding="0,5,5,5" Width="117"/>
<PasswordBox Name="password" HorizontalAlignment="Left" Height="23" Margin="25,148,0,0" VerticalAlignment="Top" Width="242"/>
<Label Content="Password" HorizontalAlignment="Left" Margin="25,122,0,0" VerticalAlignment="Top" Padding="0,5,5,5" Width="117"/>
<Button x:Name="filterButton" Style="{StaticResource ResourceKey=PrimaryButton}" Content="Login" HorizontalAlignment="Right" Margin="0,176,25,0" VerticalAlignment="Top" Width="86" Height="29" FontSize="14"/>

</Grid>
</Window>
20 changes: 20 additions & 0 deletions TokoRotiSeleksi/Login.xaml.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Imports System.Data
Imports System.Data.SqlClient
Public Class Login

Private Sub filterButton_Click(sender As Object, e As RoutedEventArgs) Handles filterButton.Click
Using con As New SqlConnection("Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True")
Dim data As New SqlDataAdapter("SELECT * FROM Login WHERE nama='" + username.Text.Trim + "' AND password ='" + password.Password + "'", con)
Dim table As New DataTable
data.Fill(table)

If table.Rows.Count = 1 Then
Dim main As New MainWindow(table.Rows(0)(0), table.Rows(0)(1), table.Rows(0)(4))
main.Show()
Me.Close()
Else
MessageBox.Show("Username & Password Salah")
End If
End Using
End Sub
End Class
Loading

0 comments on commit e9c5da5

Please sign in to comment.