Esempio n. 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            TBL_Randevu t = new TBL_Randevu();

            t.MusteriAd    = txtAd.Text;
            t.MusteriSoyad = txtSoyad.Text;
            t.MusteriTelNo = txt_telNo.Text;
            t.MusteriMail  = txt_eMail.Text;
            t.PersonelIdFK = byte.Parse(DropDownList1.SelectedValue);
            t.KategoriIdFK = byte.Parse(DropDownList2.SelectedValue);
            t.Tarih        = txtDate.Text.ToString();
            t.SaatIdFK     = byte.Parse(DropDownList3.SelectedValue);
            t.Ucret        = byte.Parse(DropDownList2.SelectedValue);
            t.FotoDurum    = false;
            db.TBL_Randevu.Add(t);
            db.SaveChanges();



            string ad    = Request.Form[txtAd.UniqueID];
            string soyad = Request.Form[txtSoyad.UniqueID];
            string telno = Request.Form[txt_telNo.UniqueID];
            string email = Request.Form[txt_eMail.UniqueID];

            ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('SAYIN: " + ad + " " + soyad + " randevu alma işleminiz başarılı olup, almış olduğunuz randevu bilgileri  " + email + "  adresi ve  " + telno + "  numarasına gönderilmiştir. Bizi seçtiğiniz için teşekkür ederiz :) ');", true);

            foreach (Control c in this.Page.Form.Controls)
            {
                if (c is TextBox)
                {
                    ((TextBox)c).Text = string.Empty;
                }
            }
        }
Esempio n. 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            TBL_Randevu t = new TBL_Randevu();

            t.MusteriAd    = txtAd.Text;
            t.MusteriSoyad = txtSoyad.Text;
            t.MusteriTelNo = txtTelNo.Text;
            t.MusteriMail  = txtMail.Text;
            t.PersonelIdFK = byte.Parse(DropDownList1.SelectedValue);
            t.KategoriIdFK = byte.Parse(DropDownList2.SelectedValue);
            t.Tarih        = TextBox1.Text;
            t.SaatIdFK     = byte.Parse(DropDownList3.SelectedValue);
            t.Ucret        = byte.Parse(DropDownList2.SelectedValue);
            t.FotoDurum    = false;
            db.TBL_Randevu.Add(t);
            db.SaveChanges();
            Response.Redirect("randevu.aspx");
        }