private void BtnCancel_Click(object sender, EventArgs e) { usu = new Usuario(); pr = new Principal(usu); pr.Show(); this.Hide(); }
static void Main() { Usuario usu = new Usuario(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Principal(usu)); }
/// <summary> /// Evento click del boton aceptar /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnAceptar_Click(object sender, EventArgs e) { usu = new Usuario(); //pr = new Principal(usu); pr = (Principal) this.Owner; if (txtPassword.Text.Trim() == "" || txtUser.Text.Trim() == "") { MessageBox.Show(this, "Campos en blanco detectados, verifique!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { usu.Name = txtUser.Text.Trim(); usu.Password = txtPassword.Text.Trim(); con = new Connection(usu); if (con.Conexion()) { this.Hide(); pr.Pri_Load(usu); pr.Show(); } else { MessageBox.Show(this, "Usuario o contraseña incorrectos, Verifique!", "Advertencia!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
public frmAbonados(Usuario us, Abonado ab) { InitializeComponent(); this.usu = us; this.abo = ab; this.Abo_Load(abo,usu); }
public frmPrevistas(Usuario usu, Prevista pv) { InitializeComponent(); this.user = usu; this.prv = pv; this.ValidUtils(prv); this.Prev_Load(usu,prv); }
public void Pri_Load(Usuario user) { this.usu = user; if (this.usu.Name == null) { archivoToolStripMenuItem.Enabled = false; reportesToolStripMenuItem.Enabled = false; nosotrosToolStripMenuItem.Enabled = false; logInToolStripMenuItem.Enabled = true; logOutToolStripMenuItem.Enabled = true; } else { this.Update(); archivoToolStripMenuItem.Enabled = true; reportesToolStripMenuItem.Enabled = true; nosotrosToolStripMenuItem.Enabled = true; } }
public void Abo_Load(Abonado ab, Usuario user) { abo = new Abonado(); abo = ab; if (radioButton1.Checked == true) { MtxtIdentification.Mask = "00-0000-0000"; } else { MtxtIdentification.Mask = "00-0000-0000-0000-0000"; } if (abo.Identification == null) { btnSaveUpdate.Text = "Guardar"; MtxtIdentification.Enabled = true; // txt modo sin edicion MtxtIdentification.ReadOnly = false; // txt modo solo lectura return; } else { btnSaveUpdate.Text = "Editar"; MtxtIdentification.AppendText(abo.Identification.ToString()); MtxtIdentification.Enabled = false; MtxtIdentification.ReadOnly = true; TxtName.Text = abo.Name.ToString(); TxtFirstN.Text = abo.Firstname.ToString(); TxtLastN.Text = abo.Lastname.ToString(); MtxtMovil.Text = abo.Movil.ToString(); MtxtPhone.AppendText(abo.Phonenum.ToString()); TxtEmail.Text = abo.Email.ToString(); dateTimePicker1.Text = abo.Dateregister.ToString(); TxtAddress.Text = abo.Address.ToString(); } }
public void Prev_Load(Usuario usu, Prevista prv) { // Llena el combobox tarifas //trfDao = new TarifaDAO(this.user); //cbxRate.DisplayMember = "TypeAppString"; //cbxRate.ValueMember = "Code"; //cbxRate.DataSource = trfDao.LoadTarifa(); cbxRate.Items.Add("Mensual Fija"); cbxRate.Items.Add("Metros Cúbicos"); cbxRate.SelectedItem = 0; // LLena el combo de Abonados abnDao = new AbonadoDAO(this.user); cbxAbonado.DisplayMember = "Name"; cbxAbonado.ValueMember = "Identification"; if (abnDao.LoadAbonado1().Count > 0) { cbxAbonado.DataSource = abnDao.LoadAbonado1(); } else { MessageBox.Show("No hay abonados disponibles para asignar a las previstas!", "Atención"); //mostrar popup, notificacion o mensaje en un label o formulario, por al menos 3 segundos } // obtiene el consecutivo de previstas prvDao = new PrevistaDAO(this.user); txtCode.Text = prvDao.ConsecutivePrv().ToString(); txtCode.ReadOnly = true; txtCode.Enabled = false; // se obtienen y establecen los sectores secDao = new SectorDAO(this.user); cbxSector.DisplayMember = "Description"; cbxSector.ValueMember = "Code"; cbxSector.DataSource = secDao.LoadSector(); }
public SerchAbonado(Usuario us) { InitializeComponent(); this.usu = us; }
public Connection(Usuario usu) { this.user = usu; }
public SectorDAO(Usuario us) { this.user = us; }
public AbonadoDAO(Usuario usu) { this.user = usu; }
public PrevistaDAO(Usuario usu) { this.user = usu; }
public TarifaDAO(Usuario usu) { this.user = usu; }
public Principal(Usuario user) { InitializeComponent(); this.usu = user; this.Pri_Load(usu); }
//private string columnName = "", filterValue = "", rowFilter = ""; public SerchPrevista(Usuario us) { InitializeComponent(); this.user = us; }