Ejemplo n.º 1
0
        private void LimpiaCajasTextoBox()
        {
            //CmbPuesto.SelectedIndex=0;
            //CmbEstatus.SelectedIndex = 0;
            TxtNomina.Clear();
            TxtId_Usuario.Clear();
            TxtNombres.Clear();
            TxtApMaterno.Clear();
            TxtApPaterno.Clear();
            TxtRFC.Clear();
            TxtCURP.Clear();
            TxtTelefono.Clear();
            TxtCelular.Clear();
            TxtEmail.Clear();

            TxtCalle.Clear();
            TxtNumInterno.Clear();
            TxtNumExterno.Clear();
            TxtEntreCalles.Clear();
            TxtColonia.Clear();
            TxtCodigoPostal.Clear();
            TxtEstado.Clear();
            TxtMunicipio.Clear();
            TxtPais.Clear();
            DtpFechaNacimiento.MaxDate = DateTime.Now.AddYears(-18);
            PtbxFotoPerfil.Image       = Properties.Resources.LgoEsferaBlancTrasp;

            CmbxPais.SelectedValue   = 0;
            CmbAreas.SelectedValue   = 0;
            CmbEstatus.SelectedValue = 0;
            CmbEmpresa.SelectedValue = 0;
        }
Ejemplo n.º 2
0
 private void BtnNovo_Click(object sender, EventArgs e)
 {
     StaFormEdicao = true;
     Paginas.SelectTab(1);
     LimpaDados();
     FrmPrincipal.ControleBotoes(true);
     TxtEstado.Focus();
 }
Ejemplo n.º 3
0
 private void BtnCancelar_Click(object sender, EventArgs e)
 {
     TxtNot1.Clear();
     TxtNot2.Clear();
     TxtNot3.Clear();
     TxtProm.Clear();
     TxtEstado.Clear();
     TxtNot1.Focus();
 }
        private void LimparEstado()
        {
            TxtIdEstado.Text = "";
            TxtEstado.Text   = "";
            TxtSigla.Text    = "";

            DgEstado.Enabled      = true;
            BtnNovoEstado.Visible = false;

            BtnSalvar.Text      = "Salvar";
            BtnSalvar.BackColor = Color.Green;

            TxtEstado.Focus();
        }
Ejemplo n.º 5
0
 private void BtnEditar_Click(object sender, EventArgs e)
 {
     if (GridDados.CurrentRow == null)
     {
         Paginas.SelectTab(0);
         MessageBox.Show("Não existe Registro para Edição", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         PopularCampos(int.Parse(GridDados.CurrentRow.Cells[0].Value.ToString()));
         StaFormEdicao = true;
         FrmPrincipal.ControleBotoes(true);
         TxtEstado.Focus();
     }
 }
Ejemplo n.º 6
0
        void guardarFactura()
        {
            using (SqlConnection sqlCon = new SqlConnection(connectionString))
            {
                sqlCon.Open();
                string     query  = "INSERT INTO factura (contrato_id,total,estado) VALUES (@contrato_id,@total,@estado)";
                SqlCommand sqlCmd = new SqlCommand(query, sqlCon);
                sqlCmd.Parameters.AddWithValue("@contrato_id", (TxtCodigoContrato.FindControl("TxtCodigoContrato") as TextBox).Text.Trim());
                sqlCmd.Parameters.AddWithValue("@total", (TxtTotalFactura.FindControl("TxtTotalFactura") as TextBox).Text.Trim());
                sqlCmd.Parameters.AddWithValue("@estado", (TxtEstado.FindControl("TxtEstado") as TextBox).Text.Trim());

                sqlCmd.ExecuteNonQuery();

                lblSuccessMessage.Text    = "Registro Con Exito";
                lblSuccessMessage.Visible = true;
                lblErrorMessage.Text      = "";
                lblErrorMessage.Visible   = true;

                sqlCmd.Parameters.Clear();
            }
        }
Ejemplo n.º 7
0
 private void BtnGravar_Click(object sender, EventArgs e)
 {
     if (TxtSigla.Text.Trim() != "")
     {
         CadEstados.IdUf        = int.Parse(TxtCodigo.Text);
         CadEstados.Estado      = TxtEstado.Text;
         CadEstados.Sigla       = TxtSigla.Text;
         CadEstados.ICMSInterno = TxtICMSInterno.Value;
         CadEstados.PercDifal   = TxtPercDifal.Value;
         CadEstados.CodIBGE     = TxtCodIbge.Value;
         CadEstados.GravarDados();
         PopularGrid();
         PopularCampos(CadEstados.IdUf);
         StaFormEdicao = false;
         FrmPrincipal.ControleBotoes(false);
     }
     else
     {
         MessageBox.Show("Sigla do Estado não Informado", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         TxtEstado.Focus();
     }
 }