Ejemplo n.º 1
0
        protected void LinkAtualizar_Click(object sender, EventArgs e)
        {
            Demandas d = new Demandas();

            d.idDemanda = int.Parse(TxIdDemanda.Text);

            if (!TxIniciada.Text.Equals(""))
            {
                d.DataInicio = TxIniciada.Text;
            }

            if (!TxFinalizada.Text.Equals(""))
            {
                d.DataFinalizada = TxFinalizada.Text;
                d.StatusDemanda  = true;
            }

            if (TxIniciada.Text.Equals(""))
            {
                Response.Write("<script LANGUAGE='JavaScript' >alert('Preencha os campos faltosos')</script>");
            }
            else
            {
                d.AtualizarUsuarioDemanda(d);
            }

            ObjPesquisa_Load(sender, e);
        }
Ejemplo n.º 2
0
        protected void BtnEnviarDemadna_Click(object sender, EventArgs e)
        {
            Demandas d = new Demandas();

            d = d.PesquisaDemandaPorID(int.Parse(TxIdDemanda.Text));

            TxDataCadastro.Text     = d.DataCadastro;
            TxDataCadastro.ReadOnly = true;

            if (d.DataInicio != null)
            {
                TxIniciada.Text     = d.DataInicio;
                TxIniciada.ReadOnly = true;
            }
            else
            {
                TxIniciada.Text     = "";
                TxIniciada.ReadOnly = false;
            }

            if (d.DataFinalizada != null)
            {
                TxFinalizada.Text     = d.DataFinalizada;
                TxFinalizada.ReadOnly = true;
                LinkAtualizar.Enabled = false;
            }
            else
            {
                LinkAtualizar.Enabled = true;
                TxFinalizada.Text     = "";
            }
        }
Ejemplo n.º 3
0
        protected void cbSetor_SelectedIndexChanged(object sender, EventArgs e)
        {
            Demandas d = new Demandas();

            cbDemanda.DataSource     = d.RetornaDemandaPorSetor(int.Parse(cbSetor.SelectedValue));
            cbDemanda.DataTextField  = "DESCRICAO";
            cbDemanda.DataValueField = "ID";
            cbDemanda.DataBind();
        }
Ejemplo n.º 4
0
        protected void btnPesquisar_Click(object sender, EventArgs e)
        {
            Demandas d = new Demandas();

            int idDemanda = int.Parse(cbDemanda.SelectedValue);
            int idSetor   = int.Parse(cbSetor.SelectedValue);

            dtgDadosDemandas.DataSource = d.RetornaDemandasPorSetorDemanda(idDemanda, idSetor);
            dtgDadosDemandas.DataBind();
        }