Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
RUSHES02 committed Apr 24, 2023
1 parent 9dbb3b4 commit 6c8267b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CommonVariables.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Module CommonVariables

Public logedInEmail As String 'to store the email of the logged in user
Public alterUid = 0 'to store the uid of the card to be altered in teh admin site
Public alterUid = 0 'to store the uid of the card to be altered in teh admin site
Public selectCardUid As Integer 'to store the uid of the card customer has selected to buy
Public quantitySelected As Integer 'to store the quantity of the card selected by the customer
Public totalAmount As Double 'to store the total discounted price of the cards
Public costprice As Double 'to store the original price of the cards
Public totalAmount As Double 'to store the total discounted price of the cards
Public costprice As Double 'to store the original price of the cards
Public deliveryDate As Integer 'to store the delivery date of the cards
End Module
2 changes: 1 addition & 1 deletion FormAdminCards.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Public Class FormAdminCards
Dim totalheight = My.Computer.Screen.Bounds.Size.Height 'variable to store the height of the screen
Dim flowLayoutWidth As Double 'variable to store the width of the flow layout
Dim panelWidth As Double 'variable to store the width of a indivisual panel
Dim panelHeight As Double 'variable to store the width of a indivisual panel
Dim panelHeight As Double 'variable to store the width of a indivisual panel

Private Sub FormAdmin_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'setting all the dimention of flow layout and indivisual panels
Expand Down
2 changes: 1 addition & 1 deletion FormCardList.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions FormCardPage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Public Class FormCardPage
PictureBoxCardTemplate.Image = Image.FromStream(ms)
LabelMRP.Text = reader.Item("Price")
mrp = reader.Item("Price")
totalAmount = reader.Item("Price")
LabelName.Text = reader.Item("Name")
quantityLeft = reader.Item("Quantity")
setContent(reader.Item("Type"))
Expand Down Expand Up @@ -86,6 +87,7 @@ Public Class FormCardPage
End If

'if the quantity is set set the mrp accordingly

LabelMRP.Text = TextBoxQuantity.Text * mrp
LabelMRP.ForeColor = Color.FromArgb(41, 191, 18)
LabelRsMRP.ForeColor = Color.FromArgb(41, 191, 18)
Expand Down
3 changes: 1 addition & 2 deletions FormLogin.vb
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,4 @@ Public Class FormLogin
Private Sub FormLogin_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
Me.Close()
End Sub
End Class

End Class
4 changes: 2 additions & 2 deletions FormOrderHistory.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ Public Class FormOrderHistory
ComboBoxSearchCategory.Items.Add("Phone")

'getting all order history
cmd = New SqlCommand("SELECT TableOrder.OrderId, TableOrder.State, TableOrder.City, TableOrder.AddressLine, TableOrder.Pincode, TableOrder.Landmark, TableOrder.Email, TableOrder.TotalCost, TableOrder.DeliveryDate, TableOrder.PaymentMode, TableOrder.Name, TableOrder.Phone, TableCards.Cardtemplate, TableCards.Name FROM TableOrder JOIN TableCards ON TableOrder.CardId = TableCards.CardId", conn)
cmd = New SqlCommand("SELECT TableOrder.OrderId, TableOrder.State, TableOrder.City, TableOrder.AddressLine, TableOrder.Pincode, TableOrder.Landmark, TableOrder.Email, TableOrder.TotalCost, TableOrder.DeliveryDate, TableOrder.PaymentMode, TableOrder.Name, TableOrder.Phone, TableCards.Cardtemplate, TableCards.Name FROM TableOrder JOIN TableCards ON TableOrder.CardId = TableCards.CardId ORDER BY TableOrder.OrderId ASC", conn)

'for customer site
Else
ComboBoxSearchCategory.Visible = False
LabelSelectType.Visible = False
'getting only the order history of a specific customer
cmd = New SqlCommand("SELECT TableOrder.OrderId, TableOrder.State, TableOrder.City, TableOrder.AddressLine, TableOrder.Pincode, TableOrder.Landmark, TableOrder.Email, TableOrder.TotalCost, TableOrder.DeliveryDate, TableOrder.PaymentMode, TableOrder.Name, TableOrder.Phone, TableCards.Cardtemplate, TableCards.Name FROM TableOrder JOIN TableCards ON TableOrder.CardId = TableCards.CardId WHERE TableOrder.Email = @email", conn)
cmd = New SqlCommand("SELECT TableOrder.OrderId, TableOrder.State, TableOrder.City, TableOrder.AddressLine, TableOrder.Pincode, TableOrder.Landmark, TableOrder.Email, TableOrder.TotalCost, TableOrder.DeliveryDate, TableOrder.PaymentMode, TableOrder.Name, TableOrder.Phone, TableCards.Cardtemplate, TableCards.Name FROM TableOrder JOIN TableCards ON TableOrder.CardId = TableCards.CardId WHERE TableOrder.Email = @email ORDER BY tableOrder.OrderId ASC", conn)
cmd.Parameters.AddWithValue("@email", logedInEmail)
End If
cmd.ExecuteNonQuery()
Expand Down
3 changes: 1 addition & 2 deletions FormOrderPage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Public Class FormOrderPage
Return False
End If

If Not (Regex.IsMatch(TextBox1UPIOrCard.Text, "^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$")) Then
If Not (Regex.IsMatch(TextBox1UPIOrCard.Text, "[a-zA-Z0-9.\-_]{2,256}@[a-zA-Z]{2,64}")) Then
PictureBoxErrorUPI.Visible = True
Return False
End If
Expand All @@ -270,7 +270,6 @@ Public Class FormOrderPage
End If
End If
Return True

End Function

Private Sub FormOrderPage_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
Expand Down
1 change: 1 addition & 0 deletions ShareMarket.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.0" />
<PackageReference Include="PdfSharp" Version="1.50.5147" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

Expand Down

0 comments on commit 6c8267b

Please sign in to comment.