-
Notifications
You must be signed in to change notification settings - Fork 1
/
productInternals.cs
71 lines (61 loc) · 2.07 KB
/
productInternals.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MundoMusical.CUSTOMER;
using MundoMusical.CUSTOM_CONTROLS;
namespace MundoMusical.PRODUCT
{
public partial class productInternals : deleteInternals
{
protected DB.dbop db;
private updateProduct centralupdate;
public productInternals(updateProduct updateprod)
{
InitializeComponent();
this.Text = "Actualizar Producto";
this.centralupdate = updateprod;
this.db = new DB.dbop();
this.ShowInTaskbar = false;
behaviorDefinitions.txtOnlyNumbers(ref this.textBox1);
}
public productInternals()
{
InitializeComponent();
this.Text = "Actualizar Producto";
this.db = new DB.dbop();
this.ShowInTaskbar = false;
behaviorDefinitions.txtOnlyNumbers(ref this.textBox1);
}
private void productInternals_Load(object sender, EventArgs e)
{
this.ActiveControl = this.textBox1;
}
protected override void onEnter()
{
this.existproduct();
}
protected void existproduct()
{
if (this.textBox1.Text.Trim() != "")
{
if (this.db.existproduct(int.Parse(this.textBox1.Text.Trim())))
{
this.centralupdate.idproduct = int.Parse(this.textBox1.Text.Trim());
this.Close();
this.centralupdate.txt1.Focus();
}
else
{
genericDefinitions.dangerInfo("No existe el producto con ID:" + this.textBox1.Text, "Advertencia");
this.textBox1.Text = "";
}
}
}
}
}