Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Net.Mail

Partial Class buyerpostenquiry
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not IsPostBack Then

            trBrand.Style.Add("display", "none")
            trCategory.Style.Add("display", "none")
            rblSpecific.Attributes.Add("onclick", "return CheckBrandCategory('r');")
            btnSubmit.Attributes.Add("onclick", "return CheckBrandCategory('b');")
            fillDDL()





            'trBrand.Style.Add("height", "500px")
            'trCategory.Style.Add("height", "500px")
            'DropDownList1.Style.Add("height", "0px")
            'DropDownList2.Style.Add("height", "0px")
           


            'trBrand.Visible = False
            'trCategory.Visible = False

            

            ' ''txtCompanyName.Focus()
            ' ''Fill_Combo("SELECT distinct Unit_Kid, Unit_Name, Unit_Flag FROM Unit_Master WHERE Unit_Flag = N'Qty' and unit_IsDeleted='0' order by unit_name", ddlQtyType)
            '' ''     Image1.Attributes.Add("onmouseOver", "javascript:over(this)")
            ' ''txtCountryCode.Attributes.Add("onkeypress", "return CheckNumericOnly(event);")
            ' ''txtCityCode.Attributes.Add("onkeypress", "return CheckNumericOnly(event);")
            ' ''txtPhoneNo.Attributes.Add("onkeypress", "return CheckNumericOnly(event);")
            ' ''txtCountryCodeM.Attributes.Add("onkeypress", "return CheckNumericOnly(event);")
            ' ''txtMobileNo.Attributes.Add("onkeypress", "return CheckNumericOnly(event);")
            ' ''txtQtyRequired.Attributes.Add("onkeypress", "return decimalonly(event,this);")

            '' ''txtCityCode.Attributes.Add("onkeydown", "return testmobile(document.getElementById('txtCountryCode'));")
            '' ''txtMobileNo.Attributes.Add("onkeydown", "return testmobile(document.getElementById('txtCountryCodeM'));")
            '' ''txtPhoneNo.Attributes.Add("onkeydown", "return testphone(document.getElementById('txtCountryCode'),document.getElementById('txtCityCode'));")

            ' ''txtCountryCode.Text = "91"
            ' ''txtCountryCodeM.Text = "91"
            ' ''tbl1.Visible = False


        End If

    End Sub

    Public Sub fillDDL()

        Fill_ComboWithSelect("Select Brand_KId, lower(Brand_Name) as Brand_Name from Brand_Master where Brand_Isdeleted='0' order by Brand_Name", ddlBrand, "Select Brand")
        Fill_ComboWithSelect("Select Category_KId, Category_Name from Category_Master where Category_ParentId='Root Category' and Category_Isdeleted='0' order by Category_Name", ddlCategory, "Select Category")
        Fill_ComboWithSelect("SELECT distinct Unit_Kid, Unit_Name, Unit_Flag FROM Unit_Master WHERE Unit_Flag = N'Qty' and unit_IsDeleted='0' order by unit_name", ddlQuantityUnit, "Select Unit")

        'ddlBrand.DataTextFormatString=

    End Sub

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Try
            'If CheckValid() = True Then
            ' lblError.Visible = False

            ' ''If txtQtyRequired.Text <> "" Then
            ' ''    If ddlQtyType.SelectedIndex = 0 Then
            ' ''        showmessage("Please Select Unit.", lblMsg)
            ' ''        ScriptManager1.SetFocus(ddlQtyType)
            ' ''        Exit Sub
            ' ''    End If
            ' ''End If

            ' ''If txtRequiredDate.Text <> "" Then
            ' ''    Try
            ' ''        Dim dt As DateTime
            ' ''        dt = Format$(Convert.ToDateTime(txtRequiredDate.Text.ToString), "")

            ' ''        If dt <= DateTime.Now Then
            ' ''            showmessage("Please Select Proper Future Date.", lblMsg)
            ' ''            ScriptManager1.SetFocus(txtRequiredDate.Text)
            ' ''            Exit Sub
            ' ''        End If

            ' ''    Catch ex As Exception
            ' ''        showmessage("Please Enter Correct Date.", lblMsg)
            ' ''        ScriptManager1.SetFocus(txtRequiredDate.Text)
            ' ''        Exit Sub
            ' ''    End Try

            ' ''End If

            ' ''If txtPhoneNo.Text = "" And txtMobileNo.Text = "" And txtEmailID.Text = "" Then
            ' ''    showmessage("Plese Give Atleast One Contact Details. Like Phone No, Mobile No Or EmailID", lblMsg)
            ' ''    Exit Sub
            ' ''End If


            ' ''If chkcall.Checked = True Then
            ' ''    If txtPhoneNo.Text = "" And txtMobileNo.Text = "" Then
            ' ''        showmessage("Plese Give Atleast One Contact No. For Contact.", lblMsg)
            ' ''        Exit Sub
            ' ''    End If
            ' ''End If

            ' ''Dim con As New SqlConnection
            ' ''con.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("ConnectionString")
            ' ''Dim cmd As New SqlCommand
            ' ''cmd.CommandType = CommandType.StoredProcedure
            ' ''cmd.CommandText = "Product_NotFound_Inquiry_Proc" ' storeprocedure
            ' ''cmd.Connection = con

            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_Kid", SqlDbType.NVarChar, 10)).Value = NewPrimaryKey(Me)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_Code", SqlDbType.NVarChar, 25)).Value = GenerateCode()

            ' ''If Not Session("catid") = Nothing Then
            ' ''    cmd.Parameters.Add(New SqlParameter("@PNFI_CategoryID", SqlDbType.NVarChar, 10)).Value = Session("catid")
            ' ''Else
            ' ''    cmd.Parameters.Add(New SqlParameter("@PNFI_BrandID", SqlDbType.NVarChar, 10)).Value = Session("brandid").ToString.Replace("'", "")
            ' ''End If


            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_CompanyName", SqlDbType.NVarChar, 200)).Value = txtCompanyName.Text
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_ContactPersonName", SqlDbType.NVarChar, 200)).Value = Trim(txtContactPersonName.Text)

            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_PhoneCountryCode", SqlDbType.NVarChar, 10)).Value = Trim(txtCountryCode.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_PhoneCityCode", SqlDbType.NVarChar, 10)).Value = Trim(txtCityCode.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_PhoneNo", SqlDbType.NVarChar, 20)).Value = Trim(txtPhoneNo.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_MobileCountryCode", SqlDbType.NVarChar, 10)).Value = Trim(txtCountryCodeM.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_MobileNo", SqlDbType.NVarChar, 20)).Value = Trim(txtMobileNo.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_EmailId", SqlDbType.NVarChar, 50)).Value = Trim(txtEmailID.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_ProductName", SqlDbType.NVarChar, 200)).Value = Trim(txtProductName.Text)

            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_QtyRequired", SqlDbType.NVarChar, 10)).Value = Trim(txtQtyRequired.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_QtyRequiredUnit", SqlDbType.NVarChar, 10)).Value = Trim(ddlQtyType.SelectedItem.Value.ToString)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_RequiredByDate", SqlDbType.NVarChar, 50)).Value = Trim(txtRequiredDate.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_RequiredPlace", SqlDbType.NVarChar, 200)).Value = Trim(txtRequiredPlace.Text)
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_SpecificRequirement", SqlDbType.NVarChar, 200)).Value = Trim(txtSpecificRequirement.Text)

            ' ''If chkcall.Checked = True Then
            ' ''    cmd.Parameters.Add(New SqlParameter("@PNFI_FlagCall", SqlDbType.NVarChar, 1)).Value = "Y"
            ' ''Else
            ' ''    cmd.Parameters.Add(New SqlParameter("@PNFI_FlagCall", SqlDbType.NVarChar, 1)).Value = "N"
            ' ''End If
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_Status", SqlDbType.NVarChar, 50)).Value = "Pending"

            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_FinancialYearId", SqlDbType.NVarChar, 10)).Value = ""
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_CompanyId", SqlDbType.NVarChar, 10)).Value = ""
            ' ''cmd.Parameters.Add(New SqlParameter("@PNFI_UserId", SqlDbType.NVarChar, 10)).Value = ""
            ' ''cmd.Parameters.Add(New SqlParameter("@FormName", SqlDbType.NVarChar, 50)).Value = "Product Not Found Inquiry"
            ' ''cmd.Parameters.Add(New SqlParameter("@Mode", SqlDbType.NVarChar, 10)).Value = "Insert" ' mode
            ' ''If con.State = ConnectionState.Open Then ' check connection state
            ' ''    con.Close()
            ' ''End If
            ' ''con.Open()
            ' ''cmd.ExecuteNonQuery()
            ' ''con.Close() ' close connection
            ' ''con.Dispose()
            '' '' ''sendmail()
            '' '' ''customeremail()
            '' ''tbl.Visible = False
            '' ''tbl1.Visible = True
        Catch ex As Exception
            '''showmessage(ex.Message, lblMsg)                                'Display the Error Message
        End Try
    End Sub

    ' ''Public Sub sendmail()
    ' ''    Try


    ' ''        'Dim msg As New MailMessage
    ' ''        'If txtEmailID.Text = "" Then
    ' ''        '    msg.From = "contact@atcomaart.com"

    ' ''        'Else
    ' ''        '    msg.From = "contact@atcomaart.com <contact@atcomaart.com>"
    ' ''        'End If

    ' ''        'msg.To = "jjjitiya@gmail.com"

    ' ''        Dim lt As New Label
    ' ''        lt.Text = "<h1> Inquiry From " & txtEmailID.Text & " </h1> </br>"

    ' ''        If Not Session("catid") = Nothing Then
    ' ''            lt.Text = "Product Category :    "
    ' ''        Else
    ' ''            lt.Text = "Product Brand :    "
    ' ''        End If

    ' ''        'lt.Text += lblCat.Text

    ' ''        lt.Text += "<br/>Product Name :    "
    ' ''        lt.Text += "<b>" & txtProductName.Text & "</b>"

    ' ''        'lt.Text += "<br/>Product ModelNo. :    "
    ' ''        'lt.Text += "<b>" & lblModelNo.Text & "</b>"

    ' ''        lt.Text += "<br/>Company Name :    "
    ' ''        lt.Text += "<b>" & txtCompanyName.Text & "</b>"

    ' ''        lt.Text += "<br/>Company Contact Person Name :    "
    ' ''        lt.Text += "<b>" & txtContactPersonName.Text & "</b>"

    ' ''        If txtCityCode.Text = "" And txtPhoneNo.Text = "" Then
    ' ''        Else
    ' ''            lt.Text += "<br/>Phone No :    "
    ' ''            lt.Text += "<b>" & txtCountryCode.Text & "-" & txtCityCode.Text & "-" & txtPhoneNo.Text & "</b>"
    ' ''        End If

    ' ''        If txtMobileNo.Text <> "" Then
    ' ''            lt.Text += "<br/>Mobile No :    "
    ' ''            lt.Text += "<b>" & txtCountryCodeM.Text & "-" & txtMobileNo.Text & "</b>"
    ' ''        End If

    ' ''        If txtEmailID.Text = "" Then
    ' ''            lt.Text += "<br/>Email ID :    "
    ' ''            lt.Text += "<b>" & txtEmailID.Text & "</b>"
    ' ''        End If

    ' ''        If txtQtyRequired.Text <> "" Then
    ' ''            lt.Text += "<br/>Quantity Required :    "
    ' ''            lt.Text += "<b>" & txtQtyRequired.Text & "   " & ddlQtyType.SelectedItem.Text & "</b>"
    ' ''        End If

    ' ''        If txtRequiredDate.Text <> "" Then
    ' ''            lt.Text += "<br/>Required By Date :    "
    ' ''            lt.Text += "<b>" & txtRequiredDate.Text & "</b>"
    ' ''        End If

    ' ''        If txtRequiredPlace.Text <> "" Then
    ' ''            lt.Text += "<br/>Place At Which Required :    "
    ' ''            lt.Text += "<b>" & txtRequiredPlace.Text & "</b>"
    ' ''        End If

    ' ''        If txtSpecificRequirement.Text <> "" Then
    ' ''            lt.Text += "<br/>Specific Requirement :    "
    ' ''            lt.Text += "<b>" & txtSpecificRequirement.Text & "</b>"

    ' ''        End If

    ' ''        If chkcall.Checked = True Then
    ' ''            lt.Text += "<br/>Call Me :    "
    ' ''            lt.Text += "<b> Please Call Me. </b>"
    ' ''        Else
    ' ''            lt.Text += "<br/>Call Me :    "
    ' ''            lt.Text += "<b> NO </b>"
    ' ''        End If

    ' ''        'msg.BodyFormat = MailFormat.Html
    ' ''        'msg.Body = lt.Text
    ' ''        'msg.Subject = "Product Not Found Inquiry."

    ' ''        'SmtpMail.SmtpServer = ""

    ' ''        '' Dim i As System.Web.Mail


    ' ''        'SmtpMail.Send(msg)


    ' ''        Dim MyMailMessage As New MailMessage()

    ' ''        'From requires an instance of the MailAddress type

    ' ''        MyMailMessage.From = New MailAddress("contact@atcomaart.com", txtEmailID.Text)

    ' ''        'To is a collection of MailAddress types

    ' ''        MyMailMessage.To.Add("contact@atcomaart.com")

    ' ''        'MyMailMessage.CC.Add(New MailAddress("pankajmishra2006@gmail.com", "CC Name"))

    ' ''        MyMailMessage.Bcc.Add(New MailAddress("pankaj.mishra@edeskservices.com", "eDesk Services Ltd."))

    ' ''        MyMailMessage.Subject = "Product Not Found Inquiry."
    ' ''        MyMailMessage.Body = lt.Text
    ' ''        MyMailMessage.IsBodyHtml = True
    ' ''        MyMailMessage.Priority = MailPriority.High
    ' ''        Dim smtpclient As New SmtpClient("smtp.rediffmailpro.com")
    ' ''        smtpclient.Credentials = New Net.NetworkCredential("contact@atcomaart.com", "traamocta")
    ' ''        smtpclient.Send(MyMailMessage)
    ' ''        tbl.Visible = False
    ' ''        tbl1.Visible = True
    ' ''    Catch ex As Exception
    ' ''        showmessage(ex.Message, lblMsg)
    ' ''    End Try
    ' ''End Sub
    ' ''Public Sub customeremail()


    ' ''    Try


    ' ''        Dim StrMail As String = ""
    ' ''        'Dim objmessage As New MailMessage()
    ' ''        StrMail = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">"
    ' ''        StrMail = StrMail & "<html>" & "<head>" & "<meta http-equiv=""Content-Type"""
    ' ''        StrMail = StrMail & "<content=""text/html""; charset=""iso-8859-1"">"
    ' ''        StrMail = StrMail & "<title>Contact Us</title>" & "</head><body><P align=left>"
    ' ''        StrMail = StrMail & "<table width='739' border='0' cellspacing='0' cellpadding='0' align='left' style='BORDER-RIGHT: #8c8e81 thin solid; BORDER-TOP: #8c8e81 thin solid; FONT-SIZE: 9pt;  BORDER-LEFT: #8c8e81 thin solid; BORDER-BOTTOM: #8c8e81 thin solid; FONT-FAMILY: Verdana' >"
    ' ''        StrMail = StrMail & "<tr>" & "<td>" & "Dear Client!!"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "<br> THANK YOU!"
    ' ''        StrMail = StrMail & "<br> We highly appreciate your time and efforts to visit our website and enquire with us on your product and supplies needs. We understand that you are looking forward to finding out the products, brands and services of best quality, price and service under one roof. "
    ' ''        StrMail = StrMail & "<br><br><br> ATCOMAART! Brings you tremendous value and wealth addition to your business by being your representative as PURCHASE/MATERIALS Department by which your purchase cycle is shortened, lag time is reduced, inventories are controlled, products at your doorstep, and administrative costs are reduced significantly.  Our alternative channels of marketing gives you perfect range of products with complete details, comparisons, and choice."
    ' ''        StrMail = StrMail & "<br><br><br> Currently you can register with us BUYER and complete the details of your company and requirements on our website. We are coming soon with our industrial retail warehouse all over the country to give a wider range of choice of products and be much closer to you. "
    ' ''        StrMail = StrMail & "<br><br><br> For any questions and concerns get back to us."
    ' ''        StrMail = StrMail & "<br><br><br> Looking forward to long term relationship with you!. <br><br>"

    ' ''        'StrMail = StrMail & "<B>" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "New Supplier Registration on Atcomaart Web Site:-" & "</B>"


    ' ''        StrMail = StrMail & "<B>" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Details of the Your Inquiry are as follows:" & "</B>"
    ' ''        StrMail = StrMail & "<br>" & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Product Name " & "&nbsp;&nbsp;&nbsp;" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtProductName.Text & ""
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Company Name " & "&nbsp;&nbsp;&nbsp;" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtCompanyName.Text.Trim & ""
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Telephone No.-" & "&nbsp;&nbsp;&nbsp;" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtCountryCode.Text & "-" & txtCityCode.Text & "-" & txtPhoneNo.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Mobile No.-" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtCountryCodeM.Text & "-" & txtMobileNo.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        If chkcall.Checked = True Then
    ' ''            StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call Me :    "
    ' ''            StrMail = StrMail & "<b> Please Call Me. </b>"
    ' ''        Else
    ' ''            StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call Me :    "
    ' ''            StrMail = StrMail & "<b> NO </b>"
    ' ''        End If
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Quantity Required " & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtQtyRequired.Text & "   " & ddlQtyType.SelectedItem.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Required By Date " & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtRequiredDate.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Place At Which Required " & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtRequiredPlace.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "EmailId-" & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtEmailID.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>"
    ' ''        StrMail = StrMail & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & "Specific Requirement " & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp" & ":" & "&nbsp;&nbsp;&nbsp;&nbsp; " & txtSpecificRequirement.Text & "</B>"
    ' ''        StrMail = StrMail & "<br>" & "<br><br>"
    ' ''        StrMail = StrMail & "<br> ATCOMAART Team"
    ' ''        StrMail = StrMail & "<br> <a href='http://www.atcomaart.com/'>www.atcomaart.com</a>"
    ' ''        StrMail = StrMail & "<br> <a href='mailto:contact@atcomaart.com'>contact@atcomaart.com</a> <br><br>"
    ' ''        '  StrMail = StrMail & "<br> <a href='mailto:ceo@atcomaart.com'> ceo@atcomaart.com</a><br><br>"
    ' ''        StrMail = StrMail & "</td></tr></table></p></body></html>"


    ' ''        Dim MyMailMessage As New MailMessage()

    ' ''        'From requires an instance of the MailAddress type

    ' ''        MyMailMessage.From = New MailAddress("contact@atcomaart.com", "Atcomaart Ltd.")

    ' ''        'To is a collection of MailAddress types

    ' ''        MyMailMessage.To.Add(txtEmailID.Text)

    ' ''        'MyMailMessage.CC.Add(New MailAddress("pankajmishra2006@gmail.com", "CC Name"))

    ' ''        MyMailMessage.Bcc.Add(New MailAddress("pankaj.mishra@edeskservices.com", "eDesk Services Ltd."))

    ' ''        MyMailMessage.Subject = "Inquiry for " & txtProductName.Text & " from www.atcomaart.com website ."
    ' ''        MyMailMessage.Body = StrMail
    ' ''        MyMailMessage.IsBodyHtml = True
    ' ''        MyMailMessage.Priority = MailPriority.High
    ' ''        Dim smtpclient As New SmtpClient("smtp.rediffmailpro.com")
    ' ''        smtpclient.Credentials = New Net.NetworkCredential("contact@atcomaart.com", "traamocta")
    ' ''        smtpclient.Send(MyMailMessage)

    ' ''    Catch ex As Exception

    ' ''    End Try

    ' ''End Sub

    ' ''Private Function GenerateCode() As String
    ' ''    ' generate kid and code
    ' ''    Try
    ' ''        Dim i As String
    ' ''        Dim qry As String
    ' ''        Dim code As String
    ' ''        'txtBranchNetworkKid.Text = Trim(NewPrimaryKey(Me))
    ' ''        i = "1"
    ' ''        i = Format(Val(i), "000")
    ' ''        While True
    ' ''            code = "PNFI" & "/" & Year(Date.Today) & "/" & Format(Month(Date.Today), "00") & "/" & Day(Date.Today) & "/" & i
    ' ''            qry = "Select count(*) from Product_NotFound_Inquiry where PNFI_Code='" & code & "'"
    ' ''            If IsAlreadyPresent(qry) Then
    ' ''                i = (Val(i) + 1).ToString
    ' ''                i = Format(Val(i), "000")
    ' ''            Else
    ' ''                Return code
    ' ''                Exit Function
    ' ''            End If
    ' ''        End While
    ' ''    Catch ex As Exception
    ' ''        CreateMessageAlert(Me, ex.Message, "StrKeyVal")     'Display the Error Message
    ' ''    End Try
    ' ''End Function

    
    
    'Protected Sub rblSpecific_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rblSpecific.SelectedIndexChanged
    '    If rblSpecific.SelectedItem.Value = "B" Then
    '        trBrand.Visible = True
    '        trCategory.Visible = False

    '    Else
    '        trCategory.Visible = True
    '        trBrand.Visible = False
    '    End If
    'End Sub

    Protected Sub btnSubmit_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

    End Sub
End Class
