Example #1
0
 protected void Unnamed2_Click(object sender, EventArgs e)
 {
     Modelo.Ponto_recarga pr  = new Modelo.Ponto_recarga(0, TextPonto.Text, TextNumero.Text, TextRua.Text, TextCEP.Text, TextBairro.Text, TextMunicipio.Text);
     DAL.DALPonto_recarga dal = new DAL.DALPonto_recarga();
     dal.Insert(pr);
     Response.Redirect("~//CadastroPonto.aspx");
 }
Example #2
0
 protected void Delete_Click(object sender, EventArgs e)
 {
     id = int.Parse(Request.QueryString["id"]);
     DAL.DALPonto_recarga p     = new DAL.DALPonto_recarga();
     Modelo.Ponto_recarga ponto = p.Select(id);
     p.Delete(ponto);
     Response.Redirect("~//CadastroPonto.aspx");
 }
        protected void getModalInfos_Click(object sender, EventArgs e)
        {
            int id = int.Parse(((Button)sender).CommandArgument.ToString());

            DAL.DALPonto_recarga p     = new DAL.DALPonto_recarga();
            Modelo.Ponto_recarga ponto = p.Select(id);
            modalNum.Text = ponto.endereco_numero;
            modalCEP.Text = ponto.endereco_cep;
            modalMun.Text = ponto.endereco_municipio;

            modalContainer.Style.Add("visibility", "visible");
        }
Example #4
0
 protected void Update_Click(object sender, EventArgs e)
 {
     id = int.Parse(Request.QueryString["id"]);
     DAL.DALPonto_recarga p     = new DAL.DALPonto_recarga();
     Modelo.Ponto_recarga ponto = p.Select(id);
     ponto.nome_ponto          = TextPonto.Text;
     ponto.endereco_logradouro = TextRua.Text;
     ponto.endereco_bairro     = TextBairro.Text;
     ponto.endereco_numero     = TextNumero.Text;
     ponto.endereco_cep        = TextCEP.Text;
     ponto.endereco_municipio  = TextMunicipio.Text;
     p.Update(ponto);
     Response.Redirect("~//CadastroPonto.aspx");
 }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                string option = DDLSearch.Text;
                string value  = valueSearch.Text;

                DAL.DALPonto_recarga aDALPonto_recarga = new DAL.DALPonto_recarga();

                Repeater1.DataSourceID = null;
                Repeater1.DataSource   = aDALPonto_recarga.SearchSelect(value, option);
                Repeater1.DataBind();
            } catch { }
        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         id = int.Parse(Request.QueryString["id"]);
         DAL.DALPonto_recarga p     = new DAL.DALPonto_recarga();
         Modelo.Ponto_recarga ponto = p.Select(id);
         TextPonto.Text     = ponto.nome_ponto;
         TextRua.Text       = ponto.endereco_logradouro;
         TextBairro.Text    = ponto.endereco_bairro;
         TextNumero.Text    = ponto.endereco_numero;
         TextCEP.Text       = ponto.endereco_cep;
         TextMunicipio.Text = ponto.endereco_municipio;
     }
 }