Public Class ActualizarPrecioVenta
    Inherits System.Windows.Forms.Form
    Private sentMantenimientoPrecio As New sentMantenimientoPrecio.sentMantenimientoPrecio

    Private condicion As String
    Private Color1, Color2 As String

#Region " Código generado por el Diseñador de Windows Forms "

    Public Sub New()
        MyBase.New()

        'El Diseñador de Windows Forms requiere esta llamada.
        InitializeComponent()

        'Agregar cualquier inicialización después de la llamada a InitializeComponent()

    End Sub

    'Form reemplaza a Dispose para limpiar la lista de componentes.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Requerido por el Diseñador de Windows Forms
    Private components As System.ComponentModel.IContainer

    'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento
    'Puede modificarse utilizando el Diseñador de Windows Forms. 
    'No lo modifique con el editor de código.
    Friend WithEvents TopLeftColor As LaMarvin.Windows.Forms.ColorPicker
    Friend WithEvents BottomRightColor As LaMarvin.Windows.Forms.ColorPicker
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents cmdActualizar As System.Windows.Forms.Button
    Friend WithEvents cmdLimpiar As System.Windows.Forms.Button
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents FlatRadioButton1 As vbWindowsUI.FlatRadioButton
    Friend WithEvents FlatRadioButton2 As vbWindowsUI.FlatRadioButton
    Friend WithEvents FlatRadioButton3 As vbWindowsUI.FlatRadioButton
    Friend WithEvents FlatRadioButton4 As vbWindowsUI.FlatRadioButton
    Friend WithEvents TxtMoneda1 As TxtMoneda.TxtMoneda
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.TopLeftColor = New LaMarvin.Windows.Forms.ColorPicker
        Me.BottomRightColor = New LaMarvin.Windows.Forms.ColorPicker
        Me.Label19 = New System.Windows.Forms.Label
        Me.Label17 = New System.Windows.Forms.Label
        Me.Label15 = New System.Windows.Forms.Label
        Me.Label13 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.TextBox10 = New System.Windows.Forms.TextBox
        Me.TextBox9 = New System.Windows.Forms.TextBox
        Me.TextBox7 = New System.Windows.Forms.TextBox
        Me.TextBox8 = New System.Windows.Forms.TextBox
        Me.TextBox5 = New System.Windows.Forms.TextBox
        Me.TextBox6 = New System.Windows.Forms.TextBox
        Me.TextBox3 = New System.Windows.Forms.TextBox
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label20 = New System.Windows.Forms.Label
        Me.Label18 = New System.Windows.Forms.Label
        Me.Label16 = New System.Windows.Forms.Label
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label12 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.cmdActualizar = New System.Windows.Forms.Button
        Me.cmdLimpiar = New System.Windows.Forms.Button
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.FlatRadioButton2 = New vbWindowsUI.FlatRadioButton
        Me.FlatRadioButton1 = New vbWindowsUI.FlatRadioButton
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.FlatRadioButton4 = New vbWindowsUI.FlatRadioButton
        Me.FlatRadioButton3 = New vbWindowsUI.FlatRadioButton
        Me.TxtMoneda1 = New TxtMoneda.TxtMoneda(Me.components)
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'TopLeftColor
        '
        Me.TopLeftColor.Color = System.Drawing.SystemColors.Control
        Me.TopLeftColor.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(238, Byte))
        Me.TopLeftColor.ForeColor = System.Drawing.Color.Cyan
        Me.TopLeftColor.Location = New System.Drawing.Point(0, 0)
        Me.TopLeftColor.Name = "TopLeftColor"
        Me.TopLeftColor.Size = New System.Drawing.Size(12, 12)
        Me.TopLeftColor.TabIndex = 4
        Me.TopLeftColor.Text = "ColorPicker1"
        Me.TopLeftColor.TextDisplayed = False
        '
        'BottomRightColor
        '
        Me.BottomRightColor.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.BottomRightColor.Color = System.Drawing.SystemColors.Control
        Me.BottomRightColor.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(238, Byte))
        Me.BottomRightColor.ForeColor = System.Drawing.Color.Cyan
        Me.BottomRightColor.Location = New System.Drawing.Point(735, 333)
        Me.BottomRightColor.Name = "BottomRightColor"
        Me.BottomRightColor.Size = New System.Drawing.Size(12, 12)
        Me.BottomRightColor.TabIndex = 1
        Me.BottomRightColor.Text = "ColorPicker2"
        Me.BottomRightColor.TextDisplayed = False
        '
        'Label19
        '
        Me.Label19.BackColor = System.Drawing.Color.Transparent
        Me.Label19.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label19.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label19.Location = New System.Drawing.Point(-16, 39)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(160, 20)
        Me.Label19.TabIndex = 336
        Me.Label19.Text = "Label19"
        Me.Label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label17
        '
        Me.Label17.BackColor = System.Drawing.Color.Transparent
        Me.Label17.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label17.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label17.Location = New System.Drawing.Point(-16, 15)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(160, 20)
        Me.Label17.TabIndex = 334
        Me.Label17.Text = "Label17"
        Me.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label15
        '
        Me.Label15.BackColor = System.Drawing.Color.Transparent
        Me.Label15.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label15.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label15.Location = New System.Drawing.Point(-16, 231)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(160, 20)
        Me.Label15.TabIndex = 332
        Me.Label15.Text = "Label15"
        Me.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label13
        '
        Me.Label13.BackColor = System.Drawing.Color.Transparent
        Me.Label13.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label13.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label13.Location = New System.Drawing.Point(-16, 207)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(160, 20)
        Me.Label13.TabIndex = 330
        Me.Label13.Text = "Label13"
        Me.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label11
        '
        Me.Label11.BackColor = System.Drawing.Color.Transparent
        Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label11.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label11.Location = New System.Drawing.Point(-16, 183)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(160, 20)
        Me.Label11.TabIndex = 328
        Me.Label11.Text = "Label11"
        Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label9
        '
        Me.Label9.BackColor = System.Drawing.Color.Transparent
        Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label9.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label9.Location = New System.Drawing.Point(-16, 159)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(160, 20)
        Me.Label9.TabIndex = 326
        Me.Label9.Text = "Label9"
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.Color.Transparent
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label7.Location = New System.Drawing.Point(-16, 135)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(160, 20)
        Me.Label7.TabIndex = 324
        Me.Label7.Text = "Label7"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.Color.Transparent
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label5.Location = New System.Drawing.Point(-16, 111)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(160, 20)
        Me.Label5.TabIndex = 322
        Me.Label5.Text = "Label5"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TextBox10
        '
        Me.TextBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox10.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox10.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox10.Location = New System.Drawing.Point(152, 39)
        Me.TextBox10.MaxLength = 5
        Me.TextBox10.Name = "TextBox10"
        Me.TextBox10.Size = New System.Drawing.Size(70, 20)
        Me.TextBox10.TabIndex = 6
        Me.TextBox10.Text = "TEXTBOX10"
        '
        'TextBox9
        '
        Me.TextBox9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox9.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox9.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox9.Location = New System.Drawing.Point(152, 15)
        Me.TextBox9.MaxLength = 5
        Me.TextBox9.Name = "TextBox9"
        Me.TextBox9.Size = New System.Drawing.Size(70, 20)
        Me.TextBox9.TabIndex = 5
        Me.TextBox9.Text = "TEXTBOX9"
        '
        'TextBox7
        '
        Me.TextBox7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox7.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox7.Location = New System.Drawing.Point(152, 207)
        Me.TextBox7.MaxLength = 5
        Me.TextBox7.Name = "TextBox7"
        Me.TextBox7.Size = New System.Drawing.Size(70, 20)
        Me.TextBox7.TabIndex = 13
        Me.TextBox7.Text = "TEXTBOX7"
        '
        'TextBox8
        '
        Me.TextBox8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox8.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox8.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox8.Location = New System.Drawing.Point(152, 231)
        Me.TextBox8.MaxLength = 5
        Me.TextBox8.Name = "TextBox8"
        Me.TextBox8.Size = New System.Drawing.Size(70, 20)
        Me.TextBox8.TabIndex = 13
        Me.TextBox8.Text = "TEXTBOX8"
        '
        'TextBox5
        '
        Me.TextBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox5.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox5.Location = New System.Drawing.Point(152, 159)
        Me.TextBox5.MaxLength = 5
        Me.TextBox5.Name = "TextBox5"
        Me.TextBox5.Size = New System.Drawing.Size(70, 20)
        Me.TextBox5.TabIndex = 11
        Me.TextBox5.Text = "TEXTBOX5"
        '
        'TextBox6
        '
        Me.TextBox6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox6.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox6.Location = New System.Drawing.Point(152, 183)
        Me.TextBox6.MaxLength = 5
        Me.TextBox6.Name = "TextBox6"
        Me.TextBox6.Size = New System.Drawing.Size(70, 20)
        Me.TextBox6.TabIndex = 12
        Me.TextBox6.Text = "TEXTBOX6"
        '
        'TextBox3
        '
        Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox3.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox3.Location = New System.Drawing.Point(152, 111)
        Me.TextBox3.MaxLength = 5
        Me.TextBox3.Name = "TextBox3"
        Me.TextBox3.Size = New System.Drawing.Size(70, 20)
        Me.TextBox3.TabIndex = 9
        Me.TextBox3.Text = "TEXTBOX3"
        '
        'TextBox4
        '
        Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox4.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox4.Location = New System.Drawing.Point(152, 135)
        Me.TextBox4.MaxLength = 5
        Me.TextBox4.Name = "TextBox4"
        Me.TextBox4.Size = New System.Drawing.Size(70, 20)
        Me.TextBox4.TabIndex = 10
        Me.TextBox4.Text = "TEXTBOX4"
        '
        'TextBox2
        '
        Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox2.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox2.Location = New System.Drawing.Point(152, 87)
        Me.TextBox2.MaxLength = 25
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.Size = New System.Drawing.Size(136, 20)
        Me.TextBox2.TabIndex = 8
        Me.TextBox2.Text = "TEXTBOX2"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.Color.Transparent
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label3.Location = New System.Drawing.Point(-16, 87)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(160, 20)
        Me.Label3.TabIndex = 320
        Me.Label3.Text = "Label3"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TextBox1
        '
        Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TextBox1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.TextBox1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.TextBox1.Location = New System.Drawing.Point(152, 63)
        Me.TextBox1.MaxLength = 25
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(136, 20)
        Me.TextBox1.TabIndex = 7
        Me.TextBox1.Text = "TEXTBOX1"
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.Transparent
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.Label1.Location = New System.Drawing.Point(-16, 63)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(160, 20)
        Me.Label1.TabIndex = 318
        Me.Label1.Text = "Label1"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label20
        '
        Me.Label20.BackColor = System.Drawing.Color.Transparent
        Me.Label20.Location = New System.Drawing.Point(240, 39)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(456, 20)
        Me.Label20.TabIndex = 337
        Me.Label20.Text = "Label20"
        '
        'Label18
        '
        Me.Label18.BackColor = System.Drawing.Color.Transparent
        Me.Label18.Location = New System.Drawing.Point(240, 15)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(456, 20)
        Me.Label18.TabIndex = 335
        Me.Label18.Text = "Label18"
        '
        'Label16
        '
        Me.Label16.BackColor = System.Drawing.Color.Transparent
        Me.Label16.Location = New System.Drawing.Point(240, 231)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(480, 20)
        Me.Label16.TabIndex = 333
        Me.Label16.Text = "Label16"
        '
        'Label14
        '
        Me.Label14.BackColor = System.Drawing.Color.Transparent
        Me.Label14.Location = New System.Drawing.Point(240, 207)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(480, 20)
        Me.Label14.TabIndex = 331
        Me.Label14.Text = "Label14"
        '
        'Label12
        '
        Me.Label12.BackColor = System.Drawing.Color.Transparent
        Me.Label12.Location = New System.Drawing.Point(240, 183)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(480, 20)
        Me.Label12.TabIndex = 329
        Me.Label12.Text = "Label12"
        '
        'Label10
        '
        Me.Label10.BackColor = System.Drawing.Color.Transparent
        Me.Label10.Location = New System.Drawing.Point(240, 159)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(480, 20)
        Me.Label10.TabIndex = 327
        Me.Label10.Text = "Label10"
        '
        'Label8
        '
        Me.Label8.BackColor = System.Drawing.Color.Transparent
        Me.Label8.Location = New System.Drawing.Point(240, 135)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(480, 20)
        Me.Label8.TabIndex = 325
        Me.Label8.Text = "Label8"
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.Color.Transparent
        Me.Label6.Location = New System.Drawing.Point(240, 111)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(480, 20)
        Me.Label6.TabIndex = 323
        Me.Label6.Text = "Label6"
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.Color.Transparent
        Me.Label4.Location = New System.Drawing.Point(296, 87)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(480, 20)
        Me.Label4.TabIndex = 321
        Me.Label4.Text = "Label4"
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.Color.Transparent
        Me.Label2.Location = New System.Drawing.Point(296, 63)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(480, 20)
        Me.Label2.TabIndex = 319
        Me.Label2.Text = "Label2"
        '
        'cmdActualizar
        '
        Me.cmdActualizar.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmdActualizar.BackColor = System.Drawing.Color.Transparent
        Me.cmdActualizar.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdActualizar.ForeColor = System.Drawing.Color.SteelBlue
        Me.cmdActualizar.Location = New System.Drawing.Point(640, 8)
        Me.cmdActualizar.Name = "cmdActualizar"
        Me.cmdActualizar.Size = New System.Drawing.Size(96, 23)
        Me.cmdActualizar.TabIndex = 2
        Me.cmdActualizar.Text = "&Actualizar"
        '
        'cmdLimpiar
        '
        Me.cmdLimpiar.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmdLimpiar.BackColor = System.Drawing.Color.Transparent
        Me.cmdLimpiar.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.cmdLimpiar.ForeColor = System.Drawing.Color.SteelBlue
        Me.cmdLimpiar.Location = New System.Drawing.Point(640, 32)
        Me.cmdLimpiar.Name = "cmdLimpiar"
        Me.cmdLimpiar.Size = New System.Drawing.Size(96, 23)
        Me.cmdLimpiar.TabIndex = 3
        Me.cmdLimpiar.Text = "&Limpiar"
        '
        'GroupBox2
        '
        Me.GroupBox2.BackColor = System.Drawing.Color.Transparent
        Me.GroupBox2.Controls.Add(Me.FlatRadioButton2)
        Me.GroupBox2.Controls.Add(Me.FlatRadioButton1)
        Me.GroupBox2.Location = New System.Drawing.Point(152, 264)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(184, 72)
        Me.GroupBox2.TabIndex = 14
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "GroupBox2"
        '
        'FlatRadioButton2
        '
        Me.FlatRadioButton2.Location = New System.Drawing.Point(8, 40)
        Me.FlatRadioButton2.Name = "FlatRadioButton2"
        Me.FlatRadioButton2.Size = New System.Drawing.Size(168, 24)
        Me.FlatRadioButton2.TabIndex = 1
        Me.FlatRadioButton2.Text = "FlatRadioButton2"
        '
        'FlatRadioButton1
        '
        Me.FlatRadioButton1.Location = New System.Drawing.Point(8, 16)
        Me.FlatRadioButton1.Name = "FlatRadioButton1"
        Me.FlatRadioButton1.Size = New System.Drawing.Size(168, 24)
        Me.FlatRadioButton1.TabIndex = 0
        Me.FlatRadioButton1.Text = "FlatRadioButton1"
        '
        'GroupBox1
        '
        Me.GroupBox1.BackColor = System.Drawing.Color.Transparent
        Me.GroupBox1.Controls.Add(Me.FlatRadioButton4)
        Me.GroupBox1.Controls.Add(Me.FlatRadioButton3)
        Me.GroupBox1.Controls.Add(Me.TxtMoneda1)
        Me.GroupBox1.Location = New System.Drawing.Point(344, 264)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(322, 72)
        Me.GroupBox1.TabIndex = 0
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "GroupBox1"
        '
        'FlatRadioButton4
        '
        Me.FlatRadioButton4.Location = New System.Drawing.Point(8, 40)
        Me.FlatRadioButton4.Name = "FlatRadioButton4"
        Me.FlatRadioButton4.Size = New System.Drawing.Size(144, 24)
        Me.FlatRadioButton4.TabIndex = 2
        Me.FlatRadioButton4.Text = "FlatRadioButton4"
        '
        'FlatRadioButton3
        '
        Me.FlatRadioButton3.Location = New System.Drawing.Point(8, 16)
        Me.FlatRadioButton3.Name = "FlatRadioButton3"
        Me.FlatRadioButton3.Size = New System.Drawing.Size(144, 24)
        Me.FlatRadioButton3.TabIndex = 1
        Me.FlatRadioButton3.Text = "FlatRadioButton3"
        '
        'TxtMoneda1
        '
        Me.TxtMoneda1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.TxtMoneda1.Location = New System.Drawing.Point(152, 31)
        Me.TxtMoneda1.MaxLength = 9
        Me.TxtMoneda1.Name = "TxtMoneda1"
        Me.TxtMoneda1.Size = New System.Drawing.Size(160, 20)
        Me.TxtMoneda1.TabIndex = 0
        Me.TxtMoneda1.Text = "TxtMoneda1"
        Me.TxtMoneda1.TxtMonedaBase = "0"
        Me.TxtMoneda1.TxtMonedaDecimales = Nothing
        '
        'ActualizarPrecioVenta
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(746, 344)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.GroupBox2)
        Me.Controls.Add(Me.cmdActualizar)
        Me.Controls.Add(Me.cmdLimpiar)
        Me.Controls.Add(Me.Label19)
        Me.Controls.Add(Me.Label17)
        Me.Controls.Add(Me.Label15)
        Me.Controls.Add(Me.Label13)
        Me.Controls.Add(Me.Label11)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.TextBox10)
        Me.Controls.Add(Me.TextBox9)
        Me.Controls.Add(Me.TextBox7)
        Me.Controls.Add(Me.TextBox8)
        Me.Controls.Add(Me.TextBox5)
        Me.Controls.Add(Me.TextBox6)
        Me.Controls.Add(Me.TextBox3)
        Me.Controls.Add(Me.TextBox4)
        Me.Controls.Add(Me.TextBox2)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.TextBox1)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.Label20)
        Me.Controls.Add(Me.Label18)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.Label14)
        Me.Controls.Add(Me.Label12)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.BottomRightColor)
        Me.Controls.Add(Me.TopLeftColor)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
        Me.KeyPreview = True
        Me.Name = "ActualizarPrecioVenta"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Actualizar Precio de Venta de Productos"
        Me.GroupBox2.ResumeLayout(False)
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub ColorChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TopLeftColor.ColorChanged, BottomRightColor.ColorChanged
        Me.Refresh()
        Color1 = TopLeftColor.Color.Name.ToString
        Color2 = BottomRightColor.Color.Name.ToString
    End Sub

    Protected Overrides Sub OnPaintBackground(ByVal e As System.Windows.Forms.PaintEventArgs)
        Dim B As Brush
        Try
            B = New Drawing2D.LinearGradientBrush(Me.ClientRectangle, Me.TopLeftColor.Color, Me.BottomRightColor.Color, Drawing2D.LinearGradientMode.ForwardDiagonal)
            e.Graphics.FillRectangle(B, Me.ClientRectangle)
        Catch
        Finally
            If Not B Is Nothing Then
                B.Dispose()
            End If
        End Try
    End Sub

    Private Sub _Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
        Me.Refresh()
    End Sub

    Private Sub Configuraciones()
        Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
        Dim strConfigLoc As String = Asm.Location
        Dim strTemp As String
        strTemp = strConfigLoc
        strTemp = System.IO.Path.GetDirectoryName(strConfigLoc)
        Dim FileInfo As System.IO.FileInfo = New System.IO.FileInfo(strTemp & "\OndaNet.xml")
        Dim XmlDocument As New System.Xml.XmlDocument
        XmlDocument.Load(FileInfo.FullName)
        Dim Node As System.Xml.XmlNode
        For Each Node In XmlDocument.Item("configuration").Item("Usuario")
            If Node.Name = "add" Then
                If Node.Attributes.GetNamedItem("key").Value = "MantenimientoPrecio" & "Color1" Then
                    TopLeftColor.Color = System.Drawing.Color.FromName(Node.Attributes.GetNamedItem("value").Value.ToString)
                End If
                If Node.Attributes.GetNamedItem("key").Value = "MantenimientoPrecio" & "Color2" Then
                    BottomRightColor.Color = System.Drawing.Color.FromName(Node.Attributes.GetNamedItem("value").Value.ToString)
                End If
            End If
        Next Node
    End Sub

    Private Sub _Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
        Dim strConfigLoc As String = Asm.Location
        Dim strTemp As String
        strTemp = strConfigLoc
        strTemp = System.IO.Path.GetDirectoryName(strConfigLoc)
        Dim FileInfo As System.IO.FileInfo = New System.IO.FileInfo(strTemp & "\OndaNet.xml")
        Dim XmlDocument As New System.Xml.XmlDocument
        XmlDocument.Load(FileInfo.FullName)
        Dim Node As System.Xml.XmlNode
        For Each Node In XmlDocument.Item("configuration").Item("Usuario")
            If Node.Name = "add" Then
                If Node.Attributes.GetNamedItem("key").Value = "MantenimientoPrecio" & "Color1" Then
                    Node.Attributes.GetNamedItem("value").Value = CType(Color1, String)
                End If
                If Node.Attributes.GetNamedItem("key").Value = "MantenimientoPrecio" & "Color2" Then
                    Node.Attributes.GetNamedItem("value").Value = CType(Color2, String)
                End If
            End If
        Next Node
        XmlDocument.Save(FileInfo.FullName)
    End Sub

    Private Sub Salir(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
        Dim KeyAscii As Short = Asc(e.KeyChar)
        If KeyAscii = 27 Then
            Close()
        End If
    End Sub

    Private Sub Limpiar()
        TextBox1.Text = ""
        TextBox2.Text = ""
        Label2.Text = ""
        Label4.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        Label6.Text = ""
        Label8.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        Label10.Text = ""
        Label12.Text = ""
        TextBox7.Text = ""
        TextBox8.Text = ""
        Label14.Text = ""
        Label16.Text = ""
        TextBox9.Text = ""
        TextBox10.Text = ""
        Label18.Text = ""
        Label20.Text = ""

        TxtMoneda1.Text = ""

        Campo_clave_tablas = 0

        FlatRadioButton1.Checked = True
        FlatRadioButton3.Checked = True

        TextBox9.Focus()
    End Sub

    Private Sub Texto()
        Label17.Text = "Desde Sucursal"
        Label19.Text = "Hasta Sucursal"
        Label1.Text = "Desde Producto"
        Label3.Text = "Hasta Producto"
        Label5.Text = "Desde " & PRODUCTO1
        Label7.Text = "Hasta " & PRODUCTO1
        Label9.Text = "Desde " & PRODUCTO2
        Label11.Text = "Hasta " & PRODUCTO2
        Label13.Text = "Desde " & PRODUCTO3
        Label15.Text = "Hasta " & PRODUCTO3

        GroupBox2.Text = "Actualizar"
        FlatRadioButton1.Text = "Aumentar Precio"
        FlatRadioButton2.Text = "Disminuir Precio"

        GroupBox1.Text = "Tipo"
        FlatRadioButton3.Text = "Importe"
        FlatRadioButton4.Text = "Porcentaje"

        cmdActualizar.Text = "&Actualizar"
        cmdLimpiar.Text = "&Limpiar"

        TxtMoneda1.TxtMonedaDecimales = CANDECIMALESIMPORTE

        AddHandler Me.KeyPress, AddressOf Me.Salir
    End Sub

    Private Sub _Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Texto()
        Limpiar()
        AsignarEventos(Me)
        Configuraciones()
    End Sub

    Private Sub cmdActualizar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdActualizar.Click
        If Validaciones() = True Then
            ArmarCondicion()
            ActualizarPrecio()
        End If
    End Sub

    Private Sub cmdLimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLimpiar.Click
        Limpiar()
    End Sub

    'KeyPress
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox2.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("PRODUCTOS", "DESPRODUCTO", "CODPRODUCTO", "CODIGOBARRA", "Buscar Productos", "", "", _
                "", "CODIGOORIGINAL", "Código Original", "CONVERT(VARCHAR, FECHAINGRESO, 103)", "Ingreso")

            If Not Campo_clave_tablas = 0 Then
                TextBox1.Tag = Campo_clave_tablas
                TextBox1.Text = Campo_numero_tablas
                Label2.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox3.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("PRODUCTOS", "DESPRODUCTO", "CODPRODUCTO", "CODIGOBARRA", "Buscar Productos", "", "", _
               "", "CODIGOORIGINAL", "Código Original", "CONVERT(VARCHAR, FECHAINGRESO, 103)", "Ingreso")

            If Not Campo_clave_tablas = 0 Then
                TextBox2.Tag = Campo_clave_tablas
                TextBox2.Text = Campo_numero_tablas
                Label4.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox4.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("FAMILIA", "DESFAMILIA", "CODFAMILIA", "NUMFAMILIA", "Buscar " & PRODUCTO1 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox3.Tag = Campo_clave_tablas
                TextBox3.Text = Campo_numero_tablas
                Label6.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox5.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("FAMILIA", "DESFAMILIA", "CODFAMILIA", "NUMFAMILIA", "Buscar " & PRODUCTO1 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox4.Tag = Campo_clave_tablas
                TextBox4.Text = Campo_numero_tablas
                Label8.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox6.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("LINEA", "DESLINEA", "CODLINEA", "NUMLINEA", "Buscar " & PRODUCTO2 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox5.Tag = Campo_clave_tablas
                TextBox5.Text = Campo_numero_tablas
                Label10.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox7.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("LINEA", "DESLINEA", "CODLINEA", "NUMLINEA", "Buscar " & PRODUCTO2 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox6.Tag = Campo_clave_tablas
                TextBox6.Text = Campo_numero_tablas
                Label12.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TextBox8.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("RUBRO", "DESRUBRO", "CODRUBRO", "NUMRUBRO", "Buscar " & PRODUCTO3 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox7.Tag = Campo_clave_tablas
                TextBox7.Text = Campo_numero_tablas
                Label14.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox8_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox8.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else                'Si es una tecla válida
            If KeyAscii = 13 Then           'Enter
                TxtMoneda1.Focus()
            End If
        End If

        If KeyAscii = 42 Then
            Buscar_Tabla("RUBRO", "DESRUBRO", "CODRUBRO", "NUMRUBRO", "Buscar " & PRODUCTO3 & "")

            If Not Campo_clave_tablas = 0 Then
                TextBox8.Tag = Campo_clave_tablas
                TextBox8.Text = Campo_numero_tablas
                Label16.Text = Campo_descripcion_tablas
            End If

            KeyAscii = 0
        End If

        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox9_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox9.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else
            If KeyAscii = 13 Then
                TextBox10.Focus()
            End If

            If KeyAscii = 42 Then
                Buscar_Tabla("SUCURSAL", "DESSUCURSAL", "CODSUCURSAL", "NUMSUCURSAL", "Buscar Sucursal")

                If Not Campo_clave_tablas = "0" Then
                    TextBox9.Tag = Campo_clave_tablas
                    TextBox9.Text = Campo_numero_tablas
                    Label18.Text = Campo_descripcion_tablas
                End If

                KeyAscii = 0
            End If
        End If
        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TextBox10_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox10.KeyPress
        '13 ENTER
        '32 ESPACIO
        '42 *
        '8 Borrar

        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else
            If KeyAscii = 13 Then
                TextBox1.Focus()
            End If

            If KeyAscii = 42 Then
                Buscar_Tabla("SUCURSAL", "DESSUCURSAL", "CODSUCURSAL", "NUMSUCURSAL", "Buscar Sucursal")

                If Not Campo_clave_tablas = "0" Then
                    TextBox10.Tag = Campo_clave_tablas
                    TextBox10.Text = Campo_numero_tablas
                    Label20.Text = Campo_descripcion_tablas
                End If

                KeyAscii = 0
            End If
        End If
        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    Private Sub TxtMoneda1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TxtMoneda1.KeyPress
        Dim KeyAscii As Short = Asc(e.KeyChar)

        If InStr(StringCadena, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        Else
            If KeyAscii = 13 Then
                cmdActualizar.Focus()
            End If
        End If
        If KeyAscii = 0 Then
            e.Handled = True
        End If
    End Sub

    'KeyDown 
    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox10.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox2.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox2_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox1.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox3.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox3_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox3.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox2.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox4.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox4_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox4.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox3.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox5.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox5_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox5.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox4.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox6.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox6_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox6.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox5.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox7.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox7_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox7.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox6.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox8.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox8_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox8.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox7.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox9.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox9_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox9.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox8.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox10.Focus()
                e.Handled = True
        End Select
    End Sub

    Private Sub TextBox10_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox10.KeyDown
        Select Case e.KeyCode
            Case Keys.Up
                TextBox9.Focus()
                e.Handled = True
            Case Keys.Down
                TextBox1.Focus()
                e.Handled = True
        End Select
    End Sub

    'Validated  
    Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Validated
        Mensaje(funcion.descripcion_rango(TextBox1, Label2, "CODIGOBARRA", "PRODUCTOS", "DESPRODUCTO", EmpCodigo))
    End Sub

    Private Sub TextBox2_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.Validated
        Mensaje(funcion.descripcion_rango(TextBox2, Label4, "CODIGOBARRA", "PRODUCTOS", "DESPRODUCTO", EmpCodigo))
    End Sub

    Private Sub TextBox3_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.Validated
        Mensaje(funcion.descripcion_rango(TextBox3, Label6, "NUMFAMILIA", "FAMILIA", "DESFAMILIA", EmpCodigo))
    End Sub

    Private Sub TextBox4_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox4.Validated
        Mensaje(funcion.descripcion_rango(TextBox4, Label8, "NUMFAMILIA", "FAMILIA", "DESFAMILIA", EmpCodigo))
    End Sub

    Private Sub TextBox5_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox5.Validated
        Mensaje(funcion.descripcion_rango(TextBox5, Label10, "NUMLINEA", "LINEA", "DESLINEA", EmpCodigo))
    End Sub

    Private Sub TextBox6_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox6.Validated
        Mensaje(funcion.descripcion_rango(TextBox6, Label12, "NUMLINEA", "LINEA", "DESLINEA", EmpCodigo))
    End Sub

    Private Sub TextBox7_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox7.Validated
        Mensaje(funcion.descripcion_rango(TextBox7, Label14, "NUMRUBRO", "RUBRO", "DESRUBRO", EmpCodigo))
    End Sub

    Private Sub TextBox8_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox8.Validated
        Mensaje(funcion.descripcion_rango(TextBox8, Label16, "NUMRUBRO", "RUBRO", "DESRUBRO", EmpCodigo))
    End Sub

    Private Sub TextBox9_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox9.Validated
        Mensaje(funcion.descripcion_rango(TextBox9, Label18, "NUMSUCURSAL", "SUCURSAL", "DESSUCURSAL", EmpCodigo))
    End Sub

    Private Sub TextBox10_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox10.Validated
        Mensaje(funcion.descripcion_rango(TextBox10, Label20, "NUMSUCURSAL", "SUCURSAL", "DESSUCURSAL", EmpCodigo))
    End Sub

    Public Function Validaciones() As Boolean
        'CODIGO
        If TextBox1.Text.Length <> 0 And TextBox2.Text.Length <> 0 Then
            If TextBox2.Text < TextBox1.Text Then
                Mensaje("El Hasta no puede ser menor al desde. Favor Verifique....")
                TextBox2.Focus()
                Return False
            End If
        End If

        'FAMILIA
        If TextBox3.Text.Length <> 0 And TextBox4.Text.Length <> 0 Then
            If TextBox4.Text < TextBox3.Text Then
                Mensaje("El Hasta no puede ser menor al desde. Favor Verifique....")
                TextBox4.Focus()
                Return False
            End If
        End If

        'LINEA
        If TextBox5.Text.Length <> 0 And TextBox6.Text.Length <> 0 Then
            If TextBox6.Text < TextBox5.Text Then
                Mensaje("El Hasta no puede ser menor al desde. Favor Verifique....")
                TextBox6.Focus()
                Return False
            End If
        End If

        'RUBRO
        If TextBox7.Text.Length <> 0 And TextBox8.Text.Length <> 0 Then
            If TextBox8.Text < TextBox7.Text Then
                Mensaje("El Hasta no puede ser menor al desde. Favor Verifique....")
                TextBox8.Focus()
                Return False
            End If
        End If

        'COLOR
        If TextBox9.Text.Length <> 0 And TextBox10.Text.Length <> 0 Then
            If TextBox10.Text < TextBox9.Text Then
                Mensaje("El Hasta no puede ser menor al desde. Favor Verifique....")
                TextBox9.Focus()
                Return False
            End If
        End If

        If IsNumeric(TxtMoneda1.Text) = False Then
            Mensaje("Ingrese Importe o Porcentaje")
            TxtMoneda1.Clear()
            TxtMoneda1.Focus()

            Return False
        End If

        If CDec(TxtMoneda1.Text) <= 0 Then
            Mensaje("Ingrese Importe o Porcentaje")
            TxtMoneda1.Clear()
            TxtMoneda1.Focus()

            Return False
        End If

        Return True
    End Function

    Private Sub ArmarCondicion()
        condicion = ""

        'CODIGO PRODUCTO
        If TextBox1.Text.Length <> 0 And TextBox2.Text.Length <> 0 Then
            condicion = condicion + "AND P.CODIGOBARRA >= '" & TextBox1.Text & "' AND P.CODIGOBARRA <= '" & TextBox2.Text & "' "
        End If
        If TextBox1.Text.Length <> 0 And TextBox2.Text.Length = 0 Then
            condicion = condicion + "AND P.CODIGOBARRA >= '" & TextBox1.Text & "'"
        End If
        If TextBox1.Text.Length = 0 And TextBox2.Text.Length <> 0 Then
            condicion = condicion + "AND P.CODIGOBARRA <= '" & TextBox2.Text & "' "
        End If

        'FAMILIA
        If TextBox3.Text.Length <> 0 And TextBox4.Text.Length <> 0 Then
            condicion = condicion + "AND F.NUMFAMILIA >= '" & TextBox3.Text & "' AND F.NUMFAMILIA <= '" & TextBox4.Text & "' "
        End If
        If TextBox3.Text.Length <> 0 And TextBox4.Text.Length = 0 Then
            condicion = condicion + "AND F.NUMFAMILIA >= '" & TextBox3.Text & "'"
        End If
        If TextBox3.Text.Length = 0 And TextBox4.Text.Length <> 0 Then
            condicion = condicion + "AND F.NUMFAMILIA <= '" & TextBox4.Text & "' "
        End If

        'LINEA
        If TextBox5.Text.Length <> 0 And TextBox6.Text.Length <> 0 Then
            condicion = condicion + "AND L.NUMLINEA >= '" & TextBox5.Text & "' AND L.NUMLINEA <= '" & TextBox6.Text & "' "
        End If
        If TextBox5.Text.Length <> 0 And TextBox6.Text.Length = 0 Then
            condicion = condicion + "AND L.NUMLINEA >= '" & TextBox5.Text & "'"
        End If
        If TextBox5.Text.Length = 0 And TextBox6.Text.Length <> 0 Then
            condicion = condicion + "AND L.NUMLINEA <= '" & TextBox6.Text & "' "
        End If

        'RUBRO
        If TextBox7.Text.Length <> 0 And TextBox8.Text.Length <> 0 Then
            condicion = condicion + "AND R.NUMRUBRO >= '" & TextBox7.Text & "' AND R.NUMRUBRO <= '" & TextBox8.Text & "' "
        End If
        If TextBox7.Text.Length <> 0 And TextBox8.Text.Length = 0 Then
            condicion = condicion + "AND R.NUMRUBRO >= '" & TextBox7.Text & "'"
        End If
        If TextBox7.Text.Length = 0 And TextBox8.Text.Length <> 0 Then
            condicion = condicion + "AND R.NUMRUBRO <= '" & TextBox8.Text & "' "
        End If

        'SUCURSAL
        If TextBox9.Text.Length <> 0 And TextBox10.Text.Length <> 0 Then
            condicion = condicion + "AND S.NUMSUCURSAL >= '" & TextBox9.Text & "' AND S.NUMSUCURSAL <= '" & TextBox10.Text & "' "
        End If
        If TextBox9.Text.Length <> 0 And TextBox10.Text.Length = 0 Then
            condicion = condicion + "AND S.NUMSUCURSAL >= '" & TextBox9.Text & "'"
        End If
        If TextBox9.Text.Length = 0 And TextBox10.Text.Length <> 0 Then
            condicion = condicion + "AND S.NUMSUCURSAL <= '" & TextBox10.Text & "' "
        End If
    End Sub

    Private Sub ActualizarPrecio()
        Dim actualizar As Integer
        Dim tipo As Integer

        If FlatRadioButton1.Checked = True Then
            actualizar = 0
        ElseIf FlatRadioButton2.Checked = True Then
            actualizar = 1
        End If

        If FlatRadioButton3.Checked = True Then
            tipo = 0
        ElseIf FlatRadioButton4.Checked = True Then
            tipo = 1
        End If

        If sentMantenimientoPrecio.ActualizarPrecio(UsuCodigo, EmpCodigo, actualizar, tipo, TxtMoneda1.TxtMonedaBase, condicion) = True Then
            Mensaje("Actualizaciones realizadas correctamente")
            Limpiar()

            TxtMoneda1.Focus()
        Else
            Mensaje("Ha ocurrido un error al realizar las actualizaciones")
        End If
    End Sub
End Class